|
||||||||||
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.jaxfront.swing.ui.editor.AbstractEditorPanel
public abstract class AbstractEditorPanel
AbstractEditorPanel is an abstract class which is responsible for visualizing the JAXFront type tree. This class wraps the TypeWorkspace and the NavigationTree. Usually on the left is the NavigationTree where you can select a node that will be visualised by the TypeWorkspace on the right side.
com.jaxfront.core.ui.EditorPanel
,
com.jaxfront.core.xui.editor.XUIEditorPanel
,
Serialized FormNested Class Summary |
---|
Nested classes/interfaces 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 | |
---|---|
AbstractEditorPanel()
EditorPanel constructor. |
|
AbstractEditorPanel(Type type,
java.awt.Window window)
EditorPanel constructor. |
Method Summary | |
---|---|
void |
addButton(javax.swing.JButton button)
Adds a Button to the Workspace. |
void |
addButton(javax.swing.JButton button,
int orientation)
Adds a Button to the Workspace. |
void |
addHelpListener(HelpListener newListener)
Add a new help listener to receive HelpEvents in case of a defined help definition. |
void |
clearWorkbench()
|
void |
fireHelpEvent(Type source,
java.lang.String helpID)
Fires a HelpEvent for a help requestor (source type) and the according help identifier. |
javax.swing.JComponent |
getCenterComponent()
|
Document |
getDOM()
Returns the jaxfront document of this instance. |
javax.swing.JPanel |
getHelpPanel()
|
int |
getLastDividerLocation()
Returns the location of the divider (splitter). |
NavigationTree |
getNavigationTree()
Returns the navigation tree. |
Type |
getRootType()
Returns the root type of the jaxfront tree |
javax.swing.JScrollPane |
getScrollPane()
Returns the scrollpane of the workspace. |
TreeNode |
getSelectedNode()
|
TreeNode |
getSelectedTreeNode()
Returns the selected TreeNode in the NavigationTree if any. |
Document |
getTargetDOM()
If a target dom is specified, this method would return it. |
TreeModel |
getTreeModel()
Returns the model from the instance of the class NavigationTree |
java.awt.Window |
getWindow()
Returns the frame that is the holder of this instance |
TypeWorkspace |
getWorkspace()
Returns the workspace that is a instance of TypeWorkspace. |
void |
highlightNode(TreeNode node)
|
boolean |
isTopLevelEditor()
Returns true if this editor is the top level editor. |
boolean |
isTreeSelect()
|
boolean |
isXUIEditor()
Returns true if this panel is used within the xui editor. |
void |
release()
Memorymanagement - use this method to release the documents and to do a clean up. |
void |
removeHelpListener(HelpListener listener)
Removes a HelpListener. |
void |
removeSaveButton()
Removes the save button from the workspace. |
void |
selectNode(TreeNode node)
Selects a TreeNode in the NavigationTree. |
void |
selectNode(Type type)
Selects a TreeNode in the NavigationTree based on a type. |
void |
selectNode(Type type,
boolean withoutVisualize)
|
void |
selectRootNode()
Selects the root TreeNode in the NavigationTree |
void |
setCenterComponent(javax.swing.JComponent centerComponent)
|
void |
setHelpPanelPosition(java.lang.String position)
Sets the position of the helpPanel: BorderLayout.WEST BorderLayout.EAST BorderLayout.NORTH BorderLayout.SOUTH (default) |
void |
setHighLightMode(boolean isOnlyHighLightMode)
|
void |
setIsTreeSelect(boolean treeSelect)
|
void |
setRootVisible(boolean visible)
Determines whether or not the root node from the TreeModel is visible. |
void |
setSelectedNode(TreeNode treeNode)
|
void |
setTargetDOM(Document dom)
|
void |
setTargetMessageTable(javax.swing.JPanel component)
Sets a component for holding the message table. |
void |
setTargetMessageTable(java.awt.Panel component)
Sets a component for holding the message table. |
abstract void |
treeNodesChanged(javax.swing.event.TreeModelEvent e)
Invoked after a node (or a set of siblings) has changed in some way. |
abstract void |
treeNodesInserted(javax.swing.event.TreeModelEvent e)
Invoked after nodes have been inserted into the tree. |
abstract void |
treeNodesRemoved(javax.swing.event.TreeModelEvent e)
Invoked after nodes have been removed from the tree. |
abstract void |
treeStructureChanged(javax.swing.event.TreeModelEvent e)
Invoked after the tree has drastically changed structure from a given node down. |
abstract void |
valueChanged(javax.swing.event.TreeSelectionEvent e)
Called whenever the value of the selection changes. |
abstract Visualizer |
visualize(Type type,
boolean forceRepaint)
|
Methods inherited from class javax.swing.JPanel |
---|
getAccessibleContext, getUI, getUIClassID, setUI, updateUI |
Methods inherited from class javax.swing.JComponent |
---|
addAncestorListener, addNotify, addVetoableChangeListener, computeVisibleRect, contains, createToolTip, disable, enable, firePropertyChange, firePropertyChange, firePropertyChange, getActionForKeyStroke, getActionMap, getAlignmentX, getAlignmentY, getAncestorListeners, getAutoscrolls, getBorder, getBounds, getClientProperty, 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, paintImmediately, paintImmediately, print, printAll, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removeNotify, removeVetoableChangeListener, repaint, repaint, requestDefaultFocus, requestFocus, requestFocus, 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, setVerifyInputWhenFocusTarget, setVisible, unregisterKeyboardAction, update |
Methods inherited from class java.awt.Container |
---|
add, add, add, add, add, addContainerListener, 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, remove, remove, removeAll, removeContainerListener, setComponentZOrder, setFocusCycleRoot, setFocusTraversalPolicy, setFocusTraversalPolicyProvider, 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, 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, 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 |
---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Methods inherited from interface com.jaxfront.core.ui.EditablePanel |
---|
removeTreeNodes |
Constructor Detail |
---|
public AbstractEditorPanel()
com.jaxfront.core.ui.EditorPanel
public AbstractEditorPanel(Type type, java.awt.Window window)
type
- the root type from the tree should be visualisedframe
- the container (a frame), that holds this instancecom.jaxfront.core.ui.EditorPanel
Method Detail |
---|
public void addButton(javax.swing.JButton button)
button
- the button that will be addedcom.jaxfront.core.ui.TypeWorkspace#addButton(JButton button)
public void addButton(javax.swing.JButton button, int orientation)
button
- the button that will be addedorientation
- the position of the button locationcom.jaxfront.core.ui.TypeWorkspace#addButton(JButton button, int
orientation)
public Document getDOM()
public java.awt.Window getWindow()
getWindow
in interface EditablePanel
public int getLastDividerLocation()
public Type getRootType()
public Document getTargetDOM()
getTargetDOM
in interface EditablePanel
public TreeModel getTreeModel()
getTreeModel
in interface EditablePanel
public TreeNode getSelectedTreeNode()
getSelectedTreeNode
in interface EditablePanel
public TypeWorkspace getWorkspace()
public NavigationTree getNavigationTree()
public boolean isTopLevelEditor()
public boolean isXUIEditor()
public void release()
public void removeSaveButton()
com.jaxfront.core.ui.TypeWorkspace#removeSaveButton()
public void selectNode(TreeNode node)
selectNode
in interface EditablePanel
node
- the node to be selected.com.jaxfront.core.ui.NavigationTree#setSelectionPath(TreeNode node)
public void selectNode(Type type)
selectNode
in interface EditablePanel
type
- the type to be selected.com.jaxfront.core.ui.NavigationTree#setSelectionPath(TreeNode node)
public void selectNode(Type type, boolean withoutVisualize)
public TreeNode getSelectedNode()
public void setSelectedNode(TreeNode treeNode)
public void highlightNode(TreeNode node)
public void selectRootNode()
public void setRootVisible(boolean visible)
visible
- true if the root node of the tree is to be displayedJTree.setRootVisible(boolean rootVisible)
public abstract void treeNodesChanged(javax.swing.event.TreeModelEvent e)
Invoked after a node (or a set of siblings) has changed in some way. The node(s) have not changed locations in the tree or altered their children arrays, but other attributes have changed and may affect presentation. Example: the name of a file has changed, but it is in the same location in the file system.
To indicate the root has changed, childIndices and children will be null.
e.path() returns the path the parent of the changed node(s).
e.childIndices() returns the index(es) of the changed node(s).
treeNodesChanged
in interface javax.swing.event.TreeModelListener
public abstract void treeNodesInserted(javax.swing.event.TreeModelEvent e)
Invoked after nodes have been inserted into the tree.
e.path() returns the parent of the new nodes
e.childIndices() returns the indices of the new nodes in ascending order.
treeNodesInserted
in interface javax.swing.event.TreeModelListener
public abstract void treeNodesRemoved(javax.swing.event.TreeModelEvent e)
Invoked after nodes have been removed from the tree. Note that if a subtree is removed from the tree, this method may only be invoked once for the root of the removed subtree, not once for each individual set of siblings removed.
e.path() returns the former parent of the deleted nodes.
e.childIndices() returns the indices the nodes had before they were deleted in ascending order.
treeNodesRemoved
in interface javax.swing.event.TreeModelListener
public abstract void treeStructureChanged(javax.swing.event.TreeModelEvent e)
Invoked after the tree has drastically changed structure from a given node down. If the path returned by e.getPath() is of length one and the first element does not identify the current root node the first element should become the new root of the tree.
e.path() holds the path to the node.
e.childIndices() returns null.
treeStructureChanged
in interface javax.swing.event.TreeModelListener
public abstract void valueChanged(javax.swing.event.TreeSelectionEvent e)
valueChanged
in interface javax.swing.event.TreeSelectionListener
e
- the event that characterizes the change.public abstract Visualizer visualize(Type type, boolean forceRepaint)
visualize
in interface EditablePanel
public javax.swing.JScrollPane getScrollPane()
public void setTargetMessageTable(javax.swing.JPanel component)
component
- a JComponent defining a border layoutpublic void setTargetMessageTable(java.awt.Panel component)
component
- a Panel defining a border layoutpublic void setHighLightMode(boolean isOnlyHighLightMode)
public void setIsTreeSelect(boolean treeSelect)
public boolean isTreeSelect()
public void addHelpListener(HelpListener newListener)
addHelpListener
in interface EditablePanel
newListener
- HelpListenerpublic void fireHelpEvent(Type source, java.lang.String helpID)
fireHelpEvent
in interface EditablePanel
source
- source the help requestorhelpID
- any help identification for the target help systempublic void removeHelpListener(HelpListener listener)
removeHelpListener
in interface EditablePanel
listener
- HelpListener to removepublic void setTargetDOM(Document dom)
public javax.swing.JPanel getHelpPanel()
public void setHelpPanelPosition(java.lang.String position)
public javax.swing.JComponent getCenterComponent()
public void setCenterComponent(javax.swing.JComponent centerComponent)
public void clearWorkbench()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |