Subversion Repositories general

Compare Revisions

Ignore whitespace Rev 875 → Rev 876

/sun/xmleditor/trunk/src/control/DocumentManager.java
4,10 → 4,10
* Coded by: Group 5, software practice summer 2003
* University of Bielefeld, Germany
*
* @version $Revision: 1.132 $
* @version $Revision: 1.133 $
*
* Last modification: $Date: 2003/07/26 15:56:11 $
* $Id: DocumentManager.java,v 1.132 2003/07/26 15:56:11 smcsporr Exp $
* Last modification: $Date: 2003/07/28 11:54:17 $
* $Id: DocumentManager.java,v 1.133 2003/07/28 11:54:17 swalkenh Exp $
*/
 
package src.control;
14,6 → 14,7
 
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.awt.event.ItemEvent;
 
import java.io.File;
 
50,14 → 51,15
*
* @author Group 5
*
* @version $Revision: 1.132 $ Last modification: $Date: 2003/07/26 15:56:11 $
* @version $Revision: 1.133 $ Last modification: $Date: 2003/07/28 11:54:17 $
*/
public class DocumentManager implements ActionListener,DocumentManagerInterface,ChangeListener {
public class DocumentManager implements ActionListener, DocumentManagerInterface,
ChangeListener {
 
/** A Vector used to store a list of open documents. */
private Vector openDocumentList;
 
/** The global open dialog. Is made global to save last directory. */
/** The global open dialog. Is made global to save last directory. */
private JFileChooser fileChooserOpen;
 
/** A reference variable to the log panel. */
97,10 → 99,10
/** A parser, in this case used to parse a grammar (DTD or XML schema). */
private Parser grammarParser = new Parser();
 
/** Needed to check, whether auto validation is used. */
private boolean autoValidationFeature = true;
/** Indicates, if the auto validation feature is activated. */
private boolean autoValidationOn = true;
private int unNamedCounter = 0;
/** Instance variables for used file filters. */
321,6 → 323,18
}
}
/**/
if (event.getID() == ActionEvent.ITEM_EVENT_MASK) {
if (event == ItemEvent.SELECTED) {
autoValidationOn = true;
log(LogInterface.TYPE_INFO, "Auto-validation on.");
} else {
autoValidationOn = false;
log(LogInterface.TYPE_INFO, "Auto-validation off.");
}
}
/* Actions to perform if the user choosed to change the curent document's DTD. */
if (event.getActionCommand() == "Set DTD") {
setNewDTD();
477,20 → 491,6
return actualDocument.getFileName();
}
/**
* Returns the auto validation feature status.
*
* The program will validate after loading a file and after selecting another
* element in the tree structure, if auto validation is enabled. In disabled
* state, validation can be used by choosing the 'Validate' function manually.
*
* @return The current status of the auto validation feature. <code>true</code> if
* it is enabled, <code>false</code> otherwise.
*/
public boolean getAutoValidationStatus() {
return autoValidationFeature;
}
/**
* Returns the <code>PluginManagerInterface</code> saved in this instance.
* Needed to get access for plugins to pluin manager
821,8 → 821,6
updateView.update();
}
}
 
}
/**
840,7 → 838,6
/* Give a reference to the log panel to the parser. */
parser.setLogInterface(logInterfaceReference);
int returnValue = fileChooserOpen.showOpenDialog(rootFrame);
/* Case user has chosen a file. */
1463,6 → 1460,18
else {
return false;
}
}
 
/**
* Returns the status of the auto validation feature.
*
* The auto validation feature controls, whether the program will validate
* automatically after loading a file and when updating the treeview.
*
* @return A <code>boolean</code> value indicating if the auto validation
* feature is activated.
*/
public boolean getAutoValidation() {
return autoValidationOn;
}
}