Subversion Repositories general

Compare Revisions

Ignore whitespace Rev 881 → Rev 882

/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.58 $
* @version $Revision: 1.59 $
*
* Last modification: $Date: 2003/07/28 13:23:15 $
* $Id: UpdateView.java,v 1.58 2003/07/28 13:23:15 cstollen Exp $
* Last modification: $Date: 2003/07/28 13:33:08 $
* $Id: UpdateView.java,v 1.59 2003/07/28 13:33:08 smcsporr Exp $
*/
 
package src.gui;
47,7 → 47,7
*
* @author Christian Stollenwerk
*
* @version $Revision: 1.58 $ Last modification: $Date: 2003/07/28 13:23:15 $
* @version $Revision: 1.59 $ Last modification: $Date: 2003/07/28 13:33:08 $
*/
public class UpdateView implements ActionListener, UpdateViewInterface,
OurEventListener, TreeModelListener, TreeExpansionListener, TreeSelectionListener {
402,25 → 402,30
/* Update the document with the content of the plugin */
pluginManagerInterface.forcePluginReport();
/* Check, if a grammar has been specified. */
if ((documentManagerInterface.getActualDocument().getDocumentElement().hasAttribute("xsi:schemaLocation")) ||
(documentManagerInterface.getActualDocument().getDoctype() != null)) {
if (validator.getAutoValidation()) {
logInterface.log(LogInterface.TYPE_INFO, "True !");
/* Check, if a grammar has been specified. */
if ((documentManagerInterface.getActualDocument().getDocumentElement().hasAttribute("xsi:schemaLocation")) ||
(documentManagerInterface.getActualDocument().getDoctype() != null)) {
/* Check, if the current document is valid. */
if (validator.validateDocument(documentManagerInterface.getActualDocument(),
documentManagerInterface.getActualDocumentFile())) {
logInterface.log(LogInterface.TYPE_INFO, "The document is valid");
}
/* Check, if the current document is valid. */
if (validator.validateDocument(documentManagerInterface.getActualDocument(),
documentManagerInterface.getActualDocumentFile())) {
logInterface.log(LogInterface.TYPE_INFO, "The document is valid");
}
/* Not valid -> Print an error message. */
else {
logInterface.log(LogInterface.TYPE_ERROR,
"The document does not fit to the specified grammar");
/* Not valid -> Print an error message. */
else {
logInterface.log(LogInterface.TYPE_ERROR,
"The document does not fit to the specified grammar");
}
/* No grammar -> Print an error message. */
} else {
logInterface.log(LogInterface.TYPE_ERROR, "No grammar specified.");
}
/* No grammar -> Print an error message. */
} else {
logInterface.log(LogInterface.TYPE_ERROR, "No grammar specified.");
}
}
}
/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.88 $
* @version $Revision: 1.89 $
*
* Last modification: $Date: 2003/07/28 11:42:20 $
* $Id: GUI.java,v 1.88 2003/07/28 11:42:20 swalkenh Exp $
* Last modification: $Date: 2003/07/28 13:21:40 $
* $Id: GUI.java,v 1.89 2003/07/28 13:21:40 smcsporr Exp $
*/
 
package src.gui;
21,6 → 21,7
 
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.awt.event.ItemListener;
import java.awt.event.KeyEvent;
import java.awt.event.WindowEvent;
import java.awt.event.WindowListener;
51,7 → 52,7
*
* @author group 5
*
* @version $Revision: 1.88 $ Last modification: $Date: 2003/07/28 11:42:20 $
* @version $Revision: 1.89 $ Last modification: $Date: 2003/07/28 13:21:40 $
*/
public class GUI
extends JFrame implements GuiInterface, WindowListener {
112,11 → 113,12
/** The required event listeners. */
private ActionListener otherGUIListener;
private ActionListener validatorListener;
//private ActionListener validatorListener;
private ActionListener docManager;
private ActionListener updateViewListener;
private ActionListener pluginManager;
private ChangeListener docManagerCL;
private ItemListener validatorListener;
/* A reference variable to the document manager. */
private DocumentManagerInterface docMaster;
325,7 → 327,7
/* Help text for auto validation feature. */
autoValidate.setToolTipText("select to enable auto validation");
/* Register auto validation button events with docManager. */
autoValidate.addActionListener(docManager);
autoValidate.addItemListener(validatorListener);
documentMenu.add(autoValidate);
documentMenu.addSeparator();
647,11 → 649,13
public void setInterfaces(ActionListener otherGuiThings,
ActionListener duocManager, ActionListener updateViewListenerParam,
ActionListener newPluginManager,
ChangeListener chList,DocumentManagerInterface docManInt) {
ChangeListener chList,DocumentManagerInterface docManInt,
ItemListener validatorInt) {
otherGUIListener= otherGuiThings;
docManager= duocManager;
updateViewListener = updateViewListenerParam;
validatorListener = validatorInt;
pluginManager = newPluginManager;
docManagerCL = chList;
docMaster= docManInt;