|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.merlotxml.merlot.XMLEditorDoc
XMLEditorDoc contains information and classes for a single XML file. It provides the actions for a specific document such as cut, copy, paste.
Nested Class Summary | |
protected class |
XMLEditorDoc.CollapseNodeAction
Description of the Class |
protected class |
XMLEditorDoc.DocCloseAction
Description of the Class |
protected class |
XMLEditorDoc.DocCopyAction
Description of the Class |
protected class |
XMLEditorDoc.DocCutAction
Description of the Class |
protected class |
XMLEditorDoc.DocDeleteNodeAction
Description of the Class |
protected class |
XMLEditorDoc.DocEditNodeAction
Description of the Class |
protected class |
XMLEditorDoc.DocEditTextAction
Description of the Class |
protected class |
XMLEditorDoc.DocPasteAfterAction
Description of the Class |
protected class |
XMLEditorDoc.DocPasteBeforeAction
Description of the Class |
protected class |
XMLEditorDoc.DocPasteIntoAction
Description of the Class |
protected class |
XMLEditorDoc.DocSaveAction
Description of the Class |
protected class |
XMLEditorDoc.DocSaveAsAction
Description of the Class |
protected class |
XMLEditorDoc.ExpandNodeAction
Description of the Class |
Field Summary | |
protected javax.swing.Action |
_collapseNodeAction
Description of the Field |
protected javax.swing.Action |
_copyNodeAction
Action for copying node(s) from the document |
protected javax.swing.Action |
_cutNodeAction
Action for cutting node(s) from the document |
protected javax.swing.Action |
_deleteNodeAction
Action to perform when the user deletes a node |
protected boolean |
_docActive
true when this document is the active window in the main frame (actions are enabled) |
protected static int |
_docseq
Sequence which is incremented each time a new document is created. |
protected DOMTreeTableAdapter |
_domTree
This provides the data model mapping DOM to JTreeTableModel |
protected javax.swing.Action |
_editNodeAction
Action to perform when the user chooses to edit a node |
protected javax.swing.Action |
_editTextAction
Action to perform when the user chooses to edit some text |
protected javax.swing.Action |
_expandNodeAction
Description of the Field |
protected javax.swing.JInternalFrame |
_frame
The frame for this document |
protected boolean |
_ok_to_close
variable used while checking if the document needs saved when the user clicks the close box |
protected javax.swing.Action |
_pasteAfterAction
Paste after current node action |
protected javax.swing.Action |
_pasteBeforeAction
Paste before current node action |
protected javax.swing.Action |
_pasteIntoAction
Paste into the current node |
protected java.lang.String |
_title
Title for the document frame |
protected XMLEditorDocUI |
_ui
The user interface class for the document |
protected javax.swing.undo.UndoManager |
_undoManager
The undo manager for document node actions |
protected XMLFile |
_xmlFile
The XML file object for this document |
Fields inherited from interface org.merlotxml.merlot.MerlotConstants |
ACTION_MENU_ACCELERATOR, ACTION_MENU_ICON, ACTION_NAME, ACTION_SHORT_DESCRIPTION, ACTION_SMALL_ICON, AFTER, BEFORE, ERR, INTO, UI, XML |
Constructor Summary | |
XMLEditorDoc()
Default constructor. |
|
XMLEditorDoc(java.io.File f)
Constructor for a document from a File |
|
XMLEditorDoc(XMLFile f)
Constructor from a XMLFile object |
Method Summary | |
void |
addNewNode(MerlotDOMNode parent,
java.lang.String elementname)
Adds a feature to the NewNode attribute of the XMLEditorDoc object |
void |
addNewNode(MerlotDOMNode parent,
java.lang.String elementname,
MerlotDOMNode sibling,
int action)
Adds a feature to the NewNode attribute of the XMLEditorDoc object |
void |
addUndoableEdit(javax.swing.undo.UndoableEdit e)
Adds a feature to the UndoableEdit attribute of the XMLEditorDoc object |
boolean |
checkClose()
returns true if the document window can be closed, false otherwise |
boolean |
closeDocument()
Closes the document unless the document is dirty and the user hits cancel when prompted. |
void |
copy(java.awt.event.ActionEvent evt)
Description of the Method |
void |
cut(java.awt.event.ActionEvent evt)
Description of the Method |
void |
deleteNodes()
Description of the Method |
org.w3c.dom.Document |
getDocument()
Gets the document attribute of the XMLEditorDoc object |
DTDCacheEntry |
getDTDCacheEntry()
Gets the dTDCacheEntry attribute of the XMLEditorDoc object |
DTDPluginConfig |
getDTDPluginConfig()
Gets the dTDPluginConfig attribute of the XMLEditorDoc object |
XMLFile |
getFile()
Gets the file attribute of the XMLEditorDoc object |
protected javax.swing.Icon |
getFrameIcon()
Gets the frameIcon attribute of the XMLEditorDoc object |
javax.swing.JInternalFrame |
getInternalFrame()
Gets the internalFrame attribute of the XMLEditorDoc object |
DOMTreeTableAdapter |
getTreeTableModel()
Gets the treeTableModel attribute of the XMLEditorDoc object |
javax.swing.undo.UndoManager |
getUndoManager()
Gets the undoManager attribute of the XMLEditorDoc object |
ValidationThread |
getValidationThread()
|
XMLEditorDocUI |
getXMLEditorDocUI()
Gets the xMLEditorDocUI attribute of the XMLEditorDoc object |
protected void |
init()
Setup the ui and the internal frame stuff |
boolean |
isDirty()
returns true if this document is marked as dirty (needs saved) |
void |
lostOwnership(java.awt.datatransfer.Clipboard cb,
java.awt.datatransfer.Transferable t)
for implementing the ClipboardOwner interface |
void |
paste(java.awt.event.ActionEvent evt)
Description of the Method |
void |
pasteAfter(int row)
Pastes what's on the clipboard after the given node. |
void |
pasteBefore(int row)
Description of the Method |
void |
pasteInto(int row)
Description of the Method |
void |
propertyChange(java.beans.PropertyChangeEvent evt)
Get property change event for dirty attribute and enable/disable actions depending on the dirty attribute |
boolean |
saveDocument()
Saves the document in the current file. |
boolean |
saveDocumentAs()
Save a new document, or save the document under a new name. |
void |
setActive(boolean tf)
Sets the active attribute of the XMLEditorDoc object |
void |
setDirty(boolean d)
Mark this document to be saved |
protected void |
setupActions()
Description of the Method |
protected void |
setupTree()
Creates the treetable model from the document. |
void |
undo(java.awt.event.ActionEvent evt)
Description of the Method |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
protected XMLFile _xmlFile
protected XMLEditorDocUI _ui
protected DOMTreeTableAdapter _domTree
protected javax.swing.JInternalFrame _frame
protected boolean _ok_to_close
protected static int _docseq
protected java.lang.String _title
protected javax.swing.Action _editNodeAction
protected javax.swing.Action _expandNodeAction
protected javax.swing.Action _collapseNodeAction
protected javax.swing.Action _editTextAction
protected javax.swing.Action _deleteNodeAction
protected javax.swing.Action _cutNodeAction
protected javax.swing.Action _copyNodeAction
protected javax.swing.Action _pasteBeforeAction
protected javax.swing.Action _pasteAfterAction
protected javax.swing.Action _pasteIntoAction
protected javax.swing.undo.UndoManager _undoManager
protected boolean _docActive
Constructor Detail |
public XMLEditorDoc(java.io.File f) throws MerlotException
f
- Description of the Parameter
MerlotException
- Description of the Exceptionpublic XMLEditorDoc(XMLFile f) throws MerlotException
f
- Description of the Parameter
MerlotException
- Description of the Exceptionpublic XMLEditorDoc()
Method Detail |
protected void init()
protected void setupActions()
protected void setupTree()
public XMLEditorDocUI getXMLEditorDocUI()
protected javax.swing.Icon getFrameIcon()
public void setDirty(boolean d)
d
- The new dirty valuepublic boolean isDirty()
public void propertyChange(java.beans.PropertyChangeEvent evt)
propertyChange
in interface java.beans.PropertyChangeListener
evt
- Description of the Parameterpublic void setActive(boolean tf)
tf
- The new active valuepublic DOMTreeTableAdapter getTreeTableModel()
public javax.swing.JInternalFrame getInternalFrame()
public XMLFile getFile()
public org.w3c.dom.Document getDocument()
public DTDCacheEntry getDTDCacheEntry()
public DTDPluginConfig getDTDPluginConfig()
public boolean saveDocument()
public boolean saveDocumentAs()
public boolean checkClose()
public boolean closeDocument()
public void deleteNodes()
public void cut(java.awt.event.ActionEvent evt)
cut
in interface MerlotTransferableListener
evt
- Description of the Parameterpublic void copy(java.awt.event.ActionEvent evt)
copy
in interface MerlotTransferableListener
evt
- Description of the Parameterpublic void pasteAfter(int row)
row
- Description of the Parameterpublic void pasteBefore(int row)
row
- Description of the Parameterpublic void pasteInto(int row)
row
- Description of the Parameterpublic void paste(java.awt.event.ActionEvent evt)
paste
in interface MerlotTransferableListener
evt
- Description of the Parameterpublic void undo(java.awt.event.ActionEvent evt)
evt
- Description of the Parameterpublic void addNewNode(MerlotDOMNode parent, java.lang.String elementname)
parent
- The feature to be added to the NewNode attributeelementname
- The feature to be added to the NewNode attributepublic void addNewNode(MerlotDOMNode parent, java.lang.String elementname, MerlotDOMNode sibling, int action)
parent
- The feature to be added to the NewNode attributeelementname
- The feature to be added to the NewNode attributesibling
- The feature to be added to the NewNode attributeaction
- The feature to be added to the NewNode attributepublic void addUndoableEdit(javax.swing.undo.UndoableEdit e)
e
- The feature to be added to the UndoableEdit attributepublic javax.swing.undo.UndoManager getUndoManager()
public void lostOwnership(java.awt.datatransfer.Clipboard cb, java.awt.datatransfer.Transferable t)
lostOwnership
in interface java.awt.datatransfer.ClipboardOwner
cb
- Description of the Parametert
- Description of the Parameterpublic ValidationThread getValidationThread()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |