|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnet.sourceforge.jsxe.dom.XMLDocument
net.sourceforge.jsxe.DocumentBuffer
The DocumentBuffer class implements application specific properties of an XML document.
Field Summary | |
static int |
DIRTY
A status that indicates the file is dirty. |
Fields inherited from class net.sourceforge.jsxe.dom.XMLDocument |
ENCODING, FORMAT_XML, INDENT, IS_USING_SOFT_TABS, IS_VALIDATING, LINE_SEPARATOR, WS_IN_ELEMENT_CONTENT |
Method Summary | |
void |
addDocumentBufferListener(DocumentBufferListener listener)
Adds a listener to this document buffer that is notified when the buffer is changed. |
boolean |
close(TabbedView view,
boolean confirmClose)
Performs closing tasks. |
boolean |
equalsOnDisk(DocumentBuffer buffer)
Indicates if the DocumentBuffer given represents the same file on disk as the file used by this DocumentBuffer. |
boolean |
equalsOnDisk(File file)
Indicates if the file given is the same file on disk as the file used by this DocumentBuffer are the same file on disk. |
protected void |
fireStructureChanged(AdapterNode location)
Called when the structure of the document has changed. |
File |
getFile()
Gets the File for this DocumentBuffer. |
String |
getName()
Gets the name of the buffer. |
OptionPane |
getOptionPane()
Gets the pane for editing options for this DocumentBuffer. |
boolean |
getStatus(int statusType)
Gets a status for the DocumentBuffer, such as if it is dirty. |
boolean |
isUntitled()
Gets whether this DocumentBuffer is untitled. |
boolean |
reload(TabbedView view)
Reloads the file for this DocumentBuffer. |
void |
removeDocumentBufferListener(DocumentBufferListener listener)
Removes a listener from this buffer. |
boolean |
save(TabbedView view)
Saves the document buffer to disk in the current file. |
boolean |
saveAs(TabbedView view)
Displays a save dialog that the user uses to chose a file to save to and saves the document to it. |
boolean |
saveAs(TabbedView view,
File file)
Saves the document to the given file. |
Methods inherited from class net.sourceforge.jsxe.dom.XMLDocument |
addXMLDocumentListener, checkWellFormedness, entityDeclared, getAdapterNode, getAllowedEntities, getCompletionInfoMappings, getDocType, getDocumentCopy, getElementDecl, getEntityDecl, getErrors, getLength, getProperties, getProperty, getProperty, getRootElementNode, getSegment, getText, getURI, insertText, isValid, isWellFormed, newAdapterNode, newAdapterNode, parseDocument, parseWithoutUpdate, removeText, removeXMLDocumentListener, serialize, serializeNodeToString, setEntityResolver, setModel, setProperty, setURI |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static final int DIRTY
Method Detail |
public boolean close(TabbedView view, boolean confirmClose) throws IOException
view
- the view that initiated the closeconfirmClose
- true if the user is to confirm save
IOException
- if the user chooses to save and the file could not be savedpublic void addDocumentBufferListener(DocumentBufferListener listener)
listener
- the listener that is notified when the buffer is changedpublic void removeDocumentBufferListener(DocumentBufferListener listener)
listener
- the listener to removepublic String getName()
public File getFile()
public boolean getStatus(int statusType)
public boolean isUntitled()
public boolean reload(TabbedView view) throws IOException
view
- the view that requested the reload operation
IOException
public boolean save(TabbedView view) throws IOException
view
- the TabbedView that made this save request
IOException
- if the document could not be written due to an I/O
error.public boolean saveAs(TabbedView view) throws IOException
view
- the view that made the save request.
IOException
- if the document could not be written due to an I/O
error.public boolean saveAs(TabbedView view, File file) throws IOException
view
- the TabbedView that requested this savefile
- the file to save the document to.
IOException
- if the document could not be written due to an I/O
error.public boolean equalsOnDisk(File file) throws IOException
file
- the File to compare this DocumentBuffer's file against
IOException
- if the files cannot be compared due to an I/O errorpublic boolean equalsOnDisk(DocumentBuffer buffer) throws IOException
IOException
- if the files cannot be compared due to an I/O errorpublic OptionPane getOptionPane()
protected void fireStructureChanged(AdapterNode location)
XMLDocument
fireStructureChanged
in class XMLDocument
location
- the location of the change. null if unknown
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |