Commit 4ea84d33 authored by Simon Luser's avatar Simon Luser
Browse files

fixed to master

parent 7844ec0b
......@@ -398,44 +398,6 @@ public class VisualizationTopologyView extends JFrame
public WorldPanel() {
this.setLayout(null);
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) {
......@@ -454,31 +416,8 @@ public class VisualizationTopologyView extends JFrame
@Override
protected void paintComponent(Graphics g) {
// Graphics2D g2 = (Graphics2D) g;
// g2.setRenderingHint(RenderingHints.KEY_ANTIALIASING,
// RenderingHints.VALUE_ANTIALIAS_ON);
// paintNodes(g2);
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,
......
......@@ -86,10 +86,10 @@ public class MetricChartAdapter implements MetricPlotAdapter {
}
if (lowerPercentile > 0 && upperPercentile > 0) {
Metric percUpperM = MetricAnalyzer.getMetric(
"P" + upperPercentile + "_" + metric.getName());
Metric percLowerM = MetricAnalyzer.getMetric(
"P" + lowerPercentile + "_" + metric.getName());
Metric percUpperM = MetricAnalyzer.getMetric("P"
+ upperPercentile + "_" + metric.getName());
Metric percLowerM = MetricAnalyzer.getMetric("P"
+ lowerPercentile + "_" + metric.getName());
if (percLowerM != null && percLowerM.isOverallMetric()
&& percUpperM != null && percUpperM.isOverallMetric()) {
perc_lower = percLowerM.getOverallMetric();
......@@ -108,8 +108,8 @@ public class MetricChartAdapter implements MetricPlotAdapter {
}
if (avg != null) {
XYChart chart = view.createPlot(
metric.getName() + " -- " + metric.getDescription());
XYChart chart = view.createPlot(metric.getName() + " -- "
+ metric.getDescription());
series = chart.getDataset().getSeries(0);
// add, otherwise re-range is not working
......@@ -120,16 +120,16 @@ public class MetricChartAdapter implements MetricPlotAdapter {
}
if (min != null) {
chart.getDataset().addSeries(new YIntervalSeries("Min"));
minSeries = chart.getDataset()
.getSeries(chart.getDataset().getSeriesCount() - 1);
minSeries = chart.getDataset().getSeries(
chart.getDataset().getSeriesCount() - 1);
if (maxItems > 0) {
minSeries.setMaximumItemCount(maxItems);
}
}
if (max != null) {
chart.getDataset().addSeries(new YIntervalSeries("Max"));
maxSeries = chart.getDataset()
.getSeries(chart.getDataset().getSeriesCount() - 1);
maxSeries = chart.getDataset().getSeries(
chart.getDataset().getSeriesCount() - 1);
if (maxItems > 0) {
maxSeries.setMaximumItemCount(maxItems);
}
......@@ -163,8 +163,8 @@ public class MetricChartAdapter implements MetricPlotAdapter {
}
}
if (avg.isValid())
series.add(seconds, avgVal, Math.max(0, avgVal - varDown),
avgVal + varUp);
series.add(seconds, avgVal, Math.max(0, avgVal - varDown), avgVal
+ varUp);
}
if (minSeries != null) {
double minV = scaledValue(min);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment