From: Johannes Z. <jza...@us...> - 2006-02-26 11:38:01
|
Update of /cvsroot/magicmap/magicmapclient/src/net/sf/magicmap/client/views In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv8830/src/net/sf/magicmap/client/views Modified Files: MapView.java OutlineView.java Log Message: Bugfixes f. schnellen Kartenwechsel Geopositionen implementiert Index: OutlineView.java =================================================================== RCS file: /cvsroot/magicmap/magicmapclient/src/net/sf/magicmap/client/views/OutlineView.java,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** OutlineView.java 20 Feb 2006 08:49:59 -0000 1.6 --- OutlineView.java 26 Feb 2006 10:20:57 -0000 1.7 *************** *** 59,62 **** --- 59,63 ---- private OutlineNode nodeClients; private OutlineNode nodeLocations; + private OutlineNode nodeGeoPoints; *************** *** 84,87 **** --- 85,90 ---- nodeClients = new OutlineNode(GUIUtils.i18n("clients")); nodeLocations = new OutlineNode(GUIUtils.i18n("locations")); + //TODO internationalize + nodeGeoPoints = new OutlineNode("Geokoordinaten"); treeroot.add(nodeMaps); *************** *** 89,92 **** --- 92,96 ---- treeroot.add(nodeClients); treeroot.add(nodeLocations); + treeroot.add(nodeGeoPoints); tree = new JTree(treemodel); *************** *** 165,168 **** --- 169,175 ---- treemodel.insertNodeInto(on,nodeLocations,index); break; + case NodeModel.NODETYPE_GEOPOS : + index = getAlphabeticalIndex(nodeGeoPoints, on); + treemodel.insertNodeInto(on, nodeGeoPoints, index); } *************** *** 202,209 **** } } else if (type == NodeModel.UPDATE_CLEAR) { ! // this.nodeMaps.removeAllChildren(); this.nodeAccessPoints.removeAllChildren(); this.nodeClients.removeAllChildren(); this.nodeLocations.removeAllChildren(); treemodel.reload(); } --- 209,217 ---- } } else if (type == NodeModel.UPDATE_CLEAR) { ! this.nodeMaps.removeAllChildren(); this.nodeAccessPoints.removeAllChildren(); this.nodeClients.removeAllChildren(); this.nodeLocations.removeAllChildren(); + this.nodeGeoPoints.removeAllChildren(); treemodel.reload(); } *************** *** 228,237 **** * @see javax.swing.event.TreeSelectionListener#valueChanged(javax.swing.event.TreeSelectionEvent) */ ! public void valueChanged(TreeSelectionEvent e) { ! if(!((OutlineNode)e.getPath().getLastPathComponent()).getAllowsChildren()) { ! Node node = ((OutlineNode)e.getPath().getLastPathComponent()).getNode(); if (node instanceof MapNode) { ! if (((MapNode)node).getMapInfo() != null) { ! Controller.getInstance().setCurrentMap(((MapNode)node).getMapInfo()); } } else { --- 236,249 ---- * @see javax.swing.event.TreeSelectionListener#valueChanged(javax.swing.event.TreeSelectionEvent) */ ! public synchronized void valueChanged(TreeSelectionEvent tse) { ! if(!((OutlineNode)tse.getPath().getLastPathComponent()).getAllowsChildren()) { ! final Node node = ((OutlineNode)tse.getPath().getLastPathComponent()).getNode(); ! if (node instanceof MapNode) { ! MapNode mapNode = (MapNode) node; ! if (mapNode.getMapInfo() != null) { ! // if (!Controller.getInstance().getCurrentMap().equals(mapNode.getMapInfo())) { ! Controller.getInstance().retrieveMap(mapNode.getMapInfo().name, mapNode); ! // } } } else { *************** *** 281,284 **** --- 293,298 ---- case NodeModel.NODETYPE_LOCATION : return findOutlineNode(nodeLocations, node); + case NodeModel.NODETYPE_GEOPOS : + return findOutlineNode(nodeGeoPoints, node); default : return null; *************** *** 335,338 **** --- 349,354 ---- case NodeModel.NODETYPE_LOCATION : return getOutlineNodePath(nodeLocations, node); + case NodeModel.NODETYPE_GEOPOS : + return getOutlineNodePath(nodeGeoPoints, node); default : return null; Index: MapView.java =================================================================== RCS file: /cvsroot/magicmap/magicmapclient/src/net/sf/magicmap/client/views/MapView.java,v retrieving revision 1.15 retrieving revision 1.16 diff -C2 -d -r1.15 -r1.16 *** MapView.java 20 Feb 2006 08:49:58 -0000 1.15 --- MapView.java 26 Feb 2006 10:20:57 -0000 1.16 *************** *** 78,81 **** --- 78,82 ---- private Icon clientIcon; private Icon accessPointIcon; + private Icon geoPosIcon; private Icon locationIcon; private Icon clientAnchorIcon; *************** *** 134,137 **** --- 135,139 ---- this.clientIcon = GUIBuilder.getToolIcon(GUIConstants.ICON_CLIENT); this.accessPointIcon = GUIBuilder.getToolIcon(GUIConstants.ICON_ACCESSPOINT); + this.geoPosIcon = GUIBuilder.getToolIcon(GUIConstants.ICON_GEOPOS); this.locationIcon = GUIBuilder.getToolIcon(GUIConstants.ICON_LOCATION); this.clientAnchorIcon = GUIBuilder.getToolIcon(GUIConstants.ICON_CLIENT_ANCHOR); *************** *** 171,174 **** --- 173,178 ---- else return accessPointIcon; + case NodeModel.NODETYPE_GEOPOS : + return geoPosIcon; case NodeModel.NODETYPE_LOCATION : if (!showLocations){ *************** *** 763,767 **** v = addVertex(node); // Mehr ist nicht zuu tun, die Katen gehen vom Client aus. ! } if (v != null){ if (node.isFix()){ --- 767,774 ---- v = addVertex(node); // Mehr ist nicht zuu tun, die Katen gehen vom Client aus. ! } else if (node.getType() == NodeModel.NODETYPE_GEOPOS) { ! v = addVertex(node); ! // Mehr ist nicht zuu tun, die Katen gehen vom Client aus. ! } if (v != null){ if (node.isFix()){ |