From b084c6d5ccf92b4d8e48e499c32b0ea5d35bff85 Mon Sep 17 00:00:00 2001 From: Anthrax744 Date: Sat, 17 Sep 2016 13:41:34 +0200 Subject: [PATCH] Fixed DRAS Geofencing ~ Aggregated view for geofence is now displayed again ~ When a NodeView is closed via the close button, the corresponding node in the main view is now deselected, too. This functionality was broken after the latest updates. --- .../topology/views/VisualizationTopologyView.java | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/src/de/tud/kom/p2psim/impl/topology/views/VisualizationTopologyView.java b/src/de/tud/kom/p2psim/impl/topology/views/VisualizationTopologyView.java index 9161e537..fd9cb9c8 100644 --- a/src/de/tud/kom/p2psim/impl/topology/views/VisualizationTopologyView.java +++ b/src/de/tud/kom/p2psim/impl/topology/views/VisualizationTopologyView.java @@ -271,6 +271,17 @@ public class VisualizationTopologyView extends JFrame * obstacle); worldPanel.add(obsVis); } } */ + + /** + * Sets a node to clicked or unclicked state + * @param id The node which should be affected + * @param clicked true if the node should be set as clicked, false otherwise + */ + public void toggleNodeClicked(INodeID id, boolean clicked) + { + worldPanel.nodeInformation.get(id).clicked = clicked; + } + @Override public void onLocationChanged(Host host, Location location) { // The NodeInformation objects are registered as listener. @@ -332,9 +343,9 @@ public class VisualizationTopologyView extends JFrame VisualizationInjector.scaleValue(location.getLongitude()), VisualizationInjector.scaleValue(location.getLatitude())); } - } + /** * The world * @@ -389,6 +400,7 @@ public class VisualizationTopologyView extends JFrame }); } + public void addTopologyComponent(TopologyComponent comp) { if (!nodeInformation.containsKey(comp.getHost().getId())) { NodeInformation tVis = new NodeInformation(comp); -- GitLab