|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Object
|
+--javax.swing.AbstractAction
|
+--com.japisoft.xmlpad.action.XMLAction
|
+--com.japisoft.xmlpad.action.xml.FormatAction
Action for formatting the XML content. If you don't want to have sorted
attributes, you must override the sortAttributes method.
By default indentSize is equals to 4, but you can override it by calling
ActionModel.setProperty( Properties.INDENT_SIZE_PROPERTY, new Integer( 2 )
The same thing for the indent char calling
ActionModel.setProperty( Properties.INDENT_CHAR_PROPERTY, '\'' )
XMLAction,
Serialized Form| Nested Class Summary |
| Nested classes inherited from class com.japisoft.xmlpad.action.XMLAction |
XMLAction.EmptyIcon |
| Field Summary | |
static boolean |
CANONICAL
|
static java.lang.String |
ID
|
| Fields inherited from class com.japisoft.xmlpad.action.XMLAction |
AUTO_UI, IMAGE_EXT, IMAGE_SIZE, INVALID_ACTION, RESOURCE_BUNDLE, VALID_ACTION |
| Fields inherited from interface com.japisoft.xmlpad.action.Features |
VALIDATING_FEATURE |
| Fields inherited from interface com.japisoft.xmlpad.action.Properties |
FILE_ENCODING, INDENT_CHAR_PROPERTY, INDENT_SIZE_PROPERTY |
| Fields inherited from interface javax.swing.Action |
ACCELERATOR_KEY, ACTION_COMMAND_KEY, DEFAULT, LONG_DESCRIPTION, MNEMONIC_KEY, NAME, SHORT_DESCRIPTION, SMALL_ICON |
| Constructor Summary | |
FormatAction()
|
|
| Method Summary | |
java.lang.Object |
getProperty(java.lang.String propertyName,
java.lang.Object defaultValue)
|
static java.lang.String |
getWriterEncoding()
|
boolean |
isReplaceAmp()
|
boolean |
isReplaceAPos()
|
boolean |
isReplaceGt()
|
boolean |
isReplaceLt()
|
boolean |
isReplaceQuote()
|
boolean |
notifyAction()
Notify action must be done. |
void |
print(int indent,
org.w3c.dom.Node node)
Prints the specified node, recursively. |
void |
print(org.w3c.dom.Node node)
|
void |
setProperty(java.lang.String propertyName,
java.lang.Object value)
Support for INDENT_CHAR_PROPERTY, INDENT_SIZE_PROPERTY properties |
void |
setReplaceAmp(boolean replaceAmp)
Resolve the amp character as entity. |
void |
setReplaceAPos(boolean replaceAPos)
Resolve the ' character as entity. |
void |
setReplaceGt(boolean replaceGt)
Resolved the gt character is resolved as entity. |
void |
setReplaceLt(boolean replaceLt)
Resolved the lt character as entity. |
void |
setReplaceQuote(boolean replaceQuote)
Resolved the " character as entity. |
| Methods inherited from class com.japisoft.xmlpad.action.XMLAction |
actionPerformed, dispose, getName, getParam, getPopupGroup, getXMLContainer, getXMLEditor, hasFeature, isPopable, isToolbarable, setActionDelegate, setActionReferenceGroup, setActionReferenceIcon, setFeature, setParam, setPopable, 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 |
| Field Detail |
public static final java.lang.String ID
public static boolean CANONICAL
| Constructor Detail |
public FormatAction()
| Method Detail |
public void setProperty(java.lang.String propertyName,
java.lang.Object value)
setProperty in class XMLActionpropertyName - Property namevalue - Property value
public java.lang.Object getProperty(java.lang.String propertyName,
java.lang.Object defaultValue)
getProperty in class XMLActionXMLAction has not overrided it a null value will be returnedpublic boolean notifyAction()
XMLAction
notifyAction in class XMLActionpublic static java.lang.String getWriterEncoding()
public void print(org.w3c.dom.Node node)
public void print(int indent,
org.w3c.dom.Node node)
public boolean isReplaceAmp()
public void setReplaceAmp(boolean replaceAmp)
true
public boolean isReplaceAPos()
public void setReplaceAPos(boolean replaceAPos)
true
public boolean isReplaceGt()
public void setReplaceGt(boolean replaceGt)
true
public boolean isReplaceLt()
public void setReplaceLt(boolean replaceLt)
true
public boolean isReplaceQuote()
public void setReplaceQuote(boolean replaceQuote)
true
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||