|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.awt.Component
java.awt.Container
javax.swing.JComponent
javax.swing.JPanel
com.japisoft.xmlpad.XMLContainer
This is the main component for the XMLEditor. This container manages a
toolbar thanks to the ToolBarModel
, a tree for real time
tree location and a minimal status bar. It contains also the main
editor. As a split function is supported, 2 editors are managed. The current
one is always available by the getEditor
method.
User can know the current documeent location and state with the LocationListener
and
DocumentStateListener
. It is possible to disable the default status bar to
use your own by calling setStatusBarAvailable( false )
. The same thing for the error panel
by calling setErrorPanelAvailable( false )
.
If you have an external toolBar, you must disable the default one by calling setToolBarAvailable(false)
If you wish the custom the default popups content or the default toolBar content, use the PopupModel or the ToolBarModel
It is advised to use such model only if you want to use several editors with non common action. On the
contrary managed it inside the ActionModel.
myContainer.getToolBarModel().addAction( myAction )
or
myContainer.getPopupModel().addAction( myAction )
or
myContainer.getTreePopupModel().addAction( myTreeAction )
You can act on the default indentation for tab/untab and the FormatAction by calling
// Reset the indentation size
ActionModel.setProperty( ActionModel.FORMAT_ACTION,
Properties.INDENT_SIZE_PROPERTY, new Integer( 1 ) );
// Reset the indentation character
ActionModel.setProperty( ActionModel.FORMAT_ACTION,
Properties.INDENT_CHAR_PROPERTY, new Character( '\t' ) );
`
An ElementView is a way to show any tree element node. This ElementView can be customized
by implanting the ElementView interface and calling the setElementView from the XMLContainer
before showing it. You can remove the default ElementView calling setElementView( null )
on your XMLContainer instance. This ElementView can be editable or non editable, by default the
element view is editable, however you can disable it calling from your XMLContainer instance
getElementView().setEditable( false )
.
usage samples :
// Simple usage JJFrame frame = new JFrame(); XMLContainer container = new XMLContainer(); container.getAccessibility().setText( "<?version='1.0'?> <test> </test>" ); frame.getContentPane().add( container )
// Load a known XMLfile XMLContainer container = new XMLContainer(); container.getAccessibility().read( new FileReader( "myFile.xml" ) ); frame.getContentPane().add( container )
// JInternal frame usage JInternalFrame editorFrameOne = new JInternalFrame(); // This constructor avoids XMLContainer for freeing automatically its inner reference editor1 = new XMLContainer( false ); editorFrameOne.getContentPane().add( editor1 );
// Using a theme com.japisoft.xmlpad.look.themes.BlueTheme.install(); JFrame fr = new JFrame(); fr.getContentPane().add( new XMLContainer() );
Please consult JAPISoft site and forum for API news and forum : http://www.japisoft.com
JPanel
,
LocationListener
,
DocumentStateLeistener
,
ToolBarModel
,
Serialized FormNested Class Summary |
Nested classes inherited from class javax.swing.JComponent |
javax.swing.JComponent.AccessibleJComponent |
Field Summary |
Fields inherited from class javax.swing.JComponent |
TOOL_TIP_TEXT_KEY, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOW |
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 | |
XMLContainer()
Create a new XMLContainer, all components are created by the default ComponentFactory |
|
XMLContainer(boolean autoDisposeMode)
Create a new XMLContainer. if autoDisposeMode is false, XMLContainer will free no resource automatically. |
Method Summary | |
void |
addDocumentStateListener(DocumentStateListener listener)
Add listener for document parsing state : error or not |
void |
addLocationListener(LocationListener listener)
Deprecated. Use setLocationListener |
void |
addNavigationHistoryPath(java.lang.String path)
Store a new navigation XPath value. |
void |
addNotify()
This method call the init method for connection listeners to components |
void |
cleanNavigationHistoryPath()
Reset the navigation path |
void |
dispose()
Remove all listeners/component connection. |
boolean |
editNode()
Edit the current node with the EditorModel API. |
boolean |
editNode(com.japisoft.fastparser.node.SimpleNode currentNode)
Edit the provided node with the EditorModel API. |
Accessibility |
getAccessibility()
|
java.lang.String |
getCurrentDocumentLocation()
|
java.lang.String |
getCurrentDTD()
|
java.lang.String |
getCurrentDTDRoot()
|
javax.swing.JPopupMenu |
getCurrentPopup()
|
java.lang.String |
getCurrentSchema()
|
java.lang.String |
getCurrentSchemaRoot()
|
javax.swing.JPopupMenu |
getCurrentTreePopup()
|
java.lang.String |
getDefaultDTDLocation()
|
java.lang.String |
getDefaultDTDRoot()
|
java.lang.String |
getDefaultSchemaLocation()
|
java.lang.String |
getDefaultSchemaRoot()
|
XMLDocument |
getDocument()
|
XMLDocumentInfo |
getDocumentInfo()
|
XMLIntegrity |
getDocumentIntegrity()
|
java.lang.String |
getDTDLocation(boolean resolve)
|
DTDMapper |
getDTDMapper()
|
XMLEditor |
getEditor()
|
EditorContext |
getEditorContext()
For inner usage only |
ElementView |
getElementView()
|
com.japisoft.fastparser.node.SimpleNode |
getLastDocumentLocation()
|
com.japisoft.fastparser.node.SimpleNode |
getLastNodeParsed()
|
XMLContainer |
getMainContainer()
|
int |
getNavigationHistoryLimit()
|
javax.swing.undo.UndoManager |
getNewUndoRedoManager()
|
PopupModel |
getPopupModel()
User can add/remove dynamically action by acting on this model. |
java.util.Iterator |
getProperties()
|
java.lang.Object |
getProperty(java.lang.String name)
|
java.lang.Object |
getProperty(java.lang.String name,
java.lang.Object def)
|
RealTimeTreeManager |
getRealTimeTreeManager()
|
java.lang.String |
getRelaxNGValidationLocation()
|
java.lang.String |
getSchemaLocation(boolean resolve)
|
XMLContainer |
getSubContainer(java.lang.String type)
|
SyntaxHelper |
getSyntaxHelper()
|
XMLTemplate |
getTemplate()
|
java.lang.String |
getText()
Deprecated. use getAccessibility().getText() |
javax.swing.JToolBar |
getToolBar()
|
ToolBarModel |
getToolBarModel()
User can add/remove dynamically action by acting on this model. |
javax.swing.JTree |
getTree()
|
PopupModel |
getTreePopupModel()
|
javax.swing.JComponent |
getView()
|
boolean |
hasErrorMessage()
|
boolean |
hasSyntaxCompletion()
|
boolean |
hasTextSelection()
|
boolean |
isAutoDisposeMode()
|
boolean |
isAutoFocus()
|
boolean |
isEditable()
By default return true |
boolean |
isEnabledTreeLocation()
Is Enabled the view of the tree location in the status bar ? |
boolean |
isErrorPanelAvailable()
|
boolean |
isPopupAvailable()
|
boolean |
isRealTimeTreeOnTextChange()
|
boolean |
isSplit()
|
boolean |
isStatusBarAvailable()
|
boolean |
isToolBarAvailable()
|
boolean |
isToolBarVisible()
|
boolean |
isTreePopupAvailable()
|
boolean |
isTreeVisible()
|
static void |
main(java.lang.String[] args)
|
java.lang.String |
nextNavigationHistoryPath()
Change the navigation history cursor and return the next navigation path. |
void |
notifyCaretListener(int col,
int line)
Notify to all CaretListener that the current caret location has changed. |
void |
notifyDocumentStateError(java.lang.String message,
int line,
boolean temporary)
Notify all DocumentStateListener about the parsing state: A null value
means no error. |
void |
notifyDocumentVersion(boolean newOne)
Notify that a new document has been inserted or the current one has been altered once. |
void |
notifyLocationListener(LocationEvent event)
Notify to all LocationListener that the current document location has changed. |
void |
paintComponent(java.awt.Graphics gc)
|
java.lang.String |
previousNavigationHistoryPath()
Change the navigation history cursor and return the previous navigation path. |
void |
refreshUndoRedoState()
Update undo/redo button state |
void |
removeDocumentStateListener(DocumentStateListener listener)
Remove a listener |
void |
removeLocationListener(LocationListener listener)
Remove a listener |
void |
removeNavigationHistoryPath(java.lang.String path)
Remove this XPath navigation value. |
void |
removeNotify()
This method calls the dispose method for freeing ressource |
void |
requestFocus()
|
void |
resetDefaultToolBarActions()
Update the toolbarModel adding separator. |
void |
resetEditor(XMLEditor editor)
Particular case for using the good editor with focus. |
void |
resetProperties(java.util.HashMap map)
Reset the inner properties |
boolean |
searchAndParseDTD()
Search inside the current document a DTD and parses it for syntax helper. |
boolean |
searchAndParseSchema()
Search and parse a schema from the current document |
void |
setAutoDisposeMode(boolean disposeMode)
Set JXMLPad in a special mode for freeing internal resource. |
void |
setAutoFocus(boolean autoFocus)
If true when the setText method is called the current editor gets the focus. |
void |
setAutoNewDocument(boolean autoNew)
Decide to initialize the XMLContainer calling the new action. |
void |
setAutoResetAction(boolean autoResetAction)
Here a way to reset all XMLAction from the current XMLEditor focus. |
void |
setCaretListener(CaretListener listener)
Add a listener for giving information about the current caret location |
void |
setColorForAttribute(java.lang.String attribute,
java.awt.Color c)
Choose a particular color for this attribute |
void |
setColorForPrefix(java.lang.String prefix,
java.awt.Color c)
Choose a particular color for this namespace prefix |
void |
setColorForTag(java.lang.String tag,
java.awt.Color c)
Choose a particular color for this tag |
void |
setCurrentDocumentLocation(java.lang.String location)
Reset the current document location. |
void |
setDefaultDTD(java.lang.String dtdRoot,
java.lang.String dtd)
Reset the default document DTD location |
void |
setDefaultSchema(java.lang.String root,
java.lang.String location)
Reset the default schema root tag and document location (url or file path) |
void |
setDocumentInfo(XMLDocumentInfo info)
Reset the current documentation info. |
void |
setDocumentIntegrity(XMLIntegrity integrity)
This objet contains data for avoiding to corrupt the current document. |
void |
setDTD(java.lang.String dtdRoot,
java.lang.String dtdLocation)
Reset the current dtd root and dtd location by this one. |
void |
setDTDMapper(DTDMapper mapper)
Reset a map between URL and local path. |
void |
setEditable(boolean editable)
The document is only readable for true |
void |
setElementView(ElementView view)
Set a view fo visualizing an XML element under the tree. if view is null no view will
be available |
void |
setEnabledRealTimeStructureChanged(boolean support)
Synchronize the tree each time the text has significatif change. |
void |
setEnabledTreeLocation(boolean location)
Enable the view of the tree location in the status bar |
void |
setEnabledTreeLocationForCaret(boolean rt)
Enable the tree selection for each text caret change. |
void |
setErrorPanelAvailable(boolean errorPanel)
Choose to show a minimal panel for each parsing error with a comment line. |
void |
setFocusView(boolean focusView)
|
void |
setLastNodeParsed(com.japisoft.fastparser.node.SimpleNode node)
Provides the last parsed node. |
void |
setLocationListener(LocationListener listener)
Set a listener for giving information about the current document location |
void |
setModifiedState(boolean state)
Update this container state if the document has been changed |
void |
setNavigationHistoryLimit(int limit)
Set the navigation limit. |
void |
setPopableErrorMode(boolean popableErrorMode)
By default to false , this mode will open a dialog box for each parsing error with the
parsing error message |
void |
setPopupAvailable(boolean popupAvailable)
Create a default popup. |
void |
setProperty(java.lang.String name,
java.lang.Object content)
Store a property inside this container. |
void |
setRealTimeTreeOnTextChange(boolean realTimeTreeOnTextChange)
If you use the false value the tree will only be updated for each
return key. |
void |
setRelaxNGValidationLocation(java.lang.String location)
Reset the current RelaxNG document path for validating the current document. |
void |
setSchema(java.lang.String schemaRoot,
java.lang.String schemaLocation)
Reset the current schema location |
void |
setSplit(boolean split)
if true , it will split the current editors in two one
else it will unsplit the two current editors in only one |
void |
setStatusBarAvailable(boolean statusBar)
Choose to show a minimal statusbar with the current location. |
void |
setSyntaxCompletion(boolean syntaxCompletion)
Enabled/Disabled syntax completion. |
void |
setTemplate(XMLTemplate template)
Template for the 'new' operation |
void |
setText(java.lang.String text)
Deprecated. use getAccessibility().setText() |
void |
setToolBarAvailable(boolean toolBarAvailable)
Create a default toolbar. |
void |
setToolBarVisible(boolean toolbarVisible)
Show or hide the default toolbar. |
void |
setTreePopupAvailable(boolean treePopupAvailable)
Reset the tree popup. |
void |
setTreeVisible(boolean treeVisible)
Show or hide the location tree. |
void |
showPopup(java.awt.Component c,
int x,
int y)
Show a popup. |
void |
split()
Split the current editor in two ones or unsplit it |
void |
unsetCaretListener()
Remove a listener |
void |
unsetLocationListener()
Remove a listener |
void |
unSplit()
Show only one editor |
void |
updateNavigationHistoryState()
Update the previous, next action status from the current context |
Methods inherited from class javax.swing.JPanel |
getAccessibleContext, getUI, getUIClassID, setUI, updateUI |
Methods inherited from class javax.swing.JComponent |
addAncestorListener, addPropertyChangeListener, addPropertyChangeListener, addVetoableChangeListener, computeVisibleRect, contains, createToolTip, disable, enable, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getActionForKeyStroke, getActionMap, getAlignmentX, getAlignmentY, getAncestorListeners, getAutoscrolls, getBorder, getBounds, getClientProperty, getConditionForKeyStroke, getDebugGraphicsOptions, getDefaultLocale, getGraphics, getHeight, getInputMap, getInputMap, getInputVerifier, getInsets, getInsets, getListeners, getLocation, getMaximumSize, getMinimumSize, getNextFocusableComponent, getPreferredSize, getPropertyChangeListeners, getPropertyChangeListeners, getRegisteredKeyStrokes, getRootPane, getSize, getToolTipLocation, getToolTipText, getToolTipText, getTopLevelAncestor, getTransferHandler, getVerifyInputWhenFocusTarget, getVetoableChangeListeners, getVisibleRect, getWidth, getX, getY, grabFocus, isDoubleBuffered, isLightweightComponent, isManagingFocus, isMaximumSizeSet, isMinimumSizeSet, isOpaque, isOptimizedDrawingEnabled, isPaintingTile, isPreferredSizeSet, isRequestFocusEnabled, isValidateRoot, paint, paintImmediately, paintImmediately, print, printAll, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removePropertyChangeListener, removePropertyChangeListener, removeVetoableChangeListener, repaint, repaint, requestDefaultFocus, requestFocus, requestFocusInWindow, resetKeyboardActions, reshape, revalidate, scrollRectToVisible, setActionMap, setAlignmentX, setAlignmentY, setAutoscrolls, setBackground, setBorder, setDebugGraphicsOptions, setDefaultLocale, setDoubleBuffered, setEnabled, setFont, setForeground, setInputMap, setInputVerifier, setMaximumSize, setMinimumSize, setNextFocusableComponent, setOpaque, setPreferredSize, setRequestFocusEnabled, setToolTipText, setTransferHandler, setVerifyInputWhenFocusTarget, setVisible, unregisterKeyboardAction, update |
Methods inherited from class java.awt.Container |
add, add, add, add, add, addContainerListener, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getContainerListeners, getFocusTraversalKeys, getFocusTraversalPolicy, getLayout, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusCycleRoot, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paintComponents, preferredSize, printComponents, remove, remove, removeAll, removeContainerListener, setFocusCycleRoot, setFocusTraversalKeys, setFocusTraversalPolicy, setLayout, transferFocusBackward, transferFocusDownCycle, validate |
Methods inherited from class java.awt.Component |
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, bounds, checkImage, checkImage, contains, createImage, createImage, createVolatileImage, createVolatileImage, dispatchEvent, enable, enableInputMethods, getBackground, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusCycleRootAncestor, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getFontMetrics, getForeground, getGraphicsConfiguration, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputContext, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocale, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMouseWheelListeners, getName, getParent, getPeer, getSize, getToolkit, getTreeLock, gotFocus, handleEvent, hasFocus, hide, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isEnabled, isFocusable, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isShowing, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, postEvent, prepareImage, prepareImage, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, repaint, repaint, repaint, resize, resize, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setFocusable, setFocusTraversalKeysEnabled, setIgnoreRepaint, setLocale, setLocation, setLocation, setName, setSize, setSize, show, show, size, toString, transferFocus, transferFocusUpCycle |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
public XMLContainer()
ComponentFactory
public XMLContainer(boolean autoDisposeMode)
Method Detail |
public javax.swing.JComponent getView()
getView
in interface IXMLPanel
public XMLContainer getMainContainer()
getMainContainer
in interface IXMLPanel
public XMLContainer getSubContainer(java.lang.String type)
getSubContainer
in interface IXMLPanel
public boolean hasSyntaxCompletion()
true
if this container will manage syntax completionpublic void setSyntaxCompletion(boolean syntaxCompletion)
true
public void setElementView(ElementView view)
null
no view will
be available
public ElementView getElementView()
public void setTemplate(XMLTemplate template)
public XMLTemplate getTemplate()
public void setDocumentInfo(XMLDocumentInfo info)
info
- public XMLDocumentInfo getDocumentInfo()
public void setLastNodeParsed(com.japisoft.fastparser.node.SimpleNode node)
public com.japisoft.fastparser.node.SimpleNode getLastNodeParsed()
public ToolBarModel getToolBarModel()
public PopupModel getPopupModel()
public PopupModel getTreePopupModel()
public SyntaxHelper getSyntaxHelper()
public javax.swing.JTree getTree()
public EditorContext getEditorContext()
public void setNavigationHistoryLimit(int limit)
public int getNavigationHistoryLimit()
public void addNavigationHistoryPath(java.lang.String path)
public void removeNavigationHistoryPath(java.lang.String path)
public void updateNavigationHistoryState()
public void cleanNavigationHistoryPath()
public java.lang.String previousNavigationHistoryPath()
null
if the previous path is not available
public java.lang.String nextNavigationHistoryPath()
null
if
the next path is not available
public boolean searchAndParseDTD()
public boolean searchAndParseSchema()
public void setFocusView(boolean focusView)
public void paintComponent(java.awt.Graphics gc)
public void requestFocus()
public java.lang.String getCurrentDTD()
public java.lang.String getCurrentDTDRoot()
public void setDefaultDTD(java.lang.String dtdRoot, java.lang.String dtd)
dtdRoot
- The DTD Root elementdtd
- The DTD path or URLpublic java.lang.String getCurrentSchema()
public java.lang.String getCurrentSchemaRoot()
public void setSchema(java.lang.String schemaRoot, java.lang.String schemaLocation)
schemaLocation
- Schema URL or current document relative locationpublic void setDTD(java.lang.String dtdRoot, java.lang.String dtdLocation)
setDefaultDTD
method
public void setDTDMapper(DTDMapper mapper)
mapper
- By default null
public DTDMapper getDTDMapper()
null
public java.lang.String getDefaultDTDRoot()
public java.lang.String getDefaultDTDLocation()
public java.lang.String getDTDLocation(boolean resolve)
resolve
- if true
the location is built using the current document location
public java.lang.String getDefaultSchemaLocation()
public java.lang.String getDefaultSchemaRoot()
public void setDefaultSchema(java.lang.String root, java.lang.String location)
public void setRelaxNGValidationLocation(java.lang.String location)
null
value
public java.lang.String getRelaxNGValidationLocation()
public java.lang.String getSchemaLocation(boolean resolve)
resolve
- if true
the location is built using the current document location
public void setCurrentDocumentLocation(java.lang.String location)
public java.lang.String getCurrentDocumentLocation()
public void setModifiedState(boolean state)
public void setColorForAttribute(java.lang.String attribute, java.awt.Color c)
public void setColorForTag(java.lang.String tag, java.awt.Color c)
public void setColorForPrefix(java.lang.String prefix, java.awt.Color c)
public javax.swing.JPopupMenu getCurrentPopup()
public javax.swing.JPopupMenu getCurrentTreePopup()
public javax.swing.JToolBar getToolBar()
public XMLEditor getEditor()
public void setAutoFocus(boolean autoFocus)
true
autoFocus
- Get the focus for the setTextpublic boolean isAutoFocus()
true
if the current editor gets the focus while calling setTextpublic void setText(java.lang.String text)
XMLEditor
.
public java.lang.String getText()
public XMLDocument getDocument()
public boolean hasTextSelection()
true
if the current editor has a text selectionpublic void setEditable(boolean editable)
true
public boolean isEditable()
public void setTreeVisible(boolean treeVisible)
XMLPadProperties.setProperty("tree", "false" )
treeVisible
- Show or hide the current location treepublic boolean isTreeVisible()
true
if there's a current location tree and the splitpane bar is not closedpublic void setToolBarVisible(boolean toolbarVisible)
XMLContainer
. If you wish no toolbar, you must
call setToolBarAvailable( false )
public boolean isToolBarVisible()
public void setToolBarAvailable(boolean toolBarAvailable)
true
. If user has
an external toolbar, this property must be set to false
. It is
possible to control the visibility by calling setToolBarVisible( ... )
public boolean isToolBarAvailable()
true
if a default toolbar is availablepublic void setPopupAvailable(boolean popupAvailable)
true
public boolean isPopupAvailable()
true
if a default popup is availablepublic void setTreePopupAvailable(boolean treePopupAvailable)
true
. This code has no effect if no tree
is used.
public boolean isTreePopupAvailable()
true
if a tree exists and if the tree popup is availablepublic void resetDefaultToolBarActions()
XMLContainer
constructor. It
uses the ActionModel
for adding action. For note : It will invoke the current NEW_ACTION
for initializing the document content.
Note that if no default toolBar is available, this method will have a limited scope
public void setEnabledTreeLocationForCaret(boolean rt)
public void setEnabledRealTimeStructureChanged(boolean support)
true
public void addNotify()
init
method for connection listeners to components
public void setAutoNewDocument(boolean autoNew)
true
public void dispose()
removeNotify
method if XMLContainer works with the disposeMode
public void removeNotify()
dispose
method for freeing ressource
public void setAutoDisposeMode(boolean disposeMode)
true
public boolean isAutoDisposeMode()
true
if JXMLPad frees itself its inner resource for the garbage collector. By default to true
public void setPopableErrorMode(boolean popableErrorMode)
false
, this mode will open a dialog box for each parsing error with the
parsing error message
popableErrorMode
- public boolean editNode()
false
if the editing is not allowed herepublic boolean editNode(com.japisoft.fastparser.node.SimpleNode currentNode)
false
if the editing is not allowed herepublic void setStatusBarAvailable(boolean statusBar)
true
. If you
use external status bar and a LocationListener, you should disable it.
public boolean isStatusBarAvailable()
true
if a status bar is shown with the current document locationpublic void setErrorPanelAvailable(boolean errorPanel)
true
. If
you have external panel for that using a DocumentStateListener, you should disable it
public boolean isErrorPanelAvailable()
true
if an error panel is shown for parsing errorpublic com.japisoft.fastparser.node.SimpleNode getLastDocumentLocation()
public RealTimeTreeManager getRealTimeTreeManager()
public void setEnabledTreeLocation(boolean location)
public boolean isEnabledTreeLocation()
public void resetEditor(XMLEditor editor)
public void setSplit(boolean split)
true
, it will split the current editors in two one
else it will unsplit the two current editors in only one
public boolean isSplit()
public void split()
public void setAutoResetAction(boolean autoResetAction)
XMLAction
from the current XMLEditor focus. By
default to true
public void unSplit()
public void resetProperties(java.util.HashMap map)
public void setProperty(java.lang.String name, java.lang.Object content)
setProperty
in interface IXMLPanel
public java.lang.Object getProperty(java.lang.String name)
getProperty
in interface IXMLPanel
public java.util.Iterator getProperties()
getProperties
in interface IXMLPanel
public java.lang.Object getProperty(java.lang.String name, java.lang.Object def)
getProperty
in interface IXMLPanel
public void addLocationListener(LocationListener listener)
public void removeLocationListener(LocationListener listener)
public Accessibility getAccessibility()
public javax.swing.undo.UndoManager getNewUndoRedoManager()
public void refreshUndoRedoState()
public void showPopup(java.awt.Component c, int x, int y)
XMLEditor
so theorically you
needn't to call it directly
public XMLIntegrity getDocumentIntegrity()
public void setDocumentIntegrity(XMLIntegrity integrity)
integrity
- XML integrity managerpublic boolean isRealTimeTreeOnTextChange()
public void setRealTimeTreeOnTextChange(boolean realTimeTreeOnTextChange)
false
value the tree will only be updated for each
return key. This is better for medium or heavy XML document. By default to false
realTimeTreeOnTextChange
- Tree is updated for any text change if truepublic void setCaretListener(CaretListener listener)
public void unsetCaretListener()
public void setLocationListener(LocationListener listener)
public void unsetLocationListener()
public void notifyLocationListener(LocationEvent event)
public void notifyCaretListener(int col, int line)
public void addDocumentStateListener(DocumentStateListener listener)
public void removeDocumentStateListener(DocumentStateListener listener)
public boolean hasErrorMessage()
true
if the last parsing step has errorpublic void notifyDocumentStateError(java.lang.String message, int line, boolean temporary)
null
value
means no error.
message
- Error message or null
public void notifyDocumentVersion(boolean newOne)
DocumentStateListener
element.
public static void main(java.lang.String[] args) throws java.lang.Throwable
java.lang.Throwable
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |