|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.japisoft.xmlpad.XMLDocumentInfo
This class contains information about the current document.
Field Summary | |
java.util.Hashtable |
htBackgroundColorForPrefix
|
java.util.Hashtable |
htColorForPrefix
|
java.lang.String |
originalDTDLocation
|
Constructor Summary | |
XMLDocumentInfo()
|
Method Summary | |
void |
addFileExt(java.lang.String ext)
Add a file extension for loading/saving this document type |
void |
addHelperHandler(AbstractHelperHandler handler)
Add a new handler |
XMLDocumentInfo |
cloneDocument()
|
java.awt.Color |
getBackgroundColorForPrefix(java.lang.String prefixName)
|
java.awt.Color |
getColorForAttribute(java.lang.String attributeName)
|
java.awt.Color |
getColorForPrefix(java.lang.String prefixName)
|
java.awt.Color |
getColorForTag(java.lang.String tagName)
|
java.lang.String |
getCurrentDocumentLocation()
|
java.lang.Object |
getCurrentDocumentLocationArg()
|
java.lang.String |
getDefaultDocument()
|
java.lang.String |
getDefaultDTDLocation()
|
java.lang.String |
getDefaultDTDRoot()
|
java.net.URL |
getDefaultDTDURL()
|
java.lang.String |
getDefaultFileExt()
|
java.lang.String |
getDefaultNamespace()
|
java.lang.String |
getDefaultNamespacePrefix()
|
java.lang.String |
getDefaultSchemaLocation()
|
java.lang.String |
getDefaultSchemaRoot()
|
java.lang.String |
getDocumentDescription()
|
javax.swing.Icon |
getDocumentIcon()
|
java.lang.String |
getDocumentIconPath()
|
java.lang.String |
getDocumentName()
|
java.lang.String |
getDTDExternalCommentFile()
Special file for using external comment to a dtd. |
javax.swing.filechooser.FileFilter |
getFileFilter()
|
java.util.ArrayList |
getHelperHandlers()
|
java.lang.String |
getId()
|
java.lang.String[] |
getListOfAttributesWithAutoAssistant()
|
java.lang.String |
getOriginalDTDLocation()
Particular case when a mapping is done with the DTD location |
java.lang.String |
getParamValue(java.lang.String paramName)
|
java.lang.String |
getParentType()
|
java.lang.String |
getSchemaValid()
|
java.lang.String[] |
getSupportedFileExt()
|
SystemHelper |
getSystemHelper()
|
java.lang.String |
getSystemHelperClass()
|
java.lang.String |
getTemplate()
|
java.lang.String |
getType()
|
java.lang.String |
getWorkingDirectory()
|
boolean |
hasAutoClosing()
|
boolean |
hasBackgroundColorForPrefix(java.lang.String prefixName)
|
boolean |
hasColorForAttribute(java.lang.String attributeName)
|
boolean |
hasColorForPrefix(java.lang.String prefixName)
|
boolean |
hasColorForTag(java.lang.String tagName)
|
boolean |
hasSyntaxColor()
|
boolean |
hasSyntaxHelper()
|
boolean |
isAssistantAppendMode()
Only when providing a set of handlers with the setHelperHandlers method |
boolean |
isDtdMode()
For DTD coloration |
boolean |
isRealTimeTree()
|
boolean |
isSelectFirstTagAfterReading()
When opening a new document the first element is chosen automatically |
boolean |
isSystemDocument()
|
boolean |
isTreeAvailable()
|
boolean |
matchFileExt(java.lang.String ext)
|
void |
removeFileExt(java.lang.String ext)
Remove this file extension for loading/saving this document type |
void |
setAutoClosing(boolean autoClosing)
Set the auto tag closing feature. |
void |
setBackgroundColorForPrefix(java.lang.String prefixName,
java.awt.Color c)
Choose a particular background color for a tag prefix. |
void |
setColorForAttribute(java.lang.String attributeName,
java.awt.Color c)
Choose a particular color for an attribute. |
void |
setColorForPrefix(java.lang.String prefixName,
java.awt.Color c)
Choose a particular color for a tag prefix. |
void |
setColorForTag(java.lang.String tagName,
java.awt.Color c)
Define a color for this tagName. |
void |
setCurrentDocumentLocation(java.lang.String location)
Reset the current document location |
void |
setCurrentDocumentLocationArg(java.lang.Object arg)
Reset an optional argument for the document location |
void |
setDefaultDocument(java.lang.String doc)
Reset the default document. |
void |
setDefaultDTD(java.lang.String root,
java.lang.String location)
Reset the defaultDTD location for syntax completion |
void |
setDefaultDTD(java.lang.String root,
java.net.URL location)
|
void |
setDefaultFileExt(java.lang.String ext)
Reset the default file ext. |
void |
setDefaultNamespace(java.lang.String namespace)
|
void |
setDefaultSchema(java.lang.String root,
java.lang.String location)
Reset the default schema root and location for syntax completion |
void |
setDocumentDescription(java.lang.String description)
Reset the document description. |
void |
setDocumentIcon(javax.swing.Icon icon)
Reset the document icon |
void |
setDocumentIconPath(java.lang.String iconPath)
Information relative to the current document icon path |
void |
setDTDExternalCommentFile(java.lang.String url)
Special file for using external comment to a dtd. |
void |
setDtdMode(boolean dtdMode)
For DTD coloration |
void |
setHelperHandlers(java.util.ArrayList handlers,
boolean appendMode)
Set specific handlers for the content assistant |
void |
setId(java.lang.String id)
Give an identifier |
void |
setListOfAttributesWithAutoAssistant(java.lang.String[] atts)
Particular usage for asking an assistant automatically when adding an attribute |
void |
setOriginalDTDLocation(java.lang.String dtd)
Particular case when a mapping is done with the DTD location |
void |
setParam(java.lang.String param,
java.lang.String value)
For template usage |
void |
setParamValues(java.util.HashMap params)
Reset parameters for template. |
void |
setParentType(java.lang.String parentType)
Reset a parent type for this document |
void |
setRealTimeTree(boolean realTimeTree)
The real time tree will be available : By default true |
void |
setSchemaValid(java.lang.String schema)
Force a W3C schema validation with this document url |
void |
setSelectFirstTagAfterReading(boolean select)
When opening a new document the first element is chosen automatically |
void |
setSupportedFileExt(java.lang.String[] content)
Reset a set of file extension for this document type |
void |
setSyntaxColor(boolean syntaxColor)
|
void |
setSyntaxHelper(boolean sh)
Reset the syntax helper. |
void |
setSystemDocument(boolean system)
Special flag for multiple document usage |
void |
setSystemHelperClass(java.lang.String helper)
Reset a class name for the system helper |
void |
setTemplate(java.lang.String documentTemplate)
Set a template for this document type |
void |
setTreeAvailable(boolean tree)
The tree will be available for this document |
void |
setType(java.lang.String type)
Reset a known type for this document |
void |
setWorkingDirectory(java.lang.String workingDirectory)
Reset the default working directory. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public java.lang.String originalDTDLocation
public java.util.Hashtable htColorForPrefix
public java.util.Hashtable htBackgroundColorForPrefix
Constructor Detail |
public XMLDocumentInfo()
Method Detail |
public void setDefaultDocument(java.lang.String doc)
doc
- public java.lang.String getDefaultDocument()
public void setSystemDocument(boolean system)
public boolean isSystemDocument()
public void setParamValues(java.util.HashMap params)
params
- Set of parameters : name & valuepublic void setParam(java.lang.String param, java.lang.String value)
public java.lang.String getParamValue(java.lang.String paramName)
public boolean matchFileExt(java.lang.String ext)
true
if this document matched this file extentionpublic void addFileExt(java.lang.String ext)
public void removeFileExt(java.lang.String ext)
public void setDefaultFileExt(java.lang.String ext)
ext
- Default file extensionpublic java.lang.String getDefaultFileExt()
public java.lang.String[] getSupportedFileExt()
public void setSupportedFileExt(java.lang.String[] content)
public javax.swing.filechooser.FileFilter getFileFilter()
public void setDocumentDescription(java.lang.String description)
public java.lang.String getDocumentDescription()
public void setDefaultSchema(java.lang.String root, java.lang.String location)
public java.lang.String getDefaultSchemaLocation()
public java.lang.String getDefaultSchemaRoot()
public void setDefaultDTD(java.lang.String root, java.net.URL location)
public void setDefaultDTD(java.lang.String root, java.lang.String location)
public void setOriginalDTDLocation(java.lang.String dtd)
public java.lang.String getOriginalDTDLocation()
public java.lang.String getDefaultDTDLocation()
public java.net.URL getDefaultDTDURL()
public java.lang.String getDefaultDTDRoot()
public void setWorkingDirectory(java.lang.String workingDirectory)
workingDirectory
- public java.lang.String getWorkingDirectory()
public void setCurrentDocumentLocation(java.lang.String location)
public java.lang.String getCurrentDocumentLocation()
public void setCurrentDocumentLocationArg(java.lang.Object arg)
public java.lang.Object getCurrentDocumentLocationArg()
public java.lang.String getDocumentName()
public javax.swing.Icon getDocumentIcon()
public void setDocumentIcon(javax.swing.Icon icon)
public void setDocumentIconPath(java.lang.String iconPath)
public java.lang.String getDocumentIconPath()
public void setTemplate(java.lang.String documentTemplate)
public java.lang.String getTemplate()
public void setId(java.lang.String id)
public java.lang.String getId()
public SystemHelper getSystemHelper()
public java.lang.String getSystemHelperClass()
public void setSystemHelperClass(java.lang.String helper)
public void setTreeAvailable(boolean tree)
public boolean isTreeAvailable()
tree
is available. By default to true
public void setRealTimeTree(boolean realTimeTree)
true
public boolean isRealTimeTree()
true
if the real time tree is available for this documentpublic boolean hasSyntaxColor()
true
if an XML syntax color is availablepublic void setSyntaxColor(boolean syntaxColor)
syntaxColor
- define if a XML syntax color is available. By default true
public boolean hasAutoClosing()
true
if the auto tag closing is availablepublic boolean hasSyntaxHelper()
true
if the syntax helper is availablepublic void setSyntaxHelper(boolean sh)
true
public void setAutoClosing(boolean autoClosing)
true
public void setType(java.lang.String type)
public java.lang.String getType()
public void setParentType(java.lang.String parentType)
public java.lang.String getParentType()
public void setHelperHandlers(java.util.ArrayList handlers, boolean appendMode)
handlers
- List of handlersappendMode
- maintain or replace the current assistantspublic boolean isAssistantAppendMode()
setHelperHandlers
method
public java.util.ArrayList getHelperHandlers()
public void addHelperHandler(AbstractHelperHandler handler)
public XMLDocumentInfo cloneDocument()
public java.lang.String getDefaultNamespacePrefix()
public void setDefaultNamespace(java.lang.String namespace)
public java.lang.String getDefaultNamespace()
public boolean isDtdMode()
public void setDtdMode(boolean dtdMode)
public void setSchemaValid(java.lang.String schema)
public java.lang.String getSchemaValid()
public void setSelectFirstTagAfterReading(boolean select)
public boolean isSelectFirstTagAfterReading()
public void setListOfAttributesWithAutoAssistant(java.lang.String[] atts)
public java.lang.String[] getListOfAttributesWithAutoAssistant()
public void setDTDExternalCommentFile(java.lang.String url)
public java.lang.String getDTDExternalCommentFile()
public void setColorForPrefix(java.lang.String prefixName, java.awt.Color c)
null
for removing it
public java.awt.Color getColorForPrefix(java.lang.String prefixName)
public boolean hasColorForPrefix(java.lang.String prefixName)
true
if a color exist for this prefixNamepublic void setBackgroundColorForPrefix(java.lang.String prefixName, java.awt.Color c)
null
for removing it
public java.awt.Color getBackgroundColorForPrefix(java.lang.String prefixName)
public boolean hasBackgroundColorForPrefix(java.lang.String prefixName)
true
if a background color exist for this prefixNamepublic void setColorForTag(java.lang.String tagName, java.awt.Color c)
null
color for removing it
public java.awt.Color getColorForTag(java.lang.String tagName)
public boolean hasColorForTag(java.lang.String tagName)
true
if a custom color exists for this tagNamepublic void setColorForAttribute(java.lang.String attributeName, java.awt.Color c)
null
for removing it
public java.awt.Color getColorForAttribute(java.lang.String attributeName)
public boolean hasColorForAttribute(java.lang.String attributeName)
true
if this attribute has a custom color
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |