com.japisoft.xmlpad.action.xml
Class ParseAction
java.lang.Object
javax.swing.AbstractAction
com.japisoft.xmlpad.action.XMLAction
com.japisoft.xmlpad.action.xml.ParseAction
- All Implemented Interfaces:
- javax.swing.Action, java.awt.event.ActionListener, java.lang.Cloneable, org.xml.sax.ErrorHandler, java.util.EventListener, Features, Properties, java.io.Serializable
- public class ParseAction
- extends XMLAction
- implements org.xml.sax.ErrorHandler
Refresh action : XML Parsing. This action works using JAXP
- Version:
- 1.2
- Author:
- (c) 2002 JAPISoft
- See Also:
- Serialized Form
Fields inherited from interface javax.swing.Action |
ACCELERATOR_KEY, ACTION_COMMAND_KEY, DEFAULT, LONG_DESCRIPTION, MNEMONIC_KEY, NAME, SHORT_DESCRIPTION, SMALL_ICON |
Method Summary |
void |
error(org.xml.sax.SAXParseException exception)
|
void |
fatalError(org.xml.sax.SAXParseException exception)
|
org.w3c.dom.Document |
getDocument()
|
boolean |
hasError()
An error has been found while parsing |
boolean |
hasValidation()
|
boolean |
notifyAction()
Notify action must be done. |
void |
setMessageForOk(java.lang.String message)
Reset the message when the parsing step is correct |
void |
setPopupForOk(boolean popup)
Enabled/Disable a dialog box confirming the parsing step is correct. |
void |
setValidation(boolean validation)
Validate the XML. |
void |
warning(org.xml.sax.SAXParseException exception)
|
Methods inherited from class com.japisoft.xmlpad.action.XMLAction |
actionPerformed, dispose, getName, getParam, getPopupGroup, getProperty, getXMLContainer, getXMLEditor, hasFeature, isPopable, isToolbarable, setActionReferenceGroup, setActionReferenceIcon, setFeature, setParam, setPopable, setProperty, setToolbarable, setXMLContainer, setXMLEditor |
Methods inherited from class javax.swing.AbstractAction |
addPropertyChangeListener, getKeys, getPropertyChangeListeners, getValue, isEnabled, putValue, removePropertyChangeListener, setEnabled |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ParseAction
public ParseAction()
setValidation
public void setValidation(boolean validation)
- Validate the XML. By default false
hasValidation
public boolean hasValidation()
- Returns:
- true if validation is managed
notifyAction
public boolean notifyAction()
- Description copied from class:
XMLAction
- Notify action must be done. It returns INVALID_ACTION if the
action is not accessible and VALID_ACTION if this is correct.
- Specified by:
notifyAction
in class XMLAction
- Returns:
- VALID_ACTION if the action is possible and else INVALID_ACTION
setMessageForOk
public void setMessageForOk(java.lang.String message)
- Reset the message when the parsing step is correct
setPopupForOk
public void setPopupForOk(boolean popup)
- Enabled/Disable a dialog box confirming the parsing step is correct. By default
true
getDocument
public org.w3c.dom.Document getDocument()
- Returns:
- the parsed document
hasError
public boolean hasError()
- An error has been found while parsing
warning
public void warning(org.xml.sax.SAXParseException exception)
throws org.xml.sax.SAXException
- Specified by:
warning
in interface org.xml.sax.ErrorHandler
- Throws:
org.xml.sax.SAXException
error
public void error(org.xml.sax.SAXParseException exception)
throws org.xml.sax.SAXException
- Specified by:
error
in interface org.xml.sax.ErrorHandler
- Throws:
org.xml.sax.SAXException
fatalError
public void fatalError(org.xml.sax.SAXParseException exception)
throws org.xml.sax.SAXException
- Specified by:
fatalError
in interface org.xml.sax.ErrorHandler
- Throws:
org.xml.sax.SAXException