4,10 → 4,10 |
* Coded by: Group 5, software practice summer 2003 |
* University of Bielefeld, Germany |
* |
* @version $Revision: 1.48 $ |
* @version $Revision: 1.49 $ |
* |
* Last modification: $Date: 2003/07/22 14:11:26 $ |
* $Id: UpdateView.java,v 1.48 2003/07/22 14:11:26 smcsporr Exp $ |
* Last modification: $Date: 2003/07/23 12:30:37 $ |
* $Id: UpdateView.java,v 1.49 2003/07/23 12:30:37 mdonner Exp $ |
*/ |
|
package src.gui; |
46,7 → 46,7 |
* |
* @author Christian Stollenwerk |
* |
* @version $Revision: 1.48 $ Last modification: $Date: 2003/07/22 14:11:26 $ |
* @version $Revision: 1.49 $ Last modification: $Date: 2003/07/23 12:30:37 $ |
*/ |
public class UpdateView implements ActionListener, UpdateViewInterface, |
OurEventListener, TreeModelListener, TreeExpansionListener, TreeSelectionListener { |
145,6 → 145,8 |
gui.setTreeVisible(false); |
} |
else { |
|
|
dividerPosition = gui.getDivider(); |
gui.setTreeVisible(true); |
if(documentManagerInterface.getExpression() != "") { |
317,7 → 319,7 |
* @see javax.swing.event.TreeModelListener#treeNodesChanged(javax.swing.event.TreeModelEvent) |
*/ |
public void treeNodesChanged(TreeModelEvent arg0) { |
// TODO Auto-generated method stub |
validate(); |
|
} |
|
328,7 → 330,7 |
newPopUpJTree.setRootVisible(true); |
newPopUpJTree.expandRow(0); |
newPopUpJTree.setRootVisible(false); |
|
validate(); |
} |
|
/* (non-Javadoc) |
335,8 → 337,7 |
* @see javax.swing.event.TreeModelListener#treeNodesRemoved(javax.swing.event.TreeModelEvent) |
*/ |
public void treeNodesRemoved(TreeModelEvent arg0) { |
// TODO Auto-generated method stub |
|
validate(); |
} |
|
/* (non-Javadoc) |
346,7 → 347,7 |
newPopUpJTree.setRootVisible(true); |
newPopUpJTree.expandRow(0); |
newPopUpJTree.setRootVisible(false); |
|
validate(); |
} |
|
/* (non-Javadoc) |
391,5 → 392,18 |
treeExpanded(null); |
|
} |
|
|
private void validate() { |
/* Check if the document is valid. */ |
src.parser.Validator validator = new src.parser.Validator(logInterface, gui.getStatusInterface()); |
if (validator.validateDocument(documentManagerInterface.getActualDocument(), |
documentManagerInterface.getActualDocumentFile())) { |
logInterface.log(LogInterface.TYPE_INFO, "The document is valid"); |
} |
|
/* If not, print an error message. */ |
else { |
logInterface.log(LogInterface.TYPE_ERROR, "The document does not fit to the specified grammar"); |
} |
} |
} |