|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--java.awt.Component | +--java.awt.Container | +--javax.swing.JComponent | +--javax.swing.JPanel | +--com.japisoft.xmlpad.XMLContainer
This is the main container for the XMLEditor. This container manages a
toolbar thanks to the ToolBarModel
. 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.
JPanel
,
ToolBarModel
,
Serialized FormField 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 |
Method Summary | |
void |
addNotify()
|
void |
focusGained(java.awt.event.FocusEvent e)
|
void |
focusLost(java.awt.event.FocusEvent e)
|
java.lang.String |
getCurrentDocumentLocation()
|
javax.swing.JPopupMenu |
getCurrentPopup()
Return the current menu popup |
java.lang.String |
getDefaultDTDLocation()
|
java.lang.String |
getDefaultDTDRoot()
|
XMLDocumentInfo |
getDocumentInfo()
|
XMLIntegrity |
getDocumentIntegrity()
|
java.lang.String |
getDTDLocation(boolean resolve)
|
XMLEditor |
getEditor()
|
RealTimeTreeManager |
getRealTimeTreeManager()
|
SyntaxHelper |
getSyntaxHelper()
|
java.lang.String |
getText()
|
javax.swing.JToolBar |
getToolBar()
|
ToolBarModel |
getToolBarModel()
|
boolean |
isEditable()
By default return true |
boolean |
isEnabledPopup()
|
boolean |
isEnabledToolBar()
|
boolean |
isEnabledTreeLocation()
Is Enabled the view of the tree location in the status bar ? |
static void |
main(java.lang.String[] args)
|
void |
removeErrorPanel()
|
void |
resetDefaultToolBarActions()
Update the toolbarModel adding separator. |
boolean |
searchAndParseDTD()
Search inside the current document a DTD and parses it for syntax helper. |
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 |
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 dtd)
|
void |
setEditable(boolean editable)
The document is only readable for true |
void |
setEnabledPopup(boolean enabled)
Support a popup menu |
void |
setEnabledToolBar(boolean enabledToolBar)
Enabled the toolbar |
void |
setEnabledTreeLocation(boolean location)
Enable the view of the tree location in the status bar |
void |
setModifiedState(boolean state)
Update this container state if the document has been changed |
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 |
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 |
setText(java.lang.String text)
Set the XML content |
void |
split()
Show two editors |
void |
unSplit()
Show one editor |
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, removeNotify, removePropertyChangeListener, removePropertyChangeListener, removeVetoableChangeListener, repaint, repaint, requestDefaultFocus, requestFocus, 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
Method Detail |
public void setDocumentInfo(XMLDocumentInfo info)
info
- public XMLDocumentInfo getDocumentInfo()
public ToolBarModel getToolBarModel()
public SyntaxHelper getSyntaxHelper()
public boolean searchAndParseDTD()
public void setDefaultDTD(java.lang.String dtdRoot, java.lang.String dtd)
dtdRoot
- The DTD Root elementdtd
- The DTD path or URLpublic void setDTD(java.lang.String dtdRoot, java.lang.String dtd)
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 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 void setEnabledPopup(boolean enabled)
public boolean isEnabledPopup()
public javax.swing.JToolBar getToolBar()
public XMLEditor getEditor()
public void setText(java.lang.String text)
public java.lang.String getText()
public void setEditable(boolean editable)
true
public boolean isEditable()
public void setEnabledToolBar(boolean enabledToolBar)
public boolean isEnabledToolBar()
public void resetDefaultToolBarActions()
public void addNotify()
addNotify
in class javax.swing.JComponent
public void setPopableErrorMode(boolean popableErrorMode)
popableErrorMode
- public void removeErrorPanel()
public RealTimeTreeManager getRealTimeTreeManager()
public void setEnabledTreeLocation(boolean location)
public boolean isEnabledTreeLocation()
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 void split()
public void focusGained(java.awt.event.FocusEvent e)
focusGained
in interface java.awt.event.FocusListener
public void focusLost(java.awt.event.FocusEvent e)
focusLost
in interface java.awt.event.FocusListener
public void unSplit()
public XMLIntegrity getDocumentIntegrity()
public void setDocumentIntegrity(XMLIntegrity integrity)
integrity
- XML integrity managerpublic static void main(java.lang.String[] args)
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |