From: Tobias H. <thu...@us...> - 2005-05-11 10:52:08
|
Update of /cvsroot/magicmap/magicmapclient/src/net/sf/magicmap/client/views In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv12081/src/net/sf/magicmap/client/views Modified Files: MapView.java Log Message: + Client is usable without server Index: MapView.java =================================================================== RCS file: /cvsroot/magicmap/magicmapclient/src/net/sf/magicmap/client/views/MapView.java,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** MapView.java 18 Feb 2005 09:23:46 -0000 1.4 --- MapView.java 11 May 2005 10:51:29 -0000 1.5 *************** *** 98,108 **** int lcc = 0; ! boolean showEdges = true; ! private boolean showAccessPoints = true ; ! private boolean showLocations = true; ! private boolean showClients = true; /** --- 98,108 ---- int lcc = 0; ! boolean showEdges = true; ! private boolean showAccessPoints = true; ! private boolean showLocations = true; ! private boolean showClients = true; /** *************** *** 145,149 **** switch (node.getType()) { case NodeModel.NODETYPE_CLIENT : ! if (!showClients) { return null; } --- 145,149 ---- switch (node.getType()) { case NodeModel.NODETYPE_CLIENT : ! if (!showClients){ return null; } *************** *** 153,157 **** return clientIcon; case NodeModel.NODETYPE_ACCESSPOINT : ! if (!showAccessPoints) { return null; } --- 153,157 ---- return clientIcon; case NodeModel.NODETYPE_ACCESSPOINT : ! if (!showAccessPoints){ return null; } *************** *** 161,165 **** return accessPointIcon; case NodeModel.NODETYPE_LOCATION : ! if (!showLocations) { return null; } --- 161,165 ---- return accessPointIcon; case NodeModel.NODETYPE_LOCATION : ! if (!showLocations){ return null; } *************** *** 172,191 **** } } ! public Color getFgColorForNode(Node node){ if (node == null) return null; switch (node.getType()) { case NodeModel.NODETYPE_CLIENT : ! if (!showClients) { return null; } return Color.BLACK; case NodeModel.NODETYPE_ACCESSPOINT : ! if (!showAccessPoints) { return null; } return Color.BLACK; case NodeModel.NODETYPE_LOCATION : ! if (!showLocations) { return null; } --- 172,191 ---- } } ! public Color getFgColorForNode(Node node){ if (node == null) return null; switch (node.getType()) { case NodeModel.NODETYPE_CLIENT : ! if (!showClients){ return null; } return Color.BLACK; case NodeModel.NODETYPE_ACCESSPOINT : ! if (!showAccessPoints){ return null; } return Color.BLACK; case NodeModel.NODETYPE_LOCATION : ! if (!showLocations){ return null; } *************** *** 195,204 **** } } ! public Color getBgColorForNode(Node node){ if (node == null) return null; switch (node.getType()) { case NodeModel.NODETYPE_CLIENT : ! if (!showClients) { return null; } --- 195,204 ---- } } ! public Color getBgColorForNode(Node node){ if (node == null) return null; switch (node.getType()) { case NodeModel.NODETYPE_CLIENT : ! if (!showClients){ return null; } *************** *** 208,212 **** return Color.BLACK; case NodeModel.NODETYPE_ACCESSPOINT : ! if (!showAccessPoints) { return null; } --- 208,212 ---- return Color.BLACK; case NodeModel.NODETYPE_ACCESSPOINT : ! if (!showAccessPoints){ return null; } *************** *** 216,220 **** return Color.BLACK; case NodeModel.NODETYPE_LOCATION : ! if (!showLocations) { return null; } --- 216,220 ---- return Color.BLACK; case NodeModel.NODETYPE_LOCATION : ! if (!showLocations){ return null; } *************** *** 227,232 **** } } - - public void resumeGraph(){ --- 227,230 ---- *************** *** 467,470 **** --- 465,469 ---- } } + } else{ desiredLen /= CALIBRATION_FACTOR_AP; *************** *** 487,495 **** if (!showEdgesBetweenLocations) return result = null; } ! if (t1 == NodeModel.NODETYPE_ACCESSPOINT || t2 == NodeModel.NODETYPE_ACCESSPOINT){ if (!showAccessPoints) return result = null; } ! if (t1 == NodeModel.NODETYPE_CLIENT || t2 == NodeModel.NODETYPE_CLIENT){ if (!showClients) return result = null; --- 486,494 ---- if (!showEdgesBetweenLocations) return result = null; } ! if (t1 == NodeModel.NODETYPE_ACCESSPOINT || t2 == NodeModel.NODETYPE_ACCESSPOINT){ if (!showAccessPoints) return result = null; } ! if (t1 == NodeModel.NODETYPE_CLIENT || t2 == NodeModel.NODETYPE_CLIENT){ if (!showClients) return result = null; *************** *** 499,503 **** if (!showLocations) return result = null; } ! return result; } --- 498,502 ---- if (!showLocations) return result = null; } ! return result; } *************** *** 1055,1064 **** this.showEdgesBetweenLocations = showEdgesBetweenLocations; } ! /** * @param showEdges */ public void setShowEdges(boolean showEdges){ ! this.showEdges = showEdges; } --- 1054,1063 ---- this.showEdgesBetweenLocations = showEdgesBetweenLocations; } ! /** * @param showEdges */ public void setShowEdges(boolean showEdges){ ! this.showEdges = showEdges; } *************** *** 1075,1086 **** } 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); ! } ! Controller.getInstance().getMeasurementView().setTitle(GUIUtils.i18n("measurementfor") + " " + node.getDisplayName()); ! ! } else{ Controller.getInstance().setMeasurementViewLocal(true); --- 1074,1085 ---- } 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); ! } ! Controller.getInstance().getMeasurementView().setTitle( ! GUIUtils.i18n("measurementfor") + " " + node.getDisplayName()); ! } else{ Controller.getInstance().setMeasurementViewLocal(true); *************** *** 1094,1098 **** public void setShowAccessPoints(boolean b){ this.showAccessPoints = b; ! } --- 1093,1097 ---- public void setShowAccessPoints(boolean b){ this.showAccessPoints = b; ! } *************** *** 1102,1106 **** public void setShowLocations(boolean b){ this.showLocations = b; ! } --- 1101,1105 ---- public void setShowLocations(boolean b){ this.showLocations = b; ! } *************** *** 1110,1116 **** public void setShowClients(boolean b){ this.showClients = b; - - } } \ No newline at end of file --- 1109,1114 ---- public void setShowClients(boolean b){ this.showClients = b; + } } \ No newline at end of file |