/sun/xmleditor/trunk/src/gui/GUI.java |
---|
4,10 → 4,10 |
* Coded by: Group 5, software practice summer 2003 |
* University of Bielefeld, Germany |
* |
* @version $Revision: 1.83 $ |
* @version $Revision: 1.84 $ |
* |
* Last modification: $Date: 2003/07/25 11:48:51 $ |
* $Id: GUI.java,v 1.83 2003/07/25 11:48:51 hjokusch Exp $ |
* Last modification: $Date: 2003/07/25 13:50:56 $ |
* $Id: GUI.java,v 1.84 2003/07/25 13:50:56 hjokusch Exp $ |
*/ |
package src.gui; |
50,7 → 50,7 |
* |
* @author group 5 |
* |
* @version $Revision: 1.83 $ Last modification: $Date: 2003/07/25 11:48:51 $ |
* @version $Revision: 1.84 $ Last modification: $Date: 2003/07/25 13:50:56 $ |
*/ |
public class GUI |
extends JFrame implements GuiInterface,WindowListener { |
61,16 → 61,16 |
private JMenu pluginMenu; |
private JMenu pluginConfigurationMenu; |
/* Menu Buttons for exit and open XML File */ |
/** Menu Buttons for exit and open XML File */ |
private JMenuItem exit; |
private JMenuItem open; |
/* Menu buttons for save options. */ |
/** Menu buttons for save options. */ |
private JMenuItem save; |
private JMenuItem saveAs; |
private JMenuItem saveAll; |
/* Menu buttons for validation and grammar setting functions. */ |
/** Menu buttons for validation and grammar setting functions. */ |
private JMenuItem validate; |
private JMenuItem setNewDTD; |
private JMenuItem setNewSchema; |
77,18 → 77,18 |
private JMenuItem removeDTD; |
private JMenuItem removeSchema; |
/* Menu buttons for creating and closing documents. */ |
/** Menu buttons for creating and closing documents. */ |
private JMenuItem neweeDoc; |
private JMenuItem closeActDoc; |
private JMenuItem closeAll; |
/* Menu buttons for the configuration of the plugins. */ |
/** Menu buttons for the configuration of the plugins. */ |
private JMenuItem resetConfiguration; |
private JMenuItem changeDefaultPlugin; |
private JMenuItem switchToAndFroDefaultPlugin; |
private JMenuItem showActualConfiguration; |
/* Instance variables for the log and status panel. */ |
/** Instance variables for the log and status panel. */ |
private LogPanel logPanel = new LogPanel(); |
private StatusPanel statusPanel = new StatusPanel(); |
109,7 → 109,7 |
/* A tabbed pane used to change between the different open documents. */ |
private JTabbedPane pluginTabbedPanel = new JTabbedPane(); |
/* The required event listeners. */ |
/** The required event listeners. */ |
private ActionListener otherGUIListener; |
private ActionListener validatorListener; |
private ActionListener docManager; |
120,14 → 120,12 |
/* A reference variable to the document manager. */ |
private DocumentManagerInterface docMaster; |
/** |
* The GUI constructor creates |
* the menu bar, an <code>ActionListener</code> and a <code>WindowListener</code> |
* and produces a frame to draw on. |
*/ |
public GUI() |
{ |
public GUI() { |
// make menu |
getContentPane().setLayout(new BorderLayout()); |
342,15 → 340,15 |
documentMenu.addSeparator(); |
removeDTD = new JMenuItem("remove DTD"); |
removeDTD = new JMenuItem("Remove DTD"); |
/* Help text for 'remove DTD' function. */ |
removeDTD.setToolTipText("remove DTD from the selected document"); |
removeDTD.setToolTipText("click to remove DTD from the active document"); |
removeDTD.addActionListener(docManager); |
documentMenu.add(removeDTD); |
removeSchema = new JMenuItem("remove XML Schema"); |
removeSchema = new JMenuItem("Remove XML schema"); |
/* Help text for 'remove XML Schema' function. */ |
removeSchema.setToolTipText("remove XML Schema from the selected document"); |
removeSchema.setToolTipText("click to remove XML schema from the active document"); |
removeSchema.addActionListener(docManager); |
documentMenu.add(removeSchema); |
692,21 → 690,25 |
} |
/** |
* Returns the current object representing a log panel implementation |
* compliant to src.gui.LogInterface. |
* |
* Returns the current log panel implementation. |
* |
* An implementation of a log panel must conform to src.gui.LogInterface |
* to be used. |
* |
* @return An implementation of a log panel. |
* |
* @see src.gui.LogInterface |
*/ |
public LogInterface getLogInterface() { |
public LogInterface getLogPanelImpl() { |
return logPanel; |
} |
/** |
* Returns the current object representing a status panel implementation |
* compliant to src.gui.StatusInterface. |
* Returns the current status panel implementation. |
* |
* An implementation of a status panel must conform to src.gui.StatusInterface |
* to be used. |
* |
* @return An implementation of a status panel. |
* |
* @see src.gui.StatusInterface |
715,10 → 717,11 |
return statusPanel; |
} |
/** |
* Returns the name of file currently opened. |
/** |
* <code>getCurrentFile</code> retrieves the path and name of the file the document |
* has been parsed from. |
* |
* @return The current file. |
* @return The file's path and name from which the active document has been parsed. |
*/ |
public File getCurrentFile() { |
return docMaster.getActualDocumentFile(); |
/sun/xmleditor/trunk/src/gui/GuiInterface.java |
---|
4,10 → 4,10 |
* Coded by: Group 5, software practice summer 2003 |
* University of Bielefeld, Germany |
* |
* @version $Revision: 1.14 $ |
* @version $Revision: 1.15 $ |
* |
* Last modification: $Date: 2003/07/21 15:11:46 $ |
* $Id: GuiInterface.java,v 1.14 2003/07/21 15:11:46 hjokusch Exp $ |
* Last modification: $Date: 2003/07/24 22:18:06 $ |
* $Id: GuiInterface.java,v 1.15 2003/07/24 22:18:06 ioklasse Exp $ |
*/ |
package src.gui; |
26,29 → 26,41 |
* |
* @author Yulia Klassen, Viktoriya Zudova |
*/ |
public interface GuiInterface |
{ |
/** |
* Returns the current object representing a log panel compliant to src.gui.LogInterface. |
public interface GuiInterface { |
/** |
* <code>getCurrentFile</code> retrieves the path and name of the file the document |
* has been parsed from. |
* |
* @return An implementation of a log panel. |
* @return The file's path and name from which the active document has been parsed from. |
*/ |
public LogInterface getLogInterface(); |
public File getCurrentFile(); |
/** |
* Returns the document manager. |
* |
* @return The document manager. |
*/ |
public DocumentManagerInterface getDocumentManagerInterface(); |
/** |
* Returns the current object representing a status panel compliant to src.gui.StatusInterface. |
* Returns the current log panel implementation. |
* |
* @return An implementation of a status panel. |
* An implementation of a log panel must conform to src.gui.LogInterface, to be |
* used. |
* |
* @return An implementation of a log panel. |
* |
* @see src.gui.LogInterface |
*/ |
public StatusInterface getStatusInterface(); |
public LogInterface getLogPanelImpl(); |
/** |
* The methode <code> getCurrentFile </code> return the File |
* object belonging to the actual document |
/** |
* Returns the <code>Frame</code> on which the program draws. |
* |
* @return The file's path and name from which the actual document has been parsed. |
* @return The used frame. |
*/ |
public File getCurrentFile(); |
public Frame getMainWindow(); |
/** |
* The methode <code> getPluginPanel </code>Returns the plugin panel. |
58,20 → 70,17 |
public JPanel getPluginPanel(); |
/** |
* Returns the <code>Frame</code> on which the program draws. |
* Returns the current status panel implementation. |
* |
* @return The used frame. |
*/ |
public Frame getMainWindow(); |
/** |
* Sets the panel object the plugins will use to draw their content. |
* An implementation of a status panel must conform to src.gui.StatusInterface |
* to be used. |
* |
* @param newPanel: The <code>JPanel</code> that will be used for displaying. |
* author S. Walkenhorst |
* @return An implementation of a status panel. |
* |
* @see src.gui.StatusInterface |
*/ |
public void setPluginPanel(JPanel newPanel); |
public StatusInterface getStatusInterface(); |
/** |
* Sets the menu object the plugins will need for user interactions. |
* |
80,10 → 89,11 |
*/ |
public void setPluginMenu(JMenu newPluginMenu); |
/** |
* Returns the document manager. |
* |
* @return The document manager. |
/** |
* Sets the panel object the plugins will use to draw their content. |
* |
* @param newPanel: The <code>JPanel</code> that will be used for displaying. |
* author S. Walkenhorst |
*/ |
public DocumentManagerInterface getDocumentManagerInterface(); |
public void setPluginPanel(JPanel newPanel); |
} |
/sun/xmleditor/trunk/src/gui/UpdateView.java |
---|
4,10 → 4,10 |
* Coded by: Group 5, software practice summer 2003 |
* University of Bielefeld, Germany |
* |
* @version $Revision: 1.53 $ |
* @version $Revision: 1.54 $ |
* |
* Last modification: $Date: 2003/07/24 13:56:00 $ |
* $Id: UpdateView.java,v 1.53 2003/07/24 13:56:00 smcsporr Exp $ |
* Last modification: $Date: 2003/07/25 11:48:51 $ |
* $Id: UpdateView.java,v 1.54 2003/07/25 11:48:51 hjokusch Exp $ |
*/ |
package src.gui; |
46,7 → 46,7 |
* |
* @author Christian Stollenwerk |
* |
* @version $Revision: 1.53 $ Last modification: $Date: 2003/07/24 13:56:00 $ |
* @version $Revision: 1.54 $ Last modification: $Date: 2003/07/25 11:48:51 $ |
*/ |
public class UpdateView implements ActionListener, UpdateViewInterface, |
OurEventListener, TreeModelListener, TreeExpansionListener, TreeSelectionListener { |
167,7 → 167,7 |
newTreeModel |
= new AdapterDomToTreeModel( |
documentManagerInterface.getActualDocument(), nodeList); |
newTreeModel.setLogInterface(gui.getLogInterface()); |
newTreeModel.setLogInterface(gui.getLogPanelImpl()); |
/*for(int i = 1; i <= nodeList.getLength(); i++) { |
//AdapterNode adapterNode = new AdapterNode(nodeList.item(i)); |
//helpRoot.add(nodeList.item(i)); |
189,7 → 189,7 |
else { |
newTreeModel = |
new AdapterDomToTreeModel(documentManagerInterface.getActualDocument()); |
newTreeModel.setLogInterface(gui.getLogInterface()); |
newTreeModel.setLogInterface(gui.getLogPanelImpl()); |
newPopUpJTree = new PopUpJTree(newTreeModel); |
newPopUpJTree.addTreeExpansionListener(this); |
newPopUpJTree.getSelectionModel().setSelectionMode(TreeSelectionModel.SINGLE_TREE_SELECTION); |