Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Simonstrator
PeerfactSim.KOM
Commits
4ea84d33
Commit
4ea84d33
authored
Aug 06, 2017
by
Simon Luser
Browse files
fixed to master
parent
7844ec0b
Changes
2
Show whitespace changes
Inline
Side-by-side
src/de/tud/kom/p2psim/impl/topology/views/VisualizationTopologyView.java
View file @
4ea84d33
...
@@ -398,44 +398,6 @@ public class VisualizationTopologyView extends JFrame
...
@@ -398,44 +398,6 @@ public class VisualizationTopologyView extends JFrame
public
WorldPanel
()
{
public
WorldPanel
()
{
this
.
setLayout
(
null
);
this
.
setLayout
(
null
);
this
.
setDoubleBuffered
(
true
);
this
.
setDoubleBuffered
(
true
);
// this.addMouseListener(new MouseAdapter() {
//
// /**
// * Stores the mouse position, if the mouse button is pressed
// */
// @Override
// public void mousePressed(MouseEvent e) {
// boolean turnedSomeoneOff = false;
// for (VisNodeInformation node : nodeInformation.values()) {
// // Make it easier to turn things off.
// if (node.clicked && node.position
// .distance(e.getPoint()) < PADDING + 2) {
// node.clicked = !node.clicked;
// VisualizationInjector
// .notifyInteractionListenersOnClick(
// node.hostId, node.clicked);
// turnedSomeoneOff = true;
// }
// }
// if (!turnedSomeoneOff) {
// // Turn sth on (limit to one node)
// for (VisNodeInformation node : nodeInformation.values()) {
// if (node.disableClickListener) {
// continue;
// }
// if (!node.clicked && node.position
// .distance(e.getPoint()) < PADDING) {
// node.clicked = !node.clicked;
// VisualizationInjector
// .notifyInteractionListenersOnClick(
// node.hostId, node.clicked);
// break;
// }
// }
// }
// }
//
// });
}
}
public
void
addTopologyComponent
(
TopologyComponent
comp
)
{
public
void
addTopologyComponent
(
TopologyComponent
comp
)
{
...
@@ -454,31 +416,8 @@ public class VisualizationTopologyView extends JFrame
...
@@ -454,31 +416,8 @@ public class VisualizationTopologyView extends JFrame
@Override
@Override
protected
void
paintComponent
(
Graphics
g
)
{
protected
void
paintComponent
(
Graphics
g
)
{
// Graphics2D g2 = (Graphics2D) g;
// g2.setRenderingHint(RenderingHints.KEY_ANTIALIASING,
// RenderingHints.VALUE_ANTIALIAS_ON);
// paintNodes(g2);
super
.
paintComponent
(
g
);
super
.
paintComponent
(
g
);
}
}
// private void paintNodes(Graphics2D g2) {
// for (VisNodeInformation node : nodeInformation.values()) {
// if (node.clicked) {
// g2.setColor(Color.MAGENTA);
// g2.fillOval((int) node.position.getX() - PADDING,
// (int) node.position.getY() - PADDING,
// PADDING * 2 + 1, PADDING * 2 + 1);
// } else {
// if (showNodes) {
// // Draw nodes
// g2.setColor(Color.DARK_GRAY);
// g2.fillOval((int) node.position.getX() - NODE_PAD,
// (int) node.position.getY() - NODE_PAD,
// NODE_PAD * 2 + 1, NODE_PAD * 2 + 1);
// }
// }
// }
// }
}
}
public
void
notifyInteractionListenersOnClick
(
long
hostid
,
public
void
notifyInteractionListenersOnClick
(
long
hostid
,
...
...
src/de/tud/kom/p2psim/impl/topology/views/visualization/ui/MetricChartAdapter.java
View file @
4ea84d33
...
@@ -86,10 +86,10 @@ public class MetricChartAdapter implements MetricPlotAdapter {
...
@@ -86,10 +86,10 @@ public class MetricChartAdapter implements MetricPlotAdapter {
}
}
if
(
lowerPercentile
>
0
&&
upperPercentile
>
0
)
{
if
(
lowerPercentile
>
0
&&
upperPercentile
>
0
)
{
Metric
percUpperM
=
MetricAnalyzer
.
getMetric
(
Metric
percUpperM
=
MetricAnalyzer
.
getMetric
(
"P"
"P"
+
upperPercentile
+
"_"
+
metric
.
getName
());
+
upperPercentile
+
"_"
+
metric
.
getName
());
Metric
percLowerM
=
MetricAnalyzer
.
getMetric
(
Metric
percLowerM
=
MetricAnalyzer
.
getMetric
(
"P"
"P"
+
lowerPercentile
+
"_"
+
metric
.
getName
());
+
lowerPercentile
+
"_"
+
metric
.
getName
());
if
(
percLowerM
!=
null
&&
percLowerM
.
isOverallMetric
()
if
(
percLowerM
!=
null
&&
percLowerM
.
isOverallMetric
()
&&
percUpperM
!=
null
&&
percUpperM
.
isOverallMetric
())
{
&&
percUpperM
!=
null
&&
percUpperM
.
isOverallMetric
())
{
perc_lower
=
percLowerM
.
getOverallMetric
();
perc_lower
=
percLowerM
.
getOverallMetric
();
...
@@ -108,8 +108,8 @@ public class MetricChartAdapter implements MetricPlotAdapter {
...
@@ -108,8 +108,8 @@ public class MetricChartAdapter implements MetricPlotAdapter {
}
}
if
(
avg
!=
null
)
{
if
(
avg
!=
null
)
{
XYChart
chart
=
view
.
createPlot
(
XYChart
chart
=
view
.
createPlot
(
metric
.
getName
()
+
" -- "
metric
.
getName
()
+
" -- "
+
metric
.
getDescription
());
+
metric
.
getDescription
());
series
=
chart
.
getDataset
().
getSeries
(
0
);
series
=
chart
.
getDataset
().
getSeries
(
0
);
// add, otherwise re-range is not working
// add, otherwise re-range is not working
...
@@ -120,16 +120,16 @@ public class MetricChartAdapter implements MetricPlotAdapter {
...
@@ -120,16 +120,16 @@ public class MetricChartAdapter implements MetricPlotAdapter {
}
}
if
(
min
!=
null
)
{
if
(
min
!=
null
)
{
chart
.
getDataset
().
addSeries
(
new
YIntervalSeries
(
"Min"
));
chart
.
getDataset
().
addSeries
(
new
YIntervalSeries
(
"Min"
));
minSeries
=
chart
.
getDataset
()
minSeries
=
chart
.
getDataset
()
.
getSeries
(
.
getSeries
(
chart
.
getDataset
().
getSeriesCount
()
-
1
);
chart
.
getDataset
().
getSeriesCount
()
-
1
);
if
(
maxItems
>
0
)
{
if
(
maxItems
>
0
)
{
minSeries
.
setMaximumItemCount
(
maxItems
);
minSeries
.
setMaximumItemCount
(
maxItems
);
}
}
}
}
if
(
max
!=
null
)
{
if
(
max
!=
null
)
{
chart
.
getDataset
().
addSeries
(
new
YIntervalSeries
(
"Max"
));
chart
.
getDataset
().
addSeries
(
new
YIntervalSeries
(
"Max"
));
maxSeries
=
chart
.
getDataset
()
maxSeries
=
chart
.
getDataset
()
.
getSeries
(
.
getSeries
(
chart
.
getDataset
().
getSeriesCount
()
-
1
);
chart
.
getDataset
().
getSeriesCount
()
-
1
);
if
(
maxItems
>
0
)
{
if
(
maxItems
>
0
)
{
maxSeries
.
setMaximumItemCount
(
maxItems
);
maxSeries
.
setMaximumItemCount
(
maxItems
);
}
}
...
@@ -163,8 +163,8 @@ public class MetricChartAdapter implements MetricPlotAdapter {
...
@@ -163,8 +163,8 @@ public class MetricChartAdapter implements MetricPlotAdapter {
}
}
}
}
if
(
avg
.
isValid
())
if
(
avg
.
isValid
())
series
.
add
(
seconds
,
avgVal
,
Math
.
max
(
0
,
avgVal
-
varDown
),
series
.
add
(
seconds
,
avgVal
,
Math
.
max
(
0
,
avgVal
-
varDown
),
avgVal
avgVal
+
varUp
);
+
varUp
);
}
}
if
(
minSeries
!=
null
)
{
if
(
minSeries
!=
null
)
{
double
minV
=
scaledValue
(
min
);
double
minV
=
scaledValue
(
min
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment