|
SMACS | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjava.awt.Component
java.awt.Container
java.awt.Window
java.awt.Frame
javax.swing.JFrame
smacs.xngr.browser.editor.Editor
The editor for an eXchaNGeR document.
| Nested Class Summary | |
class |
Editor.XmlEditor
|
| Nested classes inherited from class javax.swing.JFrame |
JFrame.AccessibleJFrame |
| Nested classes inherited from class java.awt.Frame |
Frame.AccessibleAWTFrame |
| Nested classes inherited from class java.awt.Window |
Window.AccessibleAWTWindow |
| Nested classes inherited from class java.awt.Container |
Container.AccessibleAWTContainer |
| Nested classes inherited from class java.awt.Component |
Component.AccessibleAWTComponent, Component.BltBufferStrategy, Component.FlipBufferStrategy |
| Field Summary |
| Fields inherited from class javax.swing.JFrame |
accessibleContext, EXIT_ON_CLOSE, rootPane, rootPaneCheckingEnabled |
| Fields inherited from class java.awt.Frame |
CROSSHAIR_CURSOR, DEFAULT_CURSOR, E_RESIZE_CURSOR, HAND_CURSOR, ICONIFIED, MAXIMIZED_BOTH, MAXIMIZED_HORIZ, MAXIMIZED_VERT, MOVE_CURSOR, N_RESIZE_CURSOR, NE_RESIZE_CURSOR, NORMAL, NW_RESIZE_CURSOR, S_RESIZE_CURSOR, SE_RESIZE_CURSOR, SW_RESIZE_CURSOR, TEXT_CURSOR, W_RESIZE_CURSOR, WAIT_CURSOR |
| Fields inherited from class java.awt.Component |
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT |
| Fields inherited from interface javax.swing.WindowConstants |
DISPOSE_ON_CLOSE, DO_NOTHING_ON_CLOSE, HIDE_ON_CLOSE |
| Fields inherited from interface java.awt.image.ImageObserver |
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH |
| Constructor Summary | |
Editor(EditorExplorer explorer,
EditorProperties props,
ExchangerDocument document)
Constructs an editor for the document. |
|
| Method Summary | |
void |
caretUpdate(CaretEvent e)
Messaged when the selection in the editor has changed. |
boolean |
close()
Close the editor.... |
void |
commentSelectedText()
Comments the selected text. |
void |
documentDeleted(XDocumentEvent event)
This method is called when the document has been deleted from the location on disk. |
void |
documentUpdated(XDocumentEvent event)
This method is called when the document has been updated on disk, either by a save on the document, or externally. |
void |
format()
|
ExchangerDocument |
getDocument()
Returns the document. |
XmlEditorPane |
getEditor()
Returns the editor pane. |
EditorProperties |
getProperties()
Returns the editor properties. |
int |
getSpacesForTab()
returns the number of spaces used to substitute the Tab character. |
String |
getTabString()
returns the string representation of the tab character. |
void |
gotoLine(int line)
Goto the start of a specific line in the document. |
void |
indentSelectedText(boolean tab)
Indents the selected text. |
boolean |
isValidate()
Should the validation happen against the DTD as referenced in the DOCTYPE element. |
void |
load()
|
void |
redo()
Redos a previous undo. |
void |
save()
Save the information in the editor to a file.... |
void |
saveAs(File file)
Save the information in the editor to a different file.... |
void |
search(String search,
boolean matchCase,
boolean down)
Do a search in the XML text. |
void |
setPreferredFont(Font font)
|
void |
setStatus(int line,
String error)
|
void |
setWait(boolean enabled)
Sets the wait cursor on the editor frame. |
void |
tagSelectedText(String name)
Tags the selected text. |
void |
undo()
Undos a previous undoable edit. |
void |
undoableEditHappened(UndoableEditEvent e)
Messaged when the Document has created an edit, the edit is added to undo, an instance of UndoManager. |
void |
unindentSelectedText()
Unindents the selected text. |
void |
validateXml()
Validates the XML in this editor. |
| Methods inherited from class java.awt.Frame |
addNotify, finalize, getCursorType, getExtendedState, getFrames, getIconImage, getMaximizedBounds, getMenuBar, getState, getTitle, isResizable, isUndecorated, remove, removeNotify, setCursor, setExtendedState, setIconImage, setMaximizedBounds, setMenuBar, setResizable, setState, setTitle, setUndecorated |
| Methods inherited from class java.lang.Object |
clone, equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface java.awt.MenuContainer |
getFont, postEvent |
| Constructor Detail |
public Editor(EditorExplorer explorer,
EditorProperties props,
ExchangerDocument document)
explorer - the documents explorer.props - the properties for the editor.document - the document to be edited.| Method Detail |
public void setPreferredFont(Font font)
setPreferredFont in interface ExplorerViewerpublic boolean isValidate()
public XmlEditorPane getEditor()
public void search(String search,
boolean matchCase,
boolean down)
search - the text to search for.matchCase - should the search match the case.down - down/upward from caret the position.public boolean close()
close in interface ExplorerViewer
public void save()
throws IOException,
SAXParseException
IOException
SAXParseExceptionpublic ExchangerDocument getDocument()
public void saveAs(File file)
throws IOException
file - the url for the document.
IOExceptionpublic void gotoLine(int line)
line - the line to go to.public void tagSelectedText(String name)
name - the name of the tag.public void commentSelectedText()
public void unindentSelectedText()
public void indentSelectedText(boolean tab)
tab - when true the tab key is used as indentation.
public void validateXml()
throws SAXParseException,
IOException
SAXParseException
IOExceptionpublic void undo()
public void redo()
public EditorProperties getProperties()
public String getTabString()
public void setWait(boolean enabled)
enabled - true when wait is enabled.public int getSpacesForTab()
public void format()
throws SAXParseException,
IOException
SAXParseException
IOException
public void load()
throws IOException
IOException
public void setStatus(int line,
String error)
public void undoableEditHappened(UndoableEditEvent e)
undo, an instance of UndoManager.
undoableEditHappened in interface UndoableEditListenerpublic void caretUpdate(CaretEvent e)
caretUpdate in interface CaretListenerpublic void documentUpdated(XDocumentEvent event)
XDocumentListener
documentUpdated in interface XDocumentListenerevent - the document event fired.public void documentDeleted(XDocumentEvent event)
XDocumentListener
documentDeleted in interface XDocumentListenerevent - the document event fired.
|
SMACS | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||