borland Packages Class Hierarchy dbswing Package
JdbTree component
java.lang.Object
+----java.awt.Component
+----java.awt.Container
+----javax.swing.JComponent
+----javax.swing.JTree
+----com.borland.dbswing.JdbTree
About the JdbTree component
Variables Constructors Properties Methods Event Listeners
Implements DBDataBinder, ColumnAware, DataSetAware, ImageObserver, MenuContainer, Serializable, Accessible, Scrollable
Note:
This is a feature of JBuilder Professional and Enterprise.
JdbTree
is a data-aware extension of the JTree
component. It displays a tree of choices from which a user may choose a single value. The selected value can be written to a Column
of a DataSet
, and it can be retrieved using the standard Swing TreeSelectionModel
methods. When JdbTree
is bound to a DataSet
and DataSet
Column
, the currently selected choice always reflects the value of the corresponding Column
in the current DataSet
row.
JdbTree
uses a DBTreeDataBinder
to bind a tree to a DataSet
and make JdbTree
data-aware.
To fill the tree presented by JdbTree
, choose one of these:
By default, JdbTree
sets its selection mode to TreeSelectionModel.SINGLE_TREE_SELECTION
because only a single tree selection can be copied to its DataSet
target. Even if the selection mode is changed to allow the selection of multiple items simultaneously, only the first item of the selection group is copied to the DataSet
.
See also:
DBTreeDataBinder
, JdbNavTree
JdbTree variables
Variables implemented in this class
JdbTree constructors
JdbTree properties
*Read-only properties **Write-only properties
Properties implemented in this class
JdbTree methods
Methods implemented in this class
- action(java.awt.Event, java.lang.Object)
- add(java.awt.PopupMenu)
- addPropertyChangeListener(java.lang.String, java.beans.PropertyChangeListener)
- bounds()
- checkImage(java.awt.Image, int, int, java.awt.image.ImageObserver)
- checkImage(java.awt.Image, java.awt.image.ImageObserver)
- coalesceEvents(java.awt.AWTEvent, java.awt.AWTEvent)
- contains(java.awt.Point)
- createImage(int, int)
- createImage(java.awt.image.ImageProducer)
- disable()
- disableEvents(long)
- dispatchEvent(java.awt.AWTEvent)
- enable()
- enable(boolean)
- enableEvents(long)
- enableInputMethods(boolean)
- getFontMetrics(java.awt.Font)
- gotFocus(java.awt.Event, java.lang.Object)
- handleEvent(java.awt.Event)
- hide()
- imageUpdate(java.awt.Image, int, int, int, int, int)
- inside(int, int)
- keyDown(java.awt.Event, int)
- keyUp(java.awt.Event, int)
- list()
- list(java.io.PrintStream)
- list(java.io.PrintWriter)
- location()
- lostFocus(java.awt.Event, java.lang.Object)
- mouseDown(java.awt.Event, int, int)
- mouseDrag(java.awt.Event, int, int)
- mouseEnter(java.awt.Event, int, int)
- mouseExit(java.awt.Event, int, int)
- mouseMove(java.awt.Event, int, int)
- mouseUp(java.awt.Event, int, int)
- move(int, int)
- nextFocus()
- paintAll(java.awt.Graphics)
- postEvent(java.awt.Event)
- prepareImage(java.awt.Image, int, int, java.awt.image.ImageObserver)
- prepareImage(java.awt.Image, java.awt.image.ImageObserver)
- printAll(java.awt.Graphics)
- processComponentEvent(java.awt.event.ComponentEvent)
- processInputMethodEvent(java.awt.event.InputMethodEvent)
- processMouseEvent(java.awt.event.MouseEvent)
- remove(java.awt.MenuComponent)
- removePropertyChangeListener(java.lang.String, java.beans.PropertyChangeListener)
- repaint()
- repaint(int, int, int, int)
- repaint(long)
- resize(int, int)
- resize(java.awt.Dimension)
- setBounds(int, int, int, int)
- setLocation(int, int)
- setSize(int, int)
- show()
- show(boolean)
- size()
- toString()
- transferFocus()
- add(java.awt.Component)
- add(java.awt.Component, int)
- add(java.awt.Component, java.lang.Object)
- add(java.awt.Component, java.lang.Object, int)
- add(java.lang.String, java.awt.Component)
- addImpl(java.awt.Component, java.lang.Object, int)
- countComponents()
- deliverEvent(java.awt.Event)
- doLayout()
- findComponentAt(int, int)
- findComponentAt(java.awt.Point)
- getComponent(int)
- getComponentAt(int, int)
- getComponentAt(java.awt.Point)
- insets()
- invalidate()
- isAncestorOf(java.awt.Component)
- layout()
- list(java.io.PrintStream, int)
- list(java.io.PrintWriter, int)
- locate(int, int)
- minimumSize()
- paintComponents(java.awt.Graphics)
- preferredSize()
- print(java.awt.Graphics)
- printComponents(java.awt.Graphics)
- processContainerEvent(java.awt.event.ContainerEvent)
- processEvent(java.awt.AWTEvent)
- remove(int)
- remove(java.awt.Component)
- removeAll()
- validate()
- validateTree()
- addNotify()
- computeVisibleRect(java.awt.Rectangle)
- contains(int, int)
- createToolTip()
- firePropertyChange(java.lang.String, boolean, boolean)
- firePropertyChange(java.lang.String, byte, byte)
- firePropertyChange(java.lang.String, char, char)
- firePropertyChange(java.lang.String, double, double)
- firePropertyChange(java.lang.String, float, float)
- firePropertyChange(java.lang.String, int, int)
- firePropertyChange(java.lang.String, java.lang.Object, java.lang.Object)
- firePropertyChange(java.lang.String, long, long)
- firePropertyChange(java.lang.String, short, short)
- fireVetoableChange(java.lang.String, java.lang.Object, java.lang.Object)
- getActionForKeyStroke(javax.swing.KeyStroke)
- getBounds(java.awt.Rectangle)
- getClientProperty(java.lang.Object)
- getComponentGraphics(java.awt.Graphics)
- getConditionForKeyStroke(javax.swing.KeyStroke)
- getInsets(java.awt.Insets)
- getLocation(java.awt.Point)
- getSize(java.awt.Dimension)
- getToolTipLocation(java.awt.event.MouseEvent)
- grabFocus()
- hasFocus()
- isLightweightComponent(java.awt.Component)
- paint(java.awt.Graphics)
- paintBorder(java.awt.Graphics)
- paintChildren(java.awt.Graphics)
- paintComponent(java.awt.Graphics)
- paintImmediately(int, int, int, int)
- paintImmediately(java.awt.Rectangle)
- processComponentKeyEvent(java.awt.event.KeyEvent)
- processFocusEvent(java.awt.event.FocusEvent)
- processKeyEvent(java.awt.event.KeyEvent)
- processMouseMotionEvent(java.awt.event.MouseEvent)
- putClientProperty(java.lang.Object, java.lang.Object)
- registerKeyboardAction(java.awt.event.ActionListener, java.lang.String, javax.swing.KeyStroke, int)
- registerKeyboardAction(java.awt.event.ActionListener, javax.swing.KeyStroke, int)
- removeNotify()
- repaint(java.awt.Rectangle)
- repaint(long, int, int, int, int)
- requestDefaultFocus()
- requestFocus()
- resetKeyboardActions()
- reshape(int, int, int, int)
- revalidate()
- scrollRectToVisible(java.awt.Rectangle)
- setUI(javax.swing.plaf.ComponentUI)
- unregisterKeyboardAction(javax.swing.KeyStroke)
- update(java.awt.Graphics)
- addSelectionInterval(int, int)
- addSelectionPath(javax.swing.tree.TreePath)
- addSelectionPaths(javax.swing.tree.TreePath[])
- addSelectionRow(int)
- addSelectionRows(int[])
- cancelEditing()
- clearSelection()
- clearToggledPaths()
- collapsePath(javax.swing.tree.TreePath)
- collapseRow(int)
- convertValueToText(java.lang.Object, boolean, boolean, boolean, int, boolean)
- createTreeModel(java.lang.Object)
- createTreeModelListener()
- expandPath(javax.swing.tree.TreePath)
- expandRow(int)
- fireTreeCollapsed(javax.swing.tree.TreePath)
- fireTreeExpanded(javax.swing.tree.TreePath)
- fireTreeWillCollapse(javax.swing.tree.TreePath)
- fireTreeWillExpand(javax.swing.tree.TreePath)
- fireValueChanged(javax.swing.event.TreeSelectionEvent)
- getClosestPathForLocation(int, int)
- getClosestRowForLocation(int, int)
- getDefaultTreeModel()
- getDescendantToggledPaths(javax.swing.tree.TreePath)
- getExpandedDescendants(javax.swing.tree.TreePath)
- getPathBetweenRows(int, int)
- getPathBounds(javax.swing.tree.TreePath)
- getPathForLocation(int, int)
- getPathForRow(int)
- getRowBounds(int)
- getRowForLocation(int, int)
- getRowForPath(javax.swing.tree.TreePath)
- getScrollableBlockIncrement(java.awt.Rectangle, int, int)
- getScrollableUnitIncrement(java.awt.Rectangle, int, int)
- getToolTipText(java.awt.event.MouseEvent)
- hasBeenExpanded(javax.swing.tree.TreePath)
- isCollapsed(int)
- isCollapsed(javax.swing.tree.TreePath)
- isExpanded(int)
- isExpanded(javax.swing.tree.TreePath)
- isPathEditable(javax.swing.tree.TreePath)
- isPathSelected(javax.swing.tree.TreePath)
- isRowSelected(int)
- isVisible(javax.swing.tree.TreePath)
- makeVisible(javax.swing.tree.TreePath)
- paramString()
- removeDescendantToggledPaths(java.util.Enumeration)
- removeSelectionInterval(int, int)
- removeSelectionPath(javax.swing.tree.TreePath)
- removeSelectionPaths(javax.swing.tree.TreePath[])
- removeSelectionRow(int)
- removeSelectionRows(int[])
- scrollPathToVisible(javax.swing.tree.TreePath)
- scrollRowToVisible(int)
- setExpandedState(javax.swing.tree.TreePath, boolean)
- setSelectionInterval(int, int)
- startEditingAtPath(javax.swing.tree.TreePath)
- stopEditing()
- treeDidChange()
- updateUI()
JdbTree event listeners
JdbTree variables
dataBinder
protected DBTreeDataBinder dataBinder
The DBTreeDataBinder
that makes this a data-aware component.
JdbTree constructors
JdbTree()
public JdbTree()
Creates a JdbTree
component by calling the constructor of this
class that takes an array of Object
s and passing it a newly instantiated empty array.
JdbTree(java.lang.Object[])
public JdbTree(Object[] value)
Creates a JdbTree
component that is populated with an array of Object
s by calling the constructor of its superclass and passing the specified array.
Parameters:
value
- The array of
Object
s that become nodes of the tree.
JdbTree(java.util.Hashtable)
public JdbTree(Hashtable value)
Creates a JdbTree
component by calling the constructor of its superclass, passing it the specified Hashtable
.
Parameters:
value
- The
Hashtable
with the values that become the nodes of the tree.
JdbTree(java.util.Vector)
public JdbTree(Vector value)
Creates a JdbTree
component by calling the constructor of its superclass and passing it the specified Vector
.
Parameters:
value
- The
Vector
that contains the values that become the nodes of the tree.
JdbTree(javax.swing.tree.TreeModel)
public JdbTree(TreeModel treeModel)
Creates a JdbTree
component by calling the constructor of its superclass and passing it the specified TreeModel
.
Parameters:
treeModel
- The
TreeModel
that contains the values that become the nodes of the tree.
JdbTree(javax.swing.tree.TreeNode)
public JdbTree(TreeNode root)
Creates a JdbTree
component by calling the constructor of its superclass and passing it the specified TreeNode
.
Parameters:
root
- The
TreeNode
that becomes the first or root node of the tree.
JdbTree(javax.swing.tree.TreeNode, boolean)
public JdbTree(TreeNode root, boolean asksAllowsChildren)
Creates a JdbTree
component that is populated with a TreeNode
. Calls the constructor of this
class that takes a TreeModel
as a parameter, passing it a newly instantiated model using the specified root node and asksAllowsChildren
value.
Parameters:
root
- The
TreeNode
that becomes the first or root node of the tree.
asksAllowsChildren
- Determines whether the tree can have child nodes.
JdbTree properties
columnName
public String getColumnName()
public void setColumnName(String columnName)
Returns and sets the column name of the DataSet
to which the JdbTree
is bound.
See also:
dataSet
dataSet
public DataSet getDataSet()
public void setDataSet(DataSet dataSet)
Returns and sets the DataSet
to which the JdbTree
is bound.
See also:
columnName
unknownDataValueMode
public int getUnknownDataValueMode()
public void setUnknownDataValueMode(int mode)
Returns and sets the policy for setting the tree state when synchronizing a tree with its DataSet
value when the value doesn't match either of the selectedDataValue
or unselectedDataValue
property values. These are the values used for the mode
parameter:
- DEFAULT - Clears the current tree selection if the
DataSet
value can't be found in the tree.
- DISABLE_COMPONENT - Disables the tree if the
DataSet
value can't be found in the tree.
- CLEAR_VALUE - Clears the
DataSet
value if it doesn't match any value in the tree and clears the current tree selection.
See also:
DBTreeDataBinder
useLeafNodesOnly
public boolean isUseLeafNodesOnly()
public void setUseLeafNodesOnly(boolean useLeafNodesOnly)
Returns whether to ignore internal node values during selection changes and when locating nodes by value.
Sets whether to ignore internal node values during selection changes and when locating nodes by value.
JdbTree methods
commonInit()
protected void commonInit()
Used to initialize JdbTree
with the same defaults, regardless of the constructor used.
JdbTree event listeners
This component is a source for the following event sets.
ancestor
public void addAncestorListener(javax.swing.event.AncestorListener )
public void removeAncestorListener(javax.swing.event.AncestorListener )
component
public synchronized void addComponentListener(java.awt.event.ComponentListener )
public synchronized void removeComponentListener(java.awt.event.ComponentListener )
container
public synchronized void addContainerListener(java.awt.event.ContainerListener )
public synchronized void removeContainerListener(java.awt.event.ContainerListener )
focus
public synchronized void addFocusListener(java.awt.event.FocusListener )
public synchronized void removeFocusListener(java.awt.event.FocusListener )
inputMethod
public synchronized void addInputMethodListener(java.awt.event.InputMethodListener )
public synchronized void removeInputMethodListener(java.awt.event.InputMethodListener )
key
public synchronized void addKeyListener(java.awt.event.KeyListener )
public synchronized void removeKeyListener(java.awt.event.KeyListener )
mouse
public synchronized void addMouseListener(java.awt.event.MouseListener )
public synchronized void removeMouseListener(java.awt.event.MouseListener )
mouseMotion
public synchronized void addMouseMotionListener(java.awt.event.MouseMotionListener )
public synchronized void removeMouseMotionListener(java.awt.event.MouseMotionListener )
propertyChange
public synchronized void addPropertyChangeListener(java.beans.PropertyChangeListener )
public synchronized void removePropertyChangeListener(java.beans.PropertyChangeListener )
treeExpansion
public void addTreeExpansionListener(javax.swing.event.TreeExpansionListener )
public void removeTreeExpansionListener(javax.swing.event.TreeExpansionListener )
treeSelection
public void addTreeSelectionListener(javax.swing.event.TreeSelectionListener )
public void removeTreeSelectionListener(javax.swing.event.TreeSelectionListener )
treeWillExpand
public void addTreeWillExpandListener(javax.swing.event.TreeWillExpandListener )
public void removeTreeWillExpandListener(javax.swing.event.TreeWillExpandListener )
vetoableChange
public synchronized void addVetoableChangeListener(java.beans.VetoableChangeListener )
public synchronized void removeVetoableChangeListener(java.beans.VetoableChangeListener )