From: Florian L. <fle...@us...> - 2005-09-29 14:48:36
|
Update of /cvsroot/magicmap/magicmapclient/src/net/sf/magicmap/client/gui In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv20554/src/net/sf/magicmap/client/gui Modified Files: MainGUI.java Log Message: komplette umstruckturierung der Anzeige optionen Index: MainGUI.java =================================================================== RCS file: /cvsroot/magicmap/magicmapclient/src/net/sf/magicmap/client/gui/MainGUI.java,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** MainGUI.java 28 Sep 2005 15:53:04 -0000 1.8 --- MainGUI.java 29 Sep 2005 14:48:19 -0000 1.9 *************** *** 8,11 **** --- 8,12 ---- import java.awt.Dimension; import java.awt.event.ActionEvent; + import java.io.IOException; import java.io.PrintWriter; import java.io.StringWriter; *************** *** 53,56 **** --- 54,58 ---- import org.apache.axis.AxisFault; + import com.Ostermiller.util.Browser; import com.brunchboy.util.swing.relativelayout.AttributeConstraint; import com.brunchboy.util.swing.relativelayout.AttributeType; *************** *** 95,99 **** private AbstractAction exitAction; private AbstractAction aboutAction; ! private AbstractAction viewAction; MapView mapView; private MagicAction invisibleAction; --- 97,101 ---- private AbstractAction exitAction; private AbstractAction aboutAction; ! private AbstractAction onlineHelp; MapView mapView; private MagicAction invisibleAction; *************** *** 104,107 **** --- 106,110 ---- private MagicAction normalView; private MagicAction expertView; + private MagicAction userDefinedView; MagicAction showEdgesBetweenLocations; MagicAction showEdges; *************** *** 231,234 **** --- 234,250 ---- } }; + + onlineHelp = new MagicAction("onlinehelp",GUIConstants.ICON_HELP, "onlinehelptooltip"){ + + public void actionPerformed(ActionEvent e) { + try { + Browser.displayURL("http://vierzig4.ath.cx/NOMADS/Wiki.jsp?page=MagicMapHelp"); + } catch (IOException e1) { + //TODO + } + } + + }; + aboutAction = new MagicAction("about") { *************** *** 237,247 **** } }; - - viewAction = new MagicAction("userdefinedview") { - - public void actionPerformed(ActionEvent e){ - ViewOptionsDialog.showDialog(MainGUI.this); - } - }; invisibleAction = new MagicAction("invisible", GUIConstants.ICON_INVISIBLE, "invisibletooltip") { --- 253,256 ---- *************** *** 252,298 **** }; ! 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()); ! ! } ! }; simpleView = new MagicAction("simpleview") { public void actionPerformed(ActionEvent e){ ! ((JCheckBoxMenuItem)e.getSource()).setSelected(true); ((JCheckBoxMenuItem)((JCheckBoxMenuItem)e.getSource()).getParent().getComponent(1)).setSelected(false); ((JCheckBoxMenuItem)((JCheckBoxMenuItem)e.getSource()).getParent().getComponent(2)).setSelected(false); } }; --- 261,318 ---- }; ! // 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()); ! // ! // } ! // }; simpleView = new MagicAction("simpleview") { public void actionPerformed(ActionEvent e){ ! /*((JCheckBoxMenuItem)e.getSource()).setSelected(true); ((JCheckBoxMenuItem)((JCheckBoxMenuItem)e.getSource()).getParent().getComponent(1)).setSelected(false); ((JCheckBoxMenuItem)((JCheckBoxMenuItem)e.getSource()).getParent().getComponent(2)).setSelected(false); + */ + mapView.setShowAccessPoints(false); + mapView.setShowClients(true); + mapView.setShowEdges(false); + mapView.setShowEdgesBetweenLocations(false); + mapView.setShowLocations(false); + + simpleView.setSelected(true); + normalView.setSelected(false); + expertView.setSelected(false); + userDefinedView.setSelected(false); } }; *************** *** 301,308 **** public void actionPerformed(ActionEvent e){ - ((JCheckBoxMenuItem)e.getSource()).setSelected(true); - ((JCheckBoxMenuItem)((JCheckBoxMenuItem)e.getSource()).getParent().getComponent(0)).setSelected(false); - ((JCheckBoxMenuItem)((JCheckBoxMenuItem)e.getSource()).getParent().getComponent(2)).setSelected(false); } }; --- 321,335 ---- public void actionPerformed(ActionEvent e){ + mapView.setShowAccessPoints(true); + mapView.setShowClients(true); + mapView.setShowEdges(false); + mapView.setShowEdgesBetweenLocations(false); + mapView.setShowLocations(true); + + simpleView.setSelected(false); + normalView.setSelected(true); + expertView.setSelected(false); + userDefinedView.setSelected(false); } }; *************** *** 311,320 **** public void actionPerformed(ActionEvent e){ ! ((JCheckBoxMenuItem)e.getSource()).setSelected(true); ! ((JCheckBoxMenuItem)((JCheckBoxMenuItem)e.getSource()).getParent().getComponent(0)).setSelected(false); ! ((JCheckBoxMenuItem)((JCheckBoxMenuItem)e.getSource()).getParent().getComponent(1)).setSelected(false); ! } }; invisibleAction.setEnabled(false); --- 338,362 ---- public void actionPerformed(ActionEvent e){ ! mapView.setShowAccessPoints(true); ! mapView.setShowClients(true); ! mapView.setShowEdges(true); ! mapView.setShowEdgesBetweenLocations(true); ! mapView.setShowLocations(true); ! ! simpleView.setSelected(false); ! normalView.setSelected(false); ! expertView.setSelected(true); ! userDefinedView.setSelected(false); } }; + + userDefinedView = new MagicAction("userdefinedview") { + + public void actionPerformed(ActionEvent e){ + + userDefinedView.setSelected(!userDefinedView.isSelected()); + ViewOptionsDialog.showDialog(MainGUI.this); + } + }; invisibleAction.setEnabled(false); *************** *** 322,330 **** newMapAction.setEnabled(false); loadMapAction.setEnabled(false); ! showClients.setEnabled(false); ! showAccessPoints.setEnabled(false); ! showLocations.setEnabled(false); ! showEdgesBetweenLocations.setEnabled(false); ! showEdges.setEnabled(false); } --- 364,383 ---- newMapAction.setEnabled(false); loadMapAction.setEnabled(false); ! // showClients.setEnabled(false); ! // showAccessPoints.setEnabled(false); ! // showLocations.setEnabled(false); ! // showEdgesBetweenLocations.setEnabled(false); ! // showEdges.setEnabled(false); ! simpleView.setEnabled(false); ! normalView.setEnabled(false); ! expertView.setEnabled(false); ! userDefinedView.setEnabled(false); ! } ! ! public void setUserDefinedView(){ ! simpleView.setSelected(false); ! normalView.setSelected(false); ! expertView.setSelected(false); ! userDefinedView.setSelected(true); } *************** *** 347,351 **** this.bottomRightTabPanel.addView(consoleView); this.bottomRightTabPanel.selectView(measurementView); ! UIFSplitPane pane = UIFSplitPane.createStrippedSplitPane(JSplitPane.HORIZONTAL_SPLIT, outlineView, (pane2 = UIFSplitPane.createStrippedSplitPane(JSplitPane.VERTICAL_SPLIT, mapPanel, bottomRightTabPanel))); --- 400,404 ---- this.bottomRightTabPanel.addView(consoleView); this.bottomRightTabPanel.selectView(measurementView); ! UIFSplitPane pane = UIFSplitPane.createStrippedSplitPane(JSplitPane.HORIZONTAL_SPLIT, outlineView, (pane2 = UIFSplitPane.createStrippedSplitPane(JSplitPane.VERTICAL_SPLIT, mapPanel, bottomRightTabPanel))); *************** *** 386,393 **** menu.add(GUIBuilder.createCheckBoxMenuItem(simpleView, false)); ! menu.add(GUIBuilder.createCheckBoxMenuItem(normalView, true)); menu.add(GUIBuilder.createCheckBoxMenuItem(expertView, false)); menu.addSeparator(); ! menu.add(GUIBuilder.createMenuItem(viewAction)); return menu; } --- 439,447 ---- menu.add(GUIBuilder.createCheckBoxMenuItem(simpleView, false)); ! menu.add(GUIBuilder.createCheckBoxMenuItem(normalView, false)); menu.add(GUIBuilder.createCheckBoxMenuItem(expertView, false)); menu.addSeparator(); ! menu.add(GUIBuilder.createCheckBoxMenuItem(userDefinedView, false)); ! normalView.setSelected(true); return menu; } *************** *** 401,405 **** --- 455,462 ---- public JMenu buildHelpMenu(){ + Browser.init(); JMenu menu = GUIBuilder.createMenu("help"); + menu.add(GUIBuilder.createMenuItem(onlineHelp)); + menu.addSeparator(); menu.add(GUIBuilder.createMenuItem(aboutAction)); return menu; *************** *** 530,538 **** statusBar.setInvisible(Controller.getInstance().isInvisible()); invisibleAction.setEnabled(true); ! showClients.setEnabled(true); ! showAccessPoints.setEnabled(true); ! showLocations.setEnabled(true); ! showEdgesBetweenLocations.setEnabled(true); ! showEdges.setEnabled(true); } --- 587,594 ---- statusBar.setInvisible(Controller.getInstance().isInvisible()); invisibleAction.setEnabled(true); ! simpleView.setEnabled(true); ! normalView.setEnabled(true); ! expertView.setEnabled(true); ! userDefinedView.setEnabled(true); } |