|
From: Tobias H. <thu...@us...> - 2005-05-11 10:51:56
|
Update of /cvsroot/magicmap/magicmapclient/src/net/sf/magicmap/client/gui In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv12081/src/net/sf/magicmap/client/gui Modified Files: MapPanel.java MainGUI.java ViewTabPanel.java Log Message: + Client is usable without server Index: ViewTabPanel.java =================================================================== RCS file: /cvsroot/magicmap/magicmapclient/src/net/sf/magicmap/client/gui/ViewTabPanel.java,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** ViewTabPanel.java 13 Feb 2005 21:36:38 -0000 1.2 --- ViewTabPanel.java 11 May 2005 10:51:31 -0000 1.3 *************** *** 32,36 **** private JToolBar toolBar; ! ArrayList viewList; private ArrayList buttonList; private View active; --- 32,36 ---- private JToolBar toolBar; ! ArrayList viewList; private ArrayList buttonList; private View active; Index: MainGUI.java =================================================================== RCS file: /cvsroot/magicmap/magicmapclient/src/net/sf/magicmap/client/gui/MainGUI.java,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** MainGUI.java 16 Feb 2005 09:02:02 -0000 1.4 --- MainGUI.java 11 May 2005 10:51:31 -0000 1.5 *************** *** 91,101 **** private AbstractAction exitAction; private AbstractAction aboutAction; ! MapView mapView; private MagicAction invisibleAction; private MagicAction showAccessPoints; private MagicAction showLocations; private MagicAction showClients; ! MagicAction showEdgesBetweenLocations; ! MagicAction showEdges; /** --- 91,101 ---- private AbstractAction exitAction; private AbstractAction aboutAction; ! MapView mapView; private MagicAction invisibleAction; private MagicAction showAccessPoints; private MagicAction showLocations; private MagicAction showClients; ! MagicAction showEdgesBetweenLocations; ! MagicAction showEdges; /** *************** *** 163,168 **** } ! public void buildActions() { ! connectAction = new MagicAction("connect",GUIConstants.ICON_CONNECT,"connecttooltip") { public void actionPerformed(ActionEvent e){ ServerConnectionInfo info = new ServerConnectionInfo(); --- 163,169 ---- } ! public void buildActions(){ ! connectAction = new MagicAction("connect", GUIConstants.ICON_CONNECT, "connecttooltip") { ! public void actionPerformed(ActionEvent e){ ServerConnectionInfo info = new ServerConnectionInfo(); *************** *** 171,257 **** info.name = Settings.getClientName(); info.password = Settings.getClientPassword(); ! info = ConnectServerDialog.showDialog(MainGUI.this,info); ! if (info != null) { Settings.setClientName(info.name); Settings.setClientPassword(info.password); Settings.setServerURL(info.hostname, info.port); connect(); } ! }}; ! setProxyAction = new MagicAction("setproxy",GUIConstants.ICON_CONNECT,"setproxytooltip") { ! public void actionPerformed(ActionEvent e){ ! SetProxyDialog.showDialog(MainGUI.this); ! }}; - disconnectAction = new MagicAction("disconnect",GUIConstants.ICON_DISCONNECT,"disconnecttooltip") { public void actionPerformed(ActionEvent e){ Controller.getInstance().disconnect(MainGUI.this); ! }}; ! ! newMapAction = new MagicAction("newmap",GUIConstants.ICON_NEWMAP,"newmaptooltip") { public void actionPerformed(ActionEvent e){ MapInfo info = NewMapDialog.showDialog(MainGUI.this); ! if (info != null) { Controller.getInstance().createNewMap(info.name, info.imageURL, info.width, info.height, MainGUI.this); } ! }}; ! loadMapAction = new MagicAction("loadmap", GUIConstants.ICON_LOADMAP,"loadmaptooltip") { public void actionPerformed(ActionEvent e){ Controller.getInstance().retrieveMapNames(MainGUI.this); ! }}; ! ! exitAction = new MagicAction("exit",GUIConstants.ICON_EXIT,"exit") { public void actionPerformed(ActionEvent e){ MainGUI.this.setVisible(false); ! System.exit(0); ! ! }}; aboutAction = new MagicAction("about") { public void actionPerformed(ActionEvent e){ ! JOptionPane.showMessageDialog(MainGUI.this, "MagicMap - Version " + Version.getVersion() +"\n\nHumboldt-Universität zu Berlin\nInstitut für Informatik, Peter Ibach, Tobias Hübner, Martin Schweigert",GUIUtils.i18n("about",false),JOptionPane.PLAIN_MESSAGE); ! }}; ! ! ! invisibleAction = new MagicAction("invisible",GUIConstants.ICON_INVISIBLE,"invisibletooltip") { public void actionPerformed(ActionEvent e){ toogleInvisible(); ! }}; ! ! showAccessPoints = new MagicAction("showaccesspoints") { ! public void actionPerformed(ActionEvent e){ ! mapView.setShowAccessPoints(showAccessPoints.isSelected()); ! }}; ! ! showLocations = new MagicAction("showlocations") { ! ! public void actionPerformed(ActionEvent e){ ! mapView.setShowLocations(showLocations.isSelected()); ! }}; ! ! showClients = new MagicAction("showclients") { ! ! public void actionPerformed(ActionEvent e){ ! mapView.setShowClients(showClients.isSelected()); ! }}; ! ! showEdgesBetweenLocations = new MagicAction("showedgesbetweenlocations") { ! public void actionPerformed(ActionEvent e){ mapView.setShowEdgesBetweenLocations(showEdgesBetweenLocations.isSelected()); ! ! }}; ! ! showEdges = new MagicAction("showedges") { ! ! public void actionPerformed(ActionEvent e){ ! mapView.setShowEdges(showEdges.isSelected()); ! ! }}; ! ! invisibleAction.setEnabled(false); disconnectAction.setEnabled(false); --- 172,282 ---- info.name = Settings.getClientName(); info.password = Settings.getClientPassword(); ! info.useNoServer = Settings.isUseNoServer(); ! info = ConnectServerDialog.showDialog(MainGUI.this, info); ! if (info != null){ Settings.setClientName(info.name); Settings.setClientPassword(info.password); Settings.setServerURL(info.hostname, info.port); + Settings.setUseNoServer(info.useNoServer); connect(); } ! } ! }; ! setProxyAction = new MagicAction("setproxy", GUIConstants.ICON_CONNECT, "setproxytooltip") { ! ! public void actionPerformed(ActionEvent e){ ! SetProxyDialog.showDialog(MainGUI.this); ! } ! }; ! ! disconnectAction = new MagicAction("disconnect", GUIConstants.ICON_DISCONNECT, "disconnecttooltip") { public void actionPerformed(ActionEvent e){ Controller.getInstance().disconnect(MainGUI.this); ! } ! }; ! ! newMapAction = new MagicAction("newmap", GUIConstants.ICON_NEWMAP, "newmaptooltip") { ! public void actionPerformed(ActionEvent e){ MapInfo info = NewMapDialog.showDialog(MainGUI.this); ! if (info != null){ Controller.getInstance().createNewMap(info.name, info.imageURL, info.width, info.height, MainGUI.this); } ! } ! }; ! loadMapAction = new MagicAction("loadmap", GUIConstants.ICON_LOADMAP, "loadmaptooltip") { ! public void actionPerformed(ActionEvent e){ Controller.getInstance().retrieveMapNames(MainGUI.this); ! } ! }; ! ! exitAction = new MagicAction("exit", GUIConstants.ICON_EXIT, "exit") { ! public void actionPerformed(ActionEvent e){ MainGUI.this.setVisible(false); ! System.exit(0); ! ! } ! }; aboutAction = new MagicAction("about") { + public void actionPerformed(ActionEvent e){ ! JOptionPane ! .showMessageDialog( ! MainGUI.this, ! "MagicMap - Version " ! + Version.getVersion() ! + "\n\nHumboldt-Universität zu Berlin\nInstitut für Informatik, Peter Ibach, Tobias Hübner, Martin Schweigert", ! GUIUtils.i18n("about", false), JOptionPane.PLAIN_MESSAGE); ! } ! }; ! ! invisibleAction = new MagicAction("invisible", GUIConstants.ICON_INVISIBLE, "invisibletooltip") { ! public void actionPerformed(ActionEvent e){ toogleInvisible(); ! } ! }; ! showAccessPoints = new MagicAction("showaccesspoints") { ! public void actionPerformed(ActionEvent e){ ! mapView.setShowAccessPoints(showAccessPoints.isSelected()); ! } ! }; ! ! showLocations = new MagicAction("showlocations") { ! ! public void actionPerformed(ActionEvent e){ ! mapView.setShowLocations(showLocations.isSelected()); ! } ! }; ! ! showClients = new MagicAction("showclients") { ! ! public void actionPerformed(ActionEvent e){ ! mapView.setShowClients(showClients.isSelected()); ! } ! }; ! showEdgesBetweenLocations = new MagicAction("showedgesbetweenlocations") { ! public void actionPerformed(ActionEvent e){ mapView.setShowEdgesBetweenLocations(showEdgesBetweenLocations.isSelected()); ! ! } ! }; ! ! showEdges = new MagicAction("showedges") { ! ! public void actionPerformed(ActionEvent e){ ! mapView.setShowEdges(showEdges.isSelected()); ! ! } ! }; ! invisibleAction.setEnabled(false); disconnectAction.setEnabled(false); *************** *** 263,267 **** showEdgesBetweenLocations.setEnabled(false); showEdges.setEnabled(false); ! } /** * Hauptpanel bauen * @return --- 288,294 ---- showEdgesBetweenLocations.setEnabled(false); showEdges.setEnabled(false); ! } ! ! /** * Hauptpanel bauen * @return Index: MapPanel.java =================================================================== RCS file: /cvsroot/magicmap/magicmapclient/src/net/sf/magicmap/client/gui/MapPanel.java,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** MapPanel.java 21 Apr 2005 10:53:27 -0000 1.3 --- MapPanel.java 11 May 2005 10:51:31 -0000 1.4 *************** *** 50,54 **** private int lastX; private int lastY; ! Node selectedNode; private AbstractAction createLocationAction; private AbstractAction fetchLocationsAction; --- 50,54 ---- private int lastX; private int lastY; ! Node selectedNode; private AbstractAction createLocationAction; private AbstractAction fetchLocationsAction; |