4,10 → 4,10 |
* Coded by: Group 5, software practice summer 2003 |
* University of Bielefeld, Germany |
* |
* @version $Revision: 1.81 $ |
* @version $Revision: 1.82 $ |
* |
* Last modification: $Date: 2003/07/24 19:01:43 $ |
* $Id: GUI.java,v 1.81 2003/07/24 19:01:43 smcsporr Exp $ |
* Last modification: $Date: 2003/07/24 22:18:05 $ |
* $Id: GUI.java,v 1.82 2003/07/24 22:18:05 ioklasse Exp $ |
*/ |
|
package src.gui; |
50,7 → 50,7 |
* |
* @author group 5 |
* |
* @version $Revision: 1.81 $ Last modification: $Date: 2003/07/24 19:01:43 $ |
* @version $Revision: 1.82 $ Last modification: $Date: 2003/07/24 22:18:05 $ |
*/ |
public class GUI |
extends JFrame implements GuiInterface,WindowListener { |
90,7 → 90,9 |
private LogPanel logPanel = new LogPanel(); |
private StatusPanel statusPanel = new StatusPanel(); |
|
/* Menu buttons for view-menu*/ |
private JMenuItem setXpath; |
private JMenuItem clearLogPanel; |
|
/* GUI internal tree and it's scroll pane. */ |
private PopUpJTree guiTree = new PopUpJTree(); |
243,6 → 245,24 |
file.add(saveAll); |
|
file.addSeparator(); |
|
closeAll = new JMenuItem("Close all opened documents"); |
/* Help text for close document. */ |
closeAll.setToolTipText("click to close all open documents"); |
/* Register close all active documents button events with docManager. */ |
closeAll.addActionListener(docManager); |
file.add(closeAll); |
|
closeActDoc = new JMenuItem("Close active document"); |
/* Help text for close document. */ |
closeActDoc.setToolTipText("click to close the active document"); |
/* Shortkey for close active document function. */ |
closeActDoc.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_C, Event.CTRL_MASK)); |
/* Register close active document button events with docManager. */ |
closeActDoc.addActionListener(docManager); |
file.add(closeActDoc); |
|
file.addSeparator(); |
|
exit = new JMenuItem("Exit"); |
/* Help text for exit function. */ |
316,24 → 336,8 |
setNewSchema.addActionListener(docManager); |
documentMenu.add(setNewSchema); |
|
documentMenu.addSeparator(); |
|
|
closeAll = new JMenuItem("Close all opened documents"); |
/* Help text for close document. */ |
closeAll.setToolTipText("click to close all open documents"); |
/* Register close all active documents button events with docManager. */ |
closeAll.addActionListener(docManager); |
documentMenu.add(closeAll); |
|
closeActDoc = new JMenuItem("Close active document"); |
/* Help text for close document. */ |
closeActDoc.setToolTipText("click to close the active document"); |
/* Shortkey for close active document function. */ |
closeActDoc.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_C, Event.CTRL_MASK)); |
/* Register close active document button events with docManager. */ |
closeActDoc.addActionListener(docManager); |
documentMenu.add(closeActDoc); |
|
return documentMenu; |
} |
|
349,10 → 353,18 |
setXpath.setToolTipText("click to enter an XPath expression"); |
/* Shortkey for set XPath function. */ |
setXpath.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_X, Event.CTRL_MASK)); |
/* Register set XPath button events to docManager. */ |
/* Register updateViewListener to XPath button */ |
setXpath.addActionListener(updateViewListener); |
view.add(setXpath); |
|
clearLogPanel = new JMenuItem("Clear Log Panel"); |
/* Help text for clearLogPanel function. */ |
clearLogPanel.setToolTipText("click to delete the content of the Log Panel"); |
/* Register the clearLogPanel button */ |
clearLogPanel.addActionListener(updateViewListener); |
view.add(clearLogPanel); |
|
view.add(setXpath); |
|
return view; |
|
} |
437,7 → 449,15 |
|
public void setTreeVisible(boolean bool) { |
|
guiTree.setVisible(bool); |
if (bool == true){ |
treeScrollPane.removeAll(); |
guiTree.setVisible(bool); |
}else{ |
|
treeScrollPane.disable(); |
guiTree.setVisible(bool); |
} |
|
} |
|
private JMenu createTestMenu() { |