Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## ix.util.xml
Class XMLTreeEditPanel

    java.lang.Object
      java.awt.Component
          java.awt.Container
              javax.swing.JComponent
                  javax.swing.JPanel
                      ix.util.xml.XMLTreeEditPanel

All Implemented Interfaces:
  NamespaceListener, java.awt.event.ActionListener, java.awt.image.ImageObserver, java.awt.MenuContainer, java.io.Serializable, java.util.EventListener, javax.accessibility.Accessible, javax.swing.event.TreeSelectionListener

Direct Known Subclasses:
  AnnotationEditor.AnnotationEditPanel, XMLTreeViewPanel

    public class XMLTreeEditPanel

extends javax.swing.JPanel
implements NamespaceListener, java.awt.event.ActionListener, javax.swing.event.TreeSelectionListener

A panel that contains an XML tree-editor.

See Also:
  `XMLTreeEditor`, `XMLTreeEditFrame`, Serialized Form

Nested Class Summary
`(package private) class` | `XMLTreeEditPanel.CutFrame` A frame that shows a subtree cut from the main editor panel.
`(package private) class` | `XMLTreeEditPanel.EditingTextArea` A text area for editing string values
`(package private) class` | `XMLTreeEditPanel.EditorTree` JTree subclass used for all trees in the editor.
`(package private) class` | `XMLTreeEditPanel.InvalidCommand`
`(package private) class` | `XMLTreeEditPanel.InvalidNode`
`(package private) class` | `XMLTreeEditPanel.NodePopupMenu` The default class of popup menu that appears when the user does a right-button press on a tree node.
`(package private) class` | `XMLTreeEditPanel.ObjTNode` A TNode in the namespace used for object class and field names.
`(package private) class` | `XMLTreeEditPanel.RecordingExpansionListener` A TreeExpansionListener that records whether a node should be expanded or not.
`(package private) class` | `XMLTreeEditPanel.TemplateSyntax` Knows about the syntax of Java classes.
`(package private) class` | `XMLTreeEditPanel.TemplateTree` A tree variety used for templates
`(package private) class` | `XMLTreeEditPanel.TNode` A TreeNode for use in EditorTrees.
`(package private) class` | `XMLTreeEditPanel.TNodeFactory` Makes `XMLTreeEditPanel.TNode`s from JDOM Documents and Elements.
`(package private) class` | `XMLTreeEditPanel.TNodeParser` Responsible for understanding the object-like structure of tree nodes and for converting nodes into JDOM Documents or Elements.
`(package private) class` | `XMLTreeEditPanel.TNodeRenderer` A renderer that knows about namespaces.
`(package private) class` | `XMLTreeEditPanel.TreeMouseListener`

Nested classes/interfaces inherited from class javax.swing.JPanel
`javax.swing.JPanel.AccessibleJPanel`

Nested classes/interfaces inherited from class javax.swing.JComponent
`javax.swing.JComponent.AccessibleJComponent`

Nested classes/interfaces inherited from class java.awt.Container
`java.awt.Container.AccessibleAWTContainer`

Nested classes/interfaces inherited from class java.awt.Component
`java.awt.Component.AccessibleAWTComponent, java.awt.Component.BltBufferStrategy, java.awt.Component.FlipBufferStrategy`

Field Summary
`protected static java.lang.String` | `ATTRIBUTES`
`protected javax.swing.tree.DefaultTreeModel` | `docModel`
`protected javax.swing.JSplitPane` | `docSplit`
`protected XMLTreeEditPanel.EditorTree` | `docTree`
`protected org.jdom.Document` | `document` The document this panel is editing.
`protected XMLTreeEditPanel.EditingTextArea` | `editText`
`protected static XMLTreeEditPanel.EditorTree` | `mostRecentlySelectedTree`
`protected XMLTreeEditPanel.TNodeFactory` | `nodeFactory`
`protected XMLTreeEditPanel.TNodeParser` | `nodeParser`
`protected javax.swing.JButton` | `submitButton`
`protected XMLTreeEditPanel.TemplateSyntax` | `syntax`
`protected XMLTreeEditPanel.EditorTree` | `templateTree`
`protected javax.swing.JSplitPane` | `textSplit`

Fields inherited from class javax.swing.JComponent
`accessibleContext, listenerList, TOOL_TIP_TEXT_KEY, ui, 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
`XMLTreeEditPanel()`

Method Summary
`void` | `actionPerformed(java.awt.event.ActionEvent e)` Action interpreter for panel buttons
`void` | `addChild()` Adds a new node after the existing children of the selected node.
`void` | `addRootChild(org.jdom.Document doc)`
`void` | `addTemplate(XMLTreeEditPanel.TNode template)`
`void` | `addTemplates()`
`void` | `addTemplatesFor(java.lang.Class[] classes)`
`protected void` | `complain(java.lang.Object message)`
`void` | `copySubtree()` Copy the subtree below and including the currently selected node.
`void` | `cutSubtree()` "Cut" the subtree below and including the currently selected node.
`void` | `editDocument(org.jdom.Document doc)`
`void` | `editObject(java.lang.Object object)`
`void` | `expandDocument(int depth)`
`void` | `findInTree(java.lang.String targetText)` Finds text in the most recently selected tree even if the tree is not in this panel.
`org.jdom.Document` | `getDocument()`
`protected XMLTreeEditFrame` | `getEditFrame()`
`protected java.awt.Color` | `getNamespaceColor(org.jdom.Namespace n)`
`java.lang.Object` | `getObject()`
`void` | `hideTemplates()`
`protected javax.swing.JButton` | `makeButton(java.lang.String command)`
`protected javax.swing.JPanel` | `makeButtonPanel()`
`(package private) javax.swing.JPopupMenu` | `makeNodePopupMenu(XMLTreeEditPanel.EditorTree tree, XMLTreeEditPanel.TNode node)` Factory method that makes a popup menu for right-press on a tree node.
`protected XMLTreeEditPanel.EditorTree` | `makeTemplateTree()`
`void` | `namespaceEvent(NamespaceEvent e)` Something has happened, releted to the source Namespace.
`protected void` | `noteNamespace(org.jdom.Namespace n)`
`protected void` | `reset()`
`protected void` | `setDocRoot(XMLTreeEditPanel.TNode root)`
`(package private) void` | `setSelectedTree(XMLTreeEditPanel.EditorTree tree)`
`void` | `valueChanged(javax.swing.event.TreeSelectionEvent e)` Required by the TreeSelectionListener interface.

Methods inherited from class javax.swing.JPanel
`getAccessibleContext, getUI, getUIClassID, paramString, setUI, updateUI`

Methods inherited from class javax.swing.JComponent
`addAncestorListener, addNotify, addVetoableChangeListener, computeVisibleRect, contains, createToolTip, disable, enable, firePropertyChange, firePropertyChange, firePropertyChange, fireVetoableChange, getActionForKeyStroke, getActionMap, getAlignmentX, getAlignmentY, getAncestorListeners, getAutoscrolls, getBorder, getBounds, getClientProperty, getComponentGraphics, getComponentPopupMenu, getConditionForKeyStroke, getDebugGraphicsOptions, getDefaultLocale, getFontMetrics, getGraphics, getHeight, getInheritsPopupMenu, getInputMap, getInputMap, getInputVerifier, getInsets, getInsets, getListeners, getLocation, getMaximumSize, getMinimumSize, getNextFocusableComponent, getPopupLocation, getPreferredSize, getRegisteredKeyStrokes, getRootPane, getSize, getToolTipLocation, getToolTipText, getToolTipText, getTopLevelAncestor, getTransferHandler, getVerifyInputWhenFocusTarget, getVetoableChangeListeners, getVisibleRect, getWidth, getX, getY, grabFocus, isDoubleBuffered, isLightweightComponent, isManagingFocus, isOpaque, isOptimizedDrawingEnabled, isPaintingTile, isRequestFocusEnabled, isValidateRoot, paint, paintBorder, paintChildren, paintComponent, paintImmediately, paintImmediately, print, printAll, printBorder, printChildren, printComponent, processComponentKeyEvent, processKeyBinding, processKeyEvent, processMouseEvent, processMouseMotionEvent, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removeNotify, removeVetoableChangeListener, repaint, repaint, requestDefaultFocus, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, resetKeyboardActions, reshape, revalidate, scrollRectToVisible, setActionMap, setAlignmentX, setAlignmentY, setAutoscrolls, setBackground, setBorder, setComponentPopupMenu, setDebugGraphicsOptions, setDefaultLocale, setDoubleBuffered, setEnabled, setFocusTraversalKeys, setFont, setForeground, setInheritsPopupMenu, setInputMap, setInputVerifier, setMaximumSize, setMinimumSize, setNextFocusableComponent, setOpaque, setPreferredSize, setRequestFocusEnabled, setToolTipText, setTransferHandler, setUI, setVerifyInputWhenFocusTarget, setVisible, unregisterKeyboardAction, update`

Methods inherited from class java.awt.Container
`add, add, add, add, add, addContainerListener, addImpl, addPropertyChangeListener, addPropertyChangeListener, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getComponentZOrder, getContainerListeners, getFocusTraversalKeys, getFocusTraversalPolicy, getLayout, getMousePosition, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusCycleRoot, isFocusTraversalPolicyProvider, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paintComponents, preferredSize, printComponents, processContainerEvent, processEvent, remove, remove, removeAll, removeContainerListener, setComponentZOrder, setFocusCycleRoot, setFocusTraversalPolicy, setFocusTraversalPolicyProvider, setLayout, transferFocusBackward, transferFocusDownCycle, validate, validateTree`

Methods inherited from class java.awt.Component
`action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, bounds, checkImage, checkImage, coalesceEvents, contains, createImage, createImage, createVolatileImage, createVolatileImage, disableEvents, dispatchEvent, enable, enableEvents, enableInputMethods, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getBackground, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusCycleRootAncestor, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getForeground, getGraphicsConfiguration, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputContext, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocale, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMousePosition, getMouseWheelListeners, getName, getParent, getPeer, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getToolkit, getTreeLock, gotFocus, handleEvent, hasFocus, hide, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isEnabled, isFocusable, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isMaximumSizeSet, isMinimumSizeSet, isPreferredSizeSet, isShowing, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, postEvent, prepareImage, prepareImage, processComponentEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processMouseWheelEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removePropertyChangeListener, removePropertyChangeListener, 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
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

Field Detail

### document

    protected org.jdom.Document document

  The document this panel is editing.

### ATTRIBUTES

    protected static final java.lang.String ATTRIBUTES

See Also:
  Constant Field Values

### mostRecentlySelectedTree

    protected static XMLTreeEditPanel.EditorTree mostRecentlySelectedTree

### nodeFactory

    protected XMLTreeEditPanel.TNodeFactory nodeFactory

### nodeParser

    protected XMLTreeEditPanel.TNodeParser nodeParser

### syntax

    protected XMLTreeEditPanel.TemplateSyntax syntax

### docTree

    protected XMLTreeEditPanel.EditorTree docTree

### docModel

    protected javax.swing.tree.DefaultTreeModel docModel

### templateTree

    protected XMLTreeEditPanel.EditorTree templateTree

### editText

    protected XMLTreeEditPanel.EditingTextArea editText

### submitButton

    protected javax.swing.JButton submitButton

### docSplit

    protected javax.swing.JSplitPane docSplit

### textSplit

    protected javax.swing.JSplitPane textSplit

Constructor Detail

### XMLTreeEditPanel

    public XMLTreeEditPanel()

Method Detail

### reset

    protected void reset()

### getEditFrame

    protected XMLTreeEditFrame getEditFrame()

### setDocRoot

    protected void setDocRoot(XMLTreeEditPanel.TNode root)

### editDocument

    public void editDocument(org.jdom.Document doc)

### getDocument

    public org.jdom.Document getDocument()

### expandDocument

    public void expandDocument(int depth)

### addRootChild

    public void addRootChild(org.jdom.Document doc)

### editObject

    public void editObject(java.lang.Object object)

### getObject

    public java.lang.Object getObject()

### findInTree

    public void findInTree(java.lang.String targetText)

  Finds text in the most recently selected tree even if the tree is not in this panel.

### getNamespaceColor

    protected java.awt.Color getNamespaceColor(org.jdom.Namespace n)

### noteNamespace

    protected void noteNamespace(org.jdom.Namespace n)

### namespaceEvent

    public void namespaceEvent(NamespaceEvent e)

  Description copied from interface: `NamespaceListener`
  Something has happened, releted to the source Namespace. For now, we don't quite need anything more specific.

  Specified by:
    `namespaceEvent` in interface `NamespaceListener`

### addTemplates

    public void addTemplates()

### addTemplatesFor

    public void addTemplatesFor(java.lang.Class[] classes)

### addTemplate

    public void addTemplate(XMLTreeEditPanel.TNode template)

### hideTemplates

    public void hideTemplates()

### makeTemplateTree

    protected XMLTreeEditPanel.EditorTree makeTemplateTree()

### makeButtonPanel

    protected javax.swing.JPanel makeButtonPanel()

### makeButton

    protected javax.swing.JButton makeButton(java.lang.String command)

### actionPerformed

    public void actionPerformed(java.awt.event.ActionEvent e)

  Action interpreter for panel buttons

  Specified by:
    `actionPerformed` in interface `java.awt.event.ActionListener`

### addChild

    public void addChild()

  Adds a new node after the existing children of the selected node.

### copySubtree

    public void copySubtree()

  Copy the subtree below and including the currently selected node. This is essentially the same as a "Cut" without deletion, but it also takes a copy of the subtree rather than taking those very nodes.

### cutSubtree

    public void cutSubtree()

  "Cut" the subtree below and including the currently selected node.

### complain

    protected void complain(java.lang.Object message)

### valueChanged

    public void valueChanged(javax.swing.event.TreeSelectionEvent e)

  Required by the TreeSelectionListener interface. Called for both the document and the template trees.

  Specified by:
    `valueChanged` in interface `javax.swing.event.TreeSelectionListener`

### setSelectedTree

    void setSelectedTree(XMLTreeEditPanel.EditorTree tree)

### makeNodePopupMenu

    javax.swing.JPopupMenu makeNodePopupMenu(XMLTreeEditPanel.EditorTree tree,
                                             XMLTreeEditPanel.TNode node)

  Factory method that makes a popup menu for right-press on a tree node.

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD