de.cbse.jeasy
Class JETreeNode
java.lang.Object
de.cbse.jeasy.JEObject
de.cbse.jeasy.JEComponent
de.cbse.jeasy.JEParentComponent
de.cbse.jeasy.JETreeNode
- All Implemented Interfaces:
- java.awt.event.ActionListener, java.awt.event.ComponentListener, java.awt.event.FocusListener, java.awt.event.InputMethodListener, java.awt.event.ItemListener, java.awt.event.KeyListener, java.awt.event.MouseListener, java.awt.event.MouseMotionListener, java.awt.event.MouseWheelListener, java.awt.event.WindowFocusListener, java.awt.event.WindowListener, java.beans.PropertyChangeListener, java.util.EventListener, javax.swing.event.CaretListener, javax.swing.event.ChangeListener, javax.swing.event.DocumentListener, javax.swing.event.ListSelectionListener, javax.swing.event.MenuKeyListener, javax.swing.event.PopupMenuListener, javax.swing.event.TableModelListener, javax.swing.event.TreeExpansionListener, javax.swing.event.TreeModelListener, javax.swing.event.TreeSelectionListener
public class JETreeNode
- extends JEParentComponent
- implements javax.swing.event.TreeSelectionListener, javax.swing.event.TreeExpansionListener, java.awt.event.MouseListener
Implements a DefaultMutableTreeNode.
See a demonstration in the program JEasyExample tab "".
Properties :
- id
The unique id of the root object.
- referenceId
A reference for this jeasy object used to identify this type of jeasy object even if it was cloned. It is used for locale properties of the object and may be used for identification in messages. If no reference is set, the jeasy id will be set as default.
- text
Text of the button or label.
- background (reference to JEColor)
Id of a color used as the background of the component.
- leafIcon (reference to JEImageIcon)
Icon used in a treenode to show leaf nodes.
- openIcon (reference to JEImageIcon)
Icon used in a treenode to show expanded non-leaf nodes.
- closedIcon (reference to JEImageIcon)
Icon used in a treenode to show not expanded non-leaf nodes.
- nodes
Specifies the list of nodes which are child of this treenode.
- textSelectionColor (reference to JEColor)
A color used in treenodes for selected nodes.
- textNonSelectionColor (reference to JEColor)
A color used in treenodes for not selected nodes.
- backgroundSelectionColor (reference to JEColor)
A color used in treenodes for selected nodes.
- backgroundNonSelectionColor (reference to JEColor)
A color used in treenodes for not selected nodes.
- borderSelectionColor (reference to JEColor)
A color used in treenodes for selected nodes.
- animation (reference to JEAnimation)
The animation used for this object and, if it is defined for parentobjects, for all children.
- Author:
- Harry Pfohl
|
Field Summary |
(package private) javax.swing.tree.TreePath |
lasttreepath
|
| Fields inherited from class de.cbse.jeasy.JEComponent |
animated, backup, buttonBehind, caretPosition, component, endMarkPosition, enterPressed, isPressed, jeButtonBehind, label, labelBehind, labelText, parentId, scrollPane, tree, treeNode, window |
| Fields inherited from class de.cbse.jeasy.JEObject |
aaa, ACTIVITYBAR, ANIMATION, BORDER, BUSINESSOBJECT_NAME, BUTTON, BUTTONGROUP, CHECKBOX, CHECKBOXMENUITEM, COLOR, COMBOBOX, ComboBoxButtonWidth, COMBOLIST, CONSTRAINTS, CONTEXT_HELP_FOCUS_GAINED, CONTEXT_HELP_FOCUS_LOST, CONTEXT_HELP_MOUSE_ENTERED, CONTEXT_HELP_MOUSE_EXITED, DATAFIELD, DATATYPE, DESKTOPPANE, DIALOG, EDITORPANE, FONT, FORMAT, FRAME, GANTTGRID, GLOBAL, GRADIENTPAINT, HELP, ICON, ID_JESTART, INPUT_ERROR_DATE, INPUT_ERROR_LENGTH, INPUT_ERROR_MANDATORY, INPUT_ERROR_PARSE, INPUT_ERROR_RANGE, INPUT_ERROR_REGULAREXPRESSION, INPUT_ERROR_TIME, INPUT_ERRORS, INSETS, INTERNALFRAME, intType, LABEL, LIST, LOCALE, MENU, MENUBAR, MENUITEM, MESSAGE, METHODINVOCATION, NO_CONSTANT, NO_INPUT_ERROR, OPTIONPANE, PANEL, POPUP, PROGRESSBAR, PROPERTIE_NAME, propertyHashMap, RADIOBUTTON, RADIOBUTTONMENUITEM, refresh, SPINNER, SPLITPANE, START, STORE, STRING, TABBEDPANE, TABLE, TASKPANE, TEXTUREPAINT, THEME, TIPS, TOOLBAR, TREE, TREENODE, type, WINDOW |
|
Method Summary |
void |
expandToId(java.lang.String id)
Expands a tree |
JETree |
getJETree()
Gets the JETree where the root treeNode was added |
JETreeNode |
getNodeById(javax.swing.tree.DefaultMutableTreeNode jetn,
java.lang.String id)
Gets the JETreeNode by its id down from given TreeNode |
JETreeNode |
getNodeById(java.lang.String id)
Gets the JETreeNode by its id |
javax.swing.JTree |
getTree()
Gets the JTree where the root treeNode was added |
javax.swing.tree.TreeModel |
getTreeModel()
Gets the model of the JTree. |
void |
init()
Creates jfc-Objects with the given properties. |
void |
insertInOrder(JETreeNode jet)
Adds a treeNode in order using the text property to compare |
void |
reloadNode()
Calls the reload method of this DefaultMutableTreeNode. |
void |
reloadNode(javax.swing.tree.DefaultMutableTreeNode tn)
Calls the reload method of the given DefaultMutableTreeNode. |
void |
reloadNode(javax.swing.tree.TreePath tp)
Reloads this DefaultMutableTreeNode and expands the given TreePath. |
void |
setupComponent()
Set the property values to the component |
| Methods inherited from class de.cbse.jeasy.JEParentComponent |
addElement, backupEntry, clear, cloneAll, getChilds, getLayoutManager, invokeAll, invokeAll, invokeAll, invokeAll, invokeAll, removeAll, removeId, restoreEntry, setEnabledAll, setEnabledAll, setVisibleAll, setVisibleAll, wasEntryChanged |
| Methods inherited from class de.cbse.jeasy.JEComponent |
actionPerformed, add, add, add, add, add, add, add, add, add, add, add, add, add, add, add, addListeners, caretPositionChanged, caretUpdate, changedUpdate, componentHidden, componentMoved, componentResized, componentShown, examine, examine, focusGained, focusLost, getAddableComponent, getAnimation, getBackupEntry, getButtonBehind, getClosedIcon, getColumns, getComponent, getDataType, getIcon, getJEButtonBehind, getJLabel, getJScrollpane, getLabel, getLabelBehind, getLabelText, getLeafIcon, getMandatory, getName, getOpenIcon, getParentId, getToolTipText, getTreeNode, getValue, getValueBeforeFocus, getValueNotNull, getValues, getWindow, inputMethodTextChanged, insertUpdate, isAnimated, isEditable, isExiting, isListening, isShowing, isVerified, isVisible, itemStateChanged, jCallBackInputVerifier, keyPressed, keyReleased, keyTyped, menuKeyPressed, menuKeyReleased, menuKeyTyped, mouseClicked, mouseDragged, mouseEntered, mouseExited, mouseMoved, mousePressed, mouseReleased, mouseWheelMoved, popupMenuCanceled, popupMenuWillBecomeInvisible, popupMenuWillBecomeVisible, propertyChange, refresh, remove, removeActionListeners, removeUpdate, repaint, restoreValueBeforeFocus, setAnimated, setBackground, setBackground, setEnabled, setEnabled, setExiting, setFocus, setForeground, setForeground, setIcon, setListening, setMandatory, setParentId, setProperties, setText, setToolTipText, setTreeNode, setValue, setValueBeforeFocus, setValues, setVerified, setVisible, setVisible, stateChanged, tableChanged, textUpdate, timerTask, transferFocus, transferFocusBackward, treeCollapsed, treeExpanded, treeNodesChanged, treeNodesInserted, treeNodesRemoved, treeStructureChanged, valueChanged, valueChanged, windowActivated, windowClosed, windowClosing, windowDeactivated, windowDeiconified, windowGainedFocus, windowIconified, windowLostFocus, windowOpened |
| Methods inherited from class de.cbse.jeasy.JEObject |
clearPreview, clone, getApplLocale, getBorderConstantProperty, getBorderProperty, getCharGProperty, getCharProperty, getColorProperty, getConstraintsProperty, getFontProperty, getGProperty, getGradientPaintProperty, getId, getImageConstantProperty, getImageIconProperty, getInsetsProperty, getJEGlobal, getJETexturePaintProperty, getLayoutProperty, getLocaleProperties, getObjectsHashMap, getObjectsNonPreviewHashMap, getPreviewHashMap, getPreviewObject, getProjectDirectory, getPropertieHashMap, getProperty, getProperty, getPropertyAsArray, getPropertyAsBoolean, getPropertyAsDouble, getPropertyAsInteger, getPropertyAsObject, getPropertyAsObject, getPropertyAsVector, getPropertyAsVector, getReferenceButtonBehind, getReferenceId, getRegisterText, getResourceUrl, getRootPane, getRootPaneId, getSwingConstantProperty, getTabbedPaneConstantProperty, getTexturePaintProperty, getType, getUniqueNumber, hasSuperclass, invoke, invoke, invoke, invoke, isApplet, isEnterprise, isGlobalAnimation, isGlobalListening, isInited, isPreview, isPreviewMember, isProfessional, isRefresh, isSetuped, isStandard, registerJEObject, removeProperties, removeProperty, removeProperty, setApplet, setApplLocale, setGlobalAnimation, setGlobalListening, setInited, setJeGlobal, setLocaleProperties, setPreview, setPreviewHashMap, setPreviewMember, setPreviewObject, setProjectDirectory, setPropertieHashMap, setProperties, setProperties, setProperty, setProperty, setRefresh, setRootPane, setRootPaneId, setSetuped, setType, show |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface javax.swing.event.TreeSelectionListener |
valueChanged |
| Methods inherited from interface javax.swing.event.TreeExpansionListener |
treeCollapsed, treeExpanded |
| Methods inherited from interface java.awt.event.MouseListener |
mouseClicked, mouseEntered, mouseExited, mousePressed, mouseReleased |
lasttreepath
javax.swing.tree.TreePath lasttreepath
JETreeNode
public JETreeNode(JELocaleProperties hm)
- Reads the properties from a HashMap
- Parameters:
hm - HashMap
JETreeNode
public JETreeNode(JENode jen)
- Constructor based on a XML file parsed to a TreeNode.
- Parameters:
jen - - See Also:
JESaxParser
JETreeNode
public JETreeNode()
init
public void init()
- Creates jfc-Objects with the given properties. The font of the text is
set to global.labelFont.
- Overrides:
init in class JEParentComponent
insertInOrder
public void insertInOrder(JETreeNode jet)
- Adds a treeNode in order using the text property to compare
- Parameters:
jet -
setupComponent
public void setupComponent()
- Description copied from class:
JEParentComponent
- Set the property values to the component
- Overrides:
setupComponent in class JEParentComponent
getTree
public javax.swing.JTree getTree()
- Gets the JTree where the root treeNode was added
- Returns:
getJETree
public JETree getJETree()
- Gets the JETree where the root treeNode was added
- Returns:
reloadNode
public void reloadNode()
- Calls the reload method of this DefaultMutableTreeNode.
reloadNode
public void reloadNode(javax.swing.tree.DefaultMutableTreeNode tn)
- Calls the reload method of the given DefaultMutableTreeNode.
reloadNode
public void reloadNode(javax.swing.tree.TreePath tp)
- Reloads this DefaultMutableTreeNode and expands the given TreePath.
- Parameters:
tp -
getTreeModel
public javax.swing.tree.TreeModel getTreeModel()
- Gets the model of the JTree.
- Returns:
expandToId
public void expandToId(java.lang.String id)
- Expands a tree
- Parameters:
id -
getNodeById
public JETreeNode getNodeById(java.lang.String id)
- Gets the JETreeNode by its id
- Parameters:
id -
- Returns:
getNodeById
public JETreeNode getNodeById(javax.swing.tree.DefaultMutableTreeNode jetn,
java.lang.String id)
- Gets the JETreeNode by its id down from given TreeNode
- Parameters:
id -
- Returns: