|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--org.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.
Inner Class Summary | |
protected class |
XMLEditorDoc.DocCloseAction
|
protected class |
XMLEditorDoc.DocCopyAction
|
protected class |
XMLEditorDoc.DocCutAction
|
protected class |
XMLEditorDoc.DocDeleteNodeAction
|
protected class |
XMLEditorDoc.DocEditNodeAction
|
protected class |
XMLEditorDoc.DocEditTextAction
|
protected class |
XMLEditorDoc.DocPasteAfterAction
|
protected class |
XMLEditorDoc.DocPasteBeforeAction
|
protected class |
XMLEditorDoc.DocPasteIntoAction
|
protected class |
XMLEditorDoc.DocSaveAction
|
protected class |
XMLEditorDoc.DocSaveAsAction
|
Field Summary | |
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.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)
|
void |
addNewNode(MerlotDOMNode parent,
java.lang.String elementname,
MerlotDOMNode sibling,
int action)
|
void |
addUndoableEdit(javax.swing.undo.UndoableEdit e)
|
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)
|
void |
cut(java.awt.event.ActionEvent evt)
|
void |
deleteNodes()
|
org.w3c.dom.Document |
getDocument()
|
DTDCacheEntry |
getDTDCacheEntry()
|
DTDPluginConfig |
getDTDPluginConfig()
|
XMLFile |
getFile()
|
protected javax.swing.Icon |
getFrameIcon()
|
javax.swing.JInternalFrame |
getInternalFrame()
|
DOMTreeTableAdapter |
getTreeTableModel()
|
javax.swing.undo.UndoManager |
getUndoManager()
|
XMLEditorDocUI |
getXMLEditorDocUI()
|
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)
requests a transferable object be pasted |
void |
pasteAfter(int row)
Pastes what's on the clipboard after the given node. |
void |
pasteBefore(int row)
|
void |
pasteInto(int row)
|
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)
|
void |
setDirty(boolean d)
Mark this document to be saved |
protected void |
setupActions()
|
protected void |
setupTree()
Creates the treetable model from the document. |
void |
undo(java.awt.event.ActionEvent evt)
|
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 _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
public XMLEditorDoc(XMLFile f) throws MerlotException
public 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)
public boolean isDirty()
public void propertyChange(java.beans.PropertyChangeEvent evt)
public void setActive(boolean tf)
public 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)
public void copy(java.awt.event.ActionEvent evt)
public void pasteAfter(int row)
public void pasteBefore(int row)
public void pasteInto(int row)
public void paste(java.awt.event.ActionEvent evt)
public void undo(java.awt.event.ActionEvent evt)
public void addNewNode(MerlotDOMNode parent, java.lang.String elementname)
public void addNewNode(MerlotDOMNode parent, java.lang.String elementname, MerlotDOMNode sibling, int action)
public void addUndoableEdit(javax.swing.undo.UndoableEdit e)
public javax.swing.undo.UndoManager getUndoManager()
public void lostOwnership(java.awt.datatransfer.Clipboard cb, java.awt.datatransfer.Transferable t)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |