|
|||||||||
| Home >> All >> com >> robrohan >> [ editorkit overview ] | PREV CLASS NEXT CLASS | ||||||||
SUMMARY: JAVADOC | SOURCE | DOWNLOAD | NESTED | FIELD | CONSTR | METHOD |
DETAIL: FIELD | CONSTR | METHOD | ||||||||
com.robrohan.editorkit
Class XMLEditorPane

java.lang.Objectjava.awt.Component
java.awt.Container
javax.swing.JComponent
org.syntax.jedit.JEditTextArea
com.robrohan.editorkit.XMLEditorPane
- All Implemented Interfaces:
- java.util.EventListener, java.awt.image.ImageObserver, java.awt.MenuContainer, java.io.Serializable, javax.swing.event.UndoableEditListener
- Direct Known Subclasses:
- XMLEditorPaneDnD
- public class XMLEditorPane
- extends org.syntax.jedit.JEditTextArea
- implements javax.swing.event.UndoableEditListener
- extends org.syntax.jedit.JEditTextArea
this is the main component for entering text (xml or xslt)
| Nested Class Summary | |
(package private) class |
XMLEditorPane.AnalyzeHandler
|
(package private) class |
XMLEditorPane.AnalyzeParser
|
(package private) class |
XMLEditorPane.commentSection
|
(package private) class |
XMLEditorPane.errorHandler
|
(package private) class |
XMLEditorPane.fileProperties
|
(package private) class |
XMLEditorPane.goToLine
|
(package private) class |
XMLEditorPane.loadFileAction
|
(package private) class |
XMLEditorPane.redoAction
|
(package private) class |
XMLEditorPane.saveAsFileAction
|
(package private) class |
XMLEditorPane.saveFileAction
|
(package private) class |
XMLEditorPane.undoAction
|
(package private) class |
XMLEditorPane.validateAction
|
| Nested classes inherited from class org.syntax.jedit.JEditTextArea |
|
| Nested classes inherited from class javax.swing.JComponent |
javax.swing.JComponent.AccessibleJComponent |
| Nested classes inherited from class java.awt.Container |
java.awt.Container.AccessibleAWTContainer |
| Nested classes inherited from class java.awt.Component |
java.awt.Component.AccessibleAWTComponent, java.awt.Component.BltBufferStrategy, java.awt.Component.FlipBufferStrategy |
| Field Summary | |
(package private) java.util.Hashtable |
actionHash
all the actions this pane can have |
private java.io.File |
currentFile
the file this pane has loaded |
java.lang.String |
encodingtype
encoding type for this pane |
(package private) javax.swing.JFileChooser |
fileChooser
|
(package private) com.robrohan.treebeard.LoadFile |
fileLoader
handle to the file loader (used to get files from the web or disk) |
private boolean |
fileReferenced
flag to say if the xml file is in the pane or just referenced on disk |
private javax.swing.ImageIcon |
load_icon
the icons |
XMLEditorPane |
panePtr
pointer to this pane (used in inner classes) |
private javax.swing.ImageIcon |
redo_icon
the icons |
(package private) javax.swing.JPopupMenu |
rmenu
the right click menu (context menu) |
private javax.swing.ImageIcon |
save_icon
the icons |
java.lang.String |
SAXFactory
the SAXFactory to use (set by caller) |
private javax.swing.Timer |
timer
|
javax.swing.undo.UndoManager |
undo
for pane undos |
private javax.swing.ImageIcon |
undo_icon
the icons |
java.lang.String |
valErrors
any validation errors will be bubbled up to the container |
| Fields inherited from class org.syntax.jedit.JEditTextArea |
biasLeft, blink, BOTTOM, bracketLine, bracketPosition, caretBlinks, caretEvent, caretTimer, caretVisible, CENTER, document, documentHandler, editable, electricScroll, firstLine, focusedComponent, horizontal, horizontalOffset, inputHandler, LEFT_OF_SCROLLBAR, lineSegment, listenerList, magicCaret, overwrite, painter, popup, rectSelect, RIGHT, scrollBarsInitialized, selectionEnd, selectionEndLine, selectionStart, selectionStartLine, vertical, visibleLines |
| Fields inherited from class javax.swing.JComponent |
accessibleContext, TOOL_TIP_TEXT_KEY, ui, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOW |
| Fields inherited from class java.awt.Container |
|
| Fields inherited from class java.awt.Component |
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT |
| Fields inherited from interface java.awt.image.ImageObserver |
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH |
| Constructor Summary | |
XMLEditorPane(java.lang.String type)
Creates a new instance of XMLEditorPane |
|
| Method Summary | |
void |
addKeyword(java.lang.String keyword,
byte type)
add a keyword to the keyword list (in tokenmarker) and set the type heavly tied to jedit |
void |
createNewDocument(java.lang.String contenttype)
Creates a new document and sets a syntax highlighting type |
void |
createNewDocument(java.lang.String contenttype,
java.lang.String defaultText)
Creates a new document, sets a syntax highlighting type, and adds default text |
void |
doAnalyze()
parse the textAreas contents and look for namespaces. |
void |
doValidate()
Validates this panes contents. |
java.io.File |
getCurrentFile()
gets the current file |
javax.swing.Action |
getLoadAction()
Gets a handle to the load action to envoke loads from outside the class |
javax.swing.Action |
getRedoAction()
Gets a handle to the redo action to envoke redos from outside the class |
javax.swing.Action |
getSaveAction()
Gets a handle to the save action to envoke saves from outside the class |
javax.swing.Action |
getSaveAsAction()
Gets a handle to the saveas action to envoke saveas' from outside the class |
javax.swing.Action |
getUndoAction()
Gets a handle to the undo action to envoke undos from outside the class |
private java.lang.String |
guessFileType(java.lang.String filename)
|
boolean |
isKeywordAdded(java.lang.String keyword)
checks to see if a keyword is already listed in the TokenMarker this is crazy, but it works |
boolean |
isReferenced()
to tell if the file is loaded into this pane, or just referenced. |
void |
killAnalyzer()
kill the analyzer (looking for namespaces and such) |
protected void |
loadFile(java.io.File file)
|
void |
openFile(java.lang.String title)
Envokes the loadFile dialog and then trys to open the file from the fileLoader dialog box. |
void |
processMouseEvent(java.awt.event.MouseEvent e)
envokes the right click menu (context menu) |
private void |
save()
|
void |
saveAs()
Envokes the saveas dialog to save this panes contents to disk |
private void |
saveFile(java.io.File file)
|
private void |
setPage(java.lang.String URI)
|
void |
setText(java.io.InputStream iso)
Set this panes text from an input stream |
void |
stopAnalyzer()
top the analyzer from parsing the textArea (looking for namespaces and such) |
private void |
tellMessage(java.lang.String message)
|
void |
undoableEditHappened(javax.swing.event.UndoableEditEvent a)
Adds an undo event to the undo tracker |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
actionHash
java.util.Hashtable actionHash
- all the actions this pane can have
rmenu
javax.swing.JPopupMenu rmenu
- the right click menu (context menu)
fileLoader
com.robrohan.treebeard.LoadFile fileLoader
- handle to the file loader (used to get files from the web or disk)
fileChooser
javax.swing.JFileChooser fileChooser
SAXFactory
public java.lang.String SAXFactory
- the SAXFactory to use (set by caller)
undo
public javax.swing.undo.UndoManager undo
- for pane undos
currentFile
private java.io.File currentFile
- the file this pane has loaded
valErrors
public java.lang.String valErrors
- any validation errors will be bubbled up to the container
load_icon
private javax.swing.ImageIcon load_icon
- the icons
save_icon
private javax.swing.ImageIcon save_icon
- the icons
undo_icon
private javax.swing.ImageIcon undo_icon
- the icons
redo_icon
private javax.swing.ImageIcon redo_icon
- the icons
fileReferenced
private boolean fileReferenced
- flag to say if the xml file is in the pane or just referenced on disk
encodingtype
public java.lang.String encodingtype
- encoding type for this pane
panePtr
public final XMLEditorPane panePtr
- pointer to this pane (used in inner classes)
timer
private javax.swing.Timer timer
| Constructor Detail |
XMLEditorPane
public XMLEditorPane(java.lang.String type)
- Creates a new instance of XMLEditorPane
| Method Detail |
createNewDocument
public void createNewDocument(java.lang.String contenttype)
- Creates a new document and sets a syntax highlighting type
createNewDocument
public void createNewDocument(java.lang.String contenttype, java.lang.String defaultText)
- Creates a new document, sets a syntax highlighting type, and adds default text
setText
public void setText(java.io.InputStream iso)
- Set this panes text from an input stream
getCurrentFile
public java.io.File getCurrentFile()
- gets the current file
undoableEditHappened
public void undoableEditHappened(javax.swing.event.UndoableEditEvent a)
- Adds an undo event to the undo tracker
- Specified by:
undoableEditHappenedin interfacejavax.swing.event.UndoableEditListener
getUndoAction
public javax.swing.Action getUndoAction()
- Gets a handle to the undo action to envoke undos from outside the class
getRedoAction
public javax.swing.Action getRedoAction()
- Gets a handle to the redo action to envoke redos from outside the class
getSaveAction
public javax.swing.Action getSaveAction()
- Gets a handle to the save action to envoke saves from outside the class
getSaveAsAction
public javax.swing.Action getSaveAsAction()
- Gets a handle to the saveas action to envoke saveas' from outside the class
getLoadAction
public javax.swing.Action getLoadAction()
- Gets a handle to the load action to envoke loads from outside the class
tellMessage
private void tellMessage(java.lang.String message)
processMouseEvent
public void processMouseEvent(java.awt.event.MouseEvent e)
- envokes the right click menu (context menu)
stopAnalyzer
public void stopAnalyzer()
- top the analyzer from parsing the textArea
(looking for namespaces and such)
killAnalyzer
public void killAnalyzer()
- kill the analyzer (looking for namespaces and such)
doValidate
public void doValidate()
- Validates this panes contents. This function uses the currently select
xml parser so if it does not do validation, this will not do anything.
It will write any errors to the valErrors String
doAnalyze
public void doAnalyze()
- parse the textAreas contents and look for namespaces. This will be used
in codecompletion / insite stuff eventually
isKeywordAdded
public boolean isKeywordAdded(java.lang.String keyword)
- checks to see if a keyword is already listed in the TokenMarker
this is crazy, but it works
addKeyword
public void addKeyword(java.lang.String keyword, byte type)
- add a keyword to the keyword list (in tokenmarker) and set the type
heavly tied to jedit
openFile
public void openFile(java.lang.String title)
- Envokes the loadFile dialog and then trys to open the file from the
fileLoader dialog box. Can load either a file off disk or from an
http(s) address.
isReferenced
public boolean isReferenced()
- to tell if the file is loaded into this pane, or just referenced.
setPage
private void setPage(java.lang.String URI)
loadFile
protected void loadFile(java.io.File file)
guessFileType
private java.lang.String guessFileType(java.lang.String filename)
save
private void save()
saveAs
public void saveAs()
- Envokes the saveas dialog to save this panes contents to disk
saveFile
private void saveFile(java.io.File file)
|
|||||||||
| Home >> All >> com >> robrohan >> [ editorkit overview ] | PREV CLASS NEXT CLASS | ||||||||
SUMMARY: JAVADOC | SOURCE | DOWNLOAD | NESTED | FIELD | CONSTR | METHOD |
DETAIL: FIELD | CONSTR | METHOD | ||||||||
JAVADOC