Update of /cvsroot/magicmap/magicmapclient/src/net/sf/magicmap/client/views
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv14848/src/net/sf/magicmap/client/views
Modified Files:
MapView.java
Log Message:
Nur Kanten für Selektierten Knoten Option eingefügt
Index: MapView.java
===================================================================
RCS file: /cvsroot/magicmap/magicmapclient/src/net/sf/magicmap/client/views/MapView.java,v
retrieving revision 1.12
retrieving revision 1.13
diff -C2 -d -r1.12 -r1.13
*** MapView.java 29 Sep 2005 14:48:19 -0000 1.12
--- MapView.java 4 Oct 2005 13:12:24 -0000 1.13
***************
*** 91,94 ****
--- 91,95 ----
private HashMap locationLocationMap;
+ private Node selectedNode;
private NodeModelMetric metric;
***************
*** 100,108 ****
private boolean showEdgesBetweenLocations = false;
! private boolean showEdges = false;
private boolean showAccessPoints = true;
private boolean showLocations = true;
private boolean showClients = true;
!
/**
--- 101,110 ----
private boolean showEdgesBetweenLocations = false;
! private boolean showEdges = true;
private boolean showAccessPoints = true;
private boolean showLocations = true;
private boolean showClients = true;
! private boolean showEdgesForSelectedNode = true;
!
/**
***************
*** 490,494 ****
if (t1 == NodeModel.NODETYPE_LOCATION && t2 == NodeModel.NODETYPE_LOCATION){
! if (!showEdgesBetweenLocations) return result = null;
}
--- 492,500 ----
if (t1 == NodeModel.NODETYPE_LOCATION && t2 == NodeModel.NODETYPE_LOCATION){
! if (!showEdgesBetweenLocations) return result = null;
! }
!
! if (showEdgesForSelectedNode){
! if (selectedNode == null || !selectedNode.equals(node1) && !selectedNode.equals(node2)) return result = null;
}
***************
*** 1082,1085 ****
--- 1088,1092 ----
public void vertexSelected(Vertex v){
if (v == null){
+ selectedNode = null;
Controller.getInstance().setMeasurementViewLocal(true);
Controller.getInstance().getMeasurementView().setTitle(
***************
*** 1087,1100 ****
return;
}
! Node node = findNode(v);
! if (node != null && (node.getType() == NodeModel.NODETYPE_LOCATION || node.getType() == NodeModel.NODETYPE_CLIENT)){
! if (node != Controller.getInstance().getClient()){
Controller.getInstance().setMeasurementViewLocal(false);
! Controller.getInstance().buildOtherMeasurement((AccessPointSeerNode) node);
} else {
Controller.getInstance().setMeasurementViewLocal(true);
}
Controller.getInstance().getMeasurementView().setTitle(
! GUIUtils.i18n("measurement") + " " + node.getDisplayName());
} else{
--- 1094,1107 ----
return;
}
! selectedNode = findNode(v);
! if (selectedNode != null && (selectedNode.getType() == NodeModel.NODETYPE_LOCATION || selectedNode.getType() == NodeModel.NODETYPE_CLIENT)){
! if (selectedNode != Controller.getInstance().getClient()){
Controller.getInstance().setMeasurementViewLocal(false);
! Controller.getInstance().buildOtherMeasurement((AccessPointSeerNode) selectedNode);
} else {
Controller.getInstance().setMeasurementViewLocal(true);
}
Controller.getInstance().getMeasurementView().setTitle(
! GUIUtils.i18n("measurement") + " " + selectedNode.getDisplayName());
} else{
***************
*** 1133,1144 ****
public boolean isShowClients(){
return showClients;
! }
! /**
! * @param b
! */
! public void setShowClients(boolean b){
! this.showClients = b;
! }
}
\ No newline at end of file
--- 1140,1162 ----
public boolean isShowClients(){
return showClients;
! }
! /**
! * @param b
! */
! public void setShowClients(boolean b){
! this.showClients = b;
! }
!
! public boolean isShowEdgesForSelectedNode(){
! return showEdgesForSelectedNode;
! }
! /**
! * @param b
! */
! public void setShowEdgesForSelectedNode(boolean b){
! this.showEdgesForSelectedNode = b;
!
! }
}
\ No newline at end of file
|