Oracle Data-aware Controls Reference

oracle.dacf.control.swing
Class TreeControl

java.lang.Object
  extended byjava.awt.Component
      extended byjava.awt.Container
          extended byjavax.swing.JComponent
              extended byjavax.swing.JPanel
                  extended byoracle.dacf.control.swing.TreeControl
All Implemented Interfaces:
javax.accessibility.Accessible, Control, ControlEnabledListener, CurrencyListener, javax.infobus.DataItemChangeListener, java.util.EventListener, java.awt.event.FocusListener, java.awt.image.ImageObserver, InfoBusManagerListener, java.awt.MenuContainer, java.io.Serializable

public class TreeControl
extends javax.swing.JPanel
implements Control, InfoBusManagerListener, ControlEnabledListener, CurrencyListener, java.awt.event.FocusListener

A JTree based data aware control.

The TreeControl will, within the context of the DataItems that it is observing, maintain a synchronized representation of the underlying DataItems. When the focus is moved from one control to another and the TreeControl is observing the underlying DataItems, it will move its selection indicator so that the DataItem being manipulated by the focused control is selected in the tree. The TreeControl will move the current row in the DataItems that it is observing so that the path of nodes from the root node to the selected node selects the current row in the appropriate DataItems when the user selects a new node in the tree.

Operational constraints:

Version:
PUBLIC
See Also:
Serialized Form

Nested Class Summary
 class TreeControl.InterceptTreeKeyStrokeAction
           
 class TreeControl.TreeControlTree
          A subclass of JTree that only supports the TreeSelectionModel.SINGLE_TREE_SELECTION selection model.
 
Nested classes inherited from class javax.swing.JPanel
javax.swing.JPanel.AccessibleJPanel
 
Nested classes inherited from class javax.swing.JComponent
javax.swing.JComponent.AccessibleJComponent
 
Nested classes inherited from class java.awt.Container
java.awt.Container.AccessibleAWTContainer
 
Nested classes inherited from class java.awt.Component
java.awt.Component.AccessibleAWTComponent, java.awt.Component.BltBufferStrategy, java.awt.Component.FlipBufferStrategy
 
Field Summary
 
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 oracle.dacf.control.Control
DEFAULT_INFOBUS_NAME, EVENT_PROPERTY_ROW, EVENT_PROPERTY_ROW_CHANGE, EVENT_PROPERTY_ROW_COUNT, EVENT_PROPERTY_VIEW_CHANGE, EVENT_PROPERTY_VIEW_REFRESHED, EVENT_PROPERTY_VIEW_SCROLLED, EXCLUDE, HIDE, SHOW
 
Fields inherited from interface java.awt.image.ImageObserver
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH
 
Constructor Summary
TreeControl()
          Constructs a TreeControl that uses a TreeDataSource data model.
TreeControl(java.util.Hashtable value)
          Returns a Tree create from a Hashtable which does not display the root.
TreeControl(java.lang.Object[] value)
          Returns a Tree with each element of the specified array as the child of a new root node which is not displayed.
TreeControl(javax.swing.tree.TreeModel newModel)
          Returns an instance of Tree which displays the root node -- the tree is created using the specified data model.
TreeControl(javax.swing.tree.TreeNode root)
          Returns a Tree with the specified TreeNode as its root which is not displayed.
TreeControl(javax.swing.tree.TreeNode root, boolean asksAllowsChildren)
          Returns a Tree with the specified TreeNode as its root, which displays the root node and which decides whether a node is a leaf node in the specified manner.
TreeControl(java.util.Vector value)
          Returns a Tree with each element of the specified Vector as the child of a new root node which is not displayed.
 
Method Summary
 void addNavigatedListener(NavigatedListener listener)
          Adds a navigated listener to this control.
 void addNavigatingListener(NavigatingListener listener)
          Adds a navigating listener to this control.
 void currencyChanged(CurrencyChangedEvent e)
          This method is used to track the change of keyboard focus.
 void dataItemAdded(javax.infobus.DataItemAddedEvent e)
          Indicates that a new item was added to the bound aggregate data item (e.g.
 void dataItemChanged(java.lang.Object oldDataItem, java.lang.Object newDataItem)
          Notifies the control that the bound InfoBus DataItem has changed.
 void dataItemDeleted(javax.infobus.DataItemDeletedEvent e)
          Indicates that an item was deleted from the bound aggregate data item (e.
 void dataItemRevoked(javax.infobus.DataItemRevokedEvent e)
          Indicates that the bound data item (and its sub-items, if any) has been revoked, and is temporarily unavailable.
 void dataItemValueChanged(javax.infobus.DataItemValueChangedEvent e)
          Indicates a changed value in the bound data item.
 void enabledChanged(boolean b)
           
 void focusGained(java.awt.event.FocusEvent event)
          This method is an implementaion side effect
 void focusLost(java.awt.event.FocusEvent event)
          This method is an implementaion side effect
 java.awt.Color getBackgroundNonSelectionColor()
          Returns the color to use for the background if node is notselected.
 java.awt.Color getBackgroundSelectionColor()
          Returns the color to use for the background if node is selected.
 java.awt.Component getComponent()
          Returns the AWT component associated with this control.
 java.awt.Color getCurrentRowBackground()
          Return the background current row color.
 java.awt.Color getCurrentRowForeground()
          Return the Foreground current row color.
 java.lang.Object getDataItem()
          Returns the InfoBus DataItem bound to selected node.
 java.lang.String getDataItemName()
          Returns the name of the InfoBus DataItem bound to the root node.
 java.lang.Object[] getDataItems()
          Returns a list of DataItems is bound to each level of the tree.
 java.lang.String getInfoBusName()
          Returns the name of the InfoBus this control is connected to.
 java.lang.String[][] getNodeDefinitions()
          Returns the node definitions.
 java.lang.String getRootNodeLabel()
          Returns the label of the root node in the tree.
 java.awt.Color getTextNonSelectionColor()
          Sets the color the text is drawn with when the node isn't selected.
 java.awt.Color getTextSelectionColor()
          Returns the color the text is drawn with when the node is selected.
 javax.swing.JTree getTree()
          returns the underlying JTree.
 javax.swing.tree.TreeModel getTreeModel()
          Return the TreeModel used by the tree.
 boolean isCurrentRowIndicated()
          Return whether the current row is indicated in the tree.
 boolean isFocusValidated()
          Determines whether focus into this control causes validation to occur.
 boolean isSelfReferential()
          Returns whether the nodes definitions are self-referential.
 void processNavigatedEvent(NavigatedEvent event)
          Processes a navigated event for this control.
 void processNavigatingEvent(NavigatingEvent event)
          Processes a navigating event for this control.
 void releaseResources(InfoBusManagerReleaseEvent e)
          A signalling method used to indicate the the control should free all resources and unregister any listeners that it has registered.
 void removeNavigatedListener(NavigatedListener listener)
          Removes a navigated listener from this control.
 void removeNavigatingListener(NavigatingListener listener)
          Removes a navigating listener from this control.
 void rowsetCursorMoved(javax.infobus.RowsetCursorMovedEvent e)
          Indicates that the cursor for the bound RowsetAccess data item has changed rows.
 void setBackground(java.awt.Color c)
          Sets the background color of the TreeControl.
 void setBackgroundNonSelectionColor(java.awt.Color color)
          Sets the color to use for the background if node is not selected.
 void setBackgroundSelectionColor(java.awt.Color color)
          Sets the color to use for the background if node is selected.
 void setCurrentRowBackground(java.awt.Color currentRowBackground)
          Set the background current row color.
 void setCurrentRowForeground(java.awt.Color currentRowForeground)
          Set the foreground current row color.
 void setCurrentRowIndicated(boolean currentRowIndicated)
          Sets whether the current row is indicated in the tree.
 void setDataItemName(java.lang.String dataItemName)
          Sets the name of the InfoBus DataItem to which this control is bound.
 void setEnabled(boolean b)
          An override of java.awt.Component.setEnabled.
 void setFocusValidated(boolean focusValidated)
          Sets whether focus into this control causes validation to occur.
 void setForeground(java.awt.Color c)
          Sets the foreground color of the TreeControl.
 void setInfoBusName(java.lang.String infoBusName)
          Sets the name of the InfoBus this control is connected to.
 void setNodeDefinitions(java.lang.String[][] defs)
          Sets the node definitions.
 void setRootNodeLabel(java.lang.String nuRootNodeLabel)
          Set the label of the root node in the tree.
 void setSelfReferential(boolean selfReferential)
          Sets whether the nodes definitions are self-referential.
 void setTextNonSelectionColor(java.awt.Color color)
          Returns the color the text is drawn with when the node isn't selected.
 void setTextSelectionColor(java.awt.Color color)
          Sets the color the text is drawn with when the node is selected.
 void setToolTipText(java.lang.String text)
           
 void setTreeModel(javax.swing.tree.TreeModel nuTreeModel)
          Set the TreeModel to use for the tree.
 
Methods inherited from class javax.swing.JPanel
getAccessibleContext, getUI, getUIClassID, paramString, setUI, updateUI
 
Methods inherited from class javax.swing.JComponent
addAncestorListener, addNotify, addPropertyChangeListener, addPropertyChangeListener, addVetoableChangeListener, computeVisibleRect, contains, createToolTip, disable, enable, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, fireVetoableChange, getActionForKeyStroke, getActionMap, getAlignmentX, getAlignmentY, getAncestorListeners, getAutoscrolls, getBorder, getBounds, getClientProperty, getComponentGraphics, 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, paintBorder, paintChildren, paintComponent, paintImmediately, paintImmediately, print, printAll, printBorder, printChildren, printComponent, processComponentKeyEvent, processKeyBinding, processKeyEvent, processMouseMotionEvent, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removeNotify, removePropertyChangeListener, removePropertyChangeListener, removeVetoableChangeListener, repaint, repaint, requestDefaultFocus, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, resetKeyboardActions, reshape, revalidate, scrollRectToVisible, setActionMap, setAlignmentX, setAlignmentY, setAutoscrolls, setBorder, setDebugGraphicsOptions, setDefaultLocale, setDoubleBuffered, setFont, setInputMap, setInputVerifier, setMaximumSize, setMinimumSize, setNextFocusableComponent, setOpaque, setPreferredSize, setRequestFocusEnabled, setTransferHandler, setUI, setVerifyInputWhenFocusTarget, setVisible, unregisterKeyboardAction, update
 
Methods inherited from class java.awt.Container
add, add, add, add, add, addContainerListener, addImpl, 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, processContainerEvent, processEvent, remove, remove, removeAll, removeContainerListener, setFocusCycleRoot, setFocusTraversalKeys, setFocusTraversalPolicy, 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, 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, processComponentEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processMouseEvent, processMouseWheelEvent, 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
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

TreeControl

public TreeControl()
Constructs a TreeControl that uses a TreeDataSource data model.

This form of TreeControl will be InfoBus enabled. The data used to populate the tree will be extracted from the database. The client object will not be responsible for supplying the data displayed in the tree.


TreeControl

public TreeControl(java.lang.Object[] value)
Returns a Tree with each element of the specified array as the child of a new root node which is not displayed.

This form of TreeControl will NOT be InfoBus enabled. The client object will be responsible for supplying the data displayed in the tree. In addition, the tree will use the default data model as it's data model.

Parameters:
value - an array of Objects

TreeControl

public TreeControl(java.util.Vector value)
Returns a Tree with each element of the specified Vector as the child of a new root node which is not displayed. This form of TreeControl will NOT be InfoBus enabled. The client object will be responsible for supplying the data displayed in the tree. In addition, the tree will use the default data model as it's data model.

Parameters:
value - a Vector

TreeControl

public TreeControl(java.util.Hashtable value)
Returns a Tree create from a Hashtable which does not display the root. Each value-half of the key/value pairs in the HashTable becomes a child of the new root node. By default, the tree defines a leaf node as any node without children. This form of TreeControl will NOT be InfoBus enabled. The client object will be responsible for supplying the data displayed in the tree. In addition, the tree will the default data model as it's data model.

Parameters:
value - a Hashtable

TreeControl

public TreeControl(javax.swing.tree.TreeNode root)
Returns a Tree with the specified TreeNode as its root which is not displayed. By default, the tree defines a leaf node as any node without children. This form of TreeControl will NOT be InfoBus enabled. The client object will be responsible for supplying the data displayed in the tree. In addition, the tree will use the default data model as it's data model.

Parameters:
root - a TreeNode object
See Also:
DefaultTreeModel.asksAllowsChildren

TreeControl

public TreeControl(javax.swing.tree.TreeNode root,
                   boolean asksAllowsChildren)
Returns a Tree with the specified TreeNode as its root, which displays the root node and which decides whether a node is a leaf node in the specified manner. This form of TreeControl will NOT be InfoBus enabled. The client object will be responsible for supplying the data displayed in the tree. In addition, the tree will use the default data model as it's data model.

Parameters:
root - a TreeNode object
asksAllowsChildren - if false, any node without children is a leaf node. If true, only nodes that do not allow children are leaf nodes.
See Also:
DefaultTreeModel.asksAllowsChildren

TreeControl

public TreeControl(javax.swing.tree.TreeModel newModel)
Returns an instance of Tree which displays the root node -- the tree is created using the specified data model. This form of TreeControl will be InfoBus enabled if the data model supplied is an instance of TreeDataModel. In that case, the data used to populate the tree will be extracted from the database. The client object will not be responsible for supplying the data displayed in the tree.

When the supplied data model is not an instance of TreeDataModel, the TreeControl will NOT be InfoBus enabled. The client object will be responsible for supplying the data displayed in the tree. In addition, the tree will use the default data model as it's data model.

Parameters:
newModel - the TreeModel to use as the data model
Method Detail

setCurrentRowIndicated

public void setCurrentRowIndicated(boolean currentRowIndicated)
Sets whether the current row is indicated in the tree.

A value of FALSE will result in backwards compatible display behavior.

Parameters:
currentRowIndicated - if TRUE, then the current row will be indicated.
See Also:
isCurrentRowIndicated()

isCurrentRowIndicated

public boolean isCurrentRowIndicated()
Return whether the current row is indicated in the tree.

A value of FALSE indicates backwards compatible display behavior.

Returns:
Return whether the current row is indicated in the tree.
See Also:
setCurrentRowIndicated(boolean currentRowIndicated)

setTextNonSelectionColor

public void setTextNonSelectionColor(java.awt.Color color)
Returns the color the text is drawn with when the node isn't selected.

See Also:
getTextNonSelectionColor()

getTextNonSelectionColor

public java.awt.Color getTextNonSelectionColor()
Sets the color the text is drawn with when the node isn't selected.

See Also:
setTextNonSelectionColor(Color color)

setTextSelectionColor

public void setTextSelectionColor(java.awt.Color color)
Sets the color the text is drawn with when the node is selected.

See Also:
getTextSelectionColor()

getTextSelectionColor

public java.awt.Color getTextSelectionColor()
Returns the color the text is drawn with when the node is selected.

See Also:
setTextSelectionColor(Color textSelectionColor)

setBackgroundSelectionColor

public void setBackgroundSelectionColor(java.awt.Color color)
Sets the color to use for the background if node is selected.

See Also:
getBackgroundSelectionColor()

getBackgroundSelectionColor

public java.awt.Color getBackgroundSelectionColor()
Returns the color to use for the background if node is selected.

See Also:
setBackgroundSelectionColor(Color color)

setBackgroundNonSelectionColor

public void setBackgroundNonSelectionColor(java.awt.Color color)
Sets the color to use for the background if node is not selected.

See Also:
getBackgroundSelectionColor()

getBackgroundNonSelectionColor

public java.awt.Color getBackgroundNonSelectionColor()
Returns the color to use for the background if node is notselected.

See Also:
setBackgroundNonSelectionColor(Color backgroundNonSelectionColor)

setCurrentRowBackground

public void setCurrentRowBackground(java.awt.Color currentRowBackground)
Set the background current row color. The TreeControl always high-lights the current row using the CurrentRow colors.

Parameters:
currentRowBackground - The color to be used to display the background of a node when it maps to the current row

getCurrentRowBackground

public java.awt.Color getCurrentRowBackground()
Return the background current row color. The TreeControl always high-lights the current row using the CurrentRow colors.

Returns:
The color to be used to display the background of a node when it maps to the current row
See Also:
setCurrentRowBackground(Color currentRowBackground)

setCurrentRowForeground

public void setCurrentRowForeground(java.awt.Color currentRowForeground)
Set the foreground current row color. The TreeControl always high-lights the current row using the CurrentRow colors.

Parameters:
currentRowForeground - The color to be used to display the foreground of a node when it maps to the current row

getCurrentRowForeground

public java.awt.Color getCurrentRowForeground()
Return the Foreground current row color. The TreeControl always high-lights the current row using the CurrentRow colors.

Returns:
The color to be used to display the Foreground of a node when it maps to the current row
See Also:
setCurrentRowForeground(Color currentRowForeground)

setForeground

public void setForeground(java.awt.Color c)
Sets the foreground color of the TreeControl.

Parameters:
c - the new color value for the foreground

setBackground

public void setBackground(java.awt.Color c)
Sets the background color of the TreeControl.

Parameters:
c - the new color value for the background

setRootNodeLabel

public void setRootNodeLabel(java.lang.String nuRootNodeLabel)
Set the label of the root node in the tree.

Parameters:
nuRootNodeLabel - label of the root node
See Also:
getRootNodeLabel()

getRootNodeLabel

public java.lang.String getRootNodeLabel()
Returns the label of the root node in the tree.

Returns:
the label of the root node
See Also:
setRootNodeLabel(String nuRootNodeLabel)

getNodeDefinitions

public java.lang.String[][] getNodeDefinitions()
Returns the node definitions.

A node is defined by the DataItem supplying the data, the column linking to the child node and the column that is displayed.

The node definitions is as follows:

The primary and foreign key column lists are comma lists like:
Col1, Col2

Returns:
an array of arrays of Strings listing the node definition
See Also:
#setNodeDefinitions(String[][5] defs)

setNodeDefinitions

public void setNodeDefinitions(java.lang.String[][] defs)
Sets the node definitions.

A node is defined by the DataItem supplying the data, the column linking to the child node and the column that is displayed.

The node definitions is as follows:

The primary and foreign key column lists are comma lists like:
Col1, Col2

The self-referential property will be set to false if the length of def is greater than 1.

Parameters:
defs - an array of arrays of Strings listing the node definition
See Also:
getNodeDefinitions(), setSelfReferential(boolean selfReferential)

setSelfReferential

public void setSelfReferential(boolean selfReferential)
Sets whether the nodes definitions are self-referential.

A self-referential relationship is one where the link column points to another node of the same "shape". Generally speaking, when the node definitions define a self-referential relationship, there should be only a single node definition.

Parameters:
selfReferential - whether the nodes definitions are self-referential.
See Also:
isSelfReferential(), #setNodeDefinitions(String[][5] defs), getNodeDefinitions()

isSelfReferential

public boolean isSelfReferential()
Returns whether the nodes definitions are self-referential.

A self-referential relationship is one where the link column points to another node of the same "shape". Generally speaking, when the node definitions define a self-referential relationship, there should be only a single node definition.

Returns:
whether the nodes definitions are self-referential.
See Also:
setSelfReferential(boolean selfReferential), #setNodeDefs(String[][5] defs), #getNodeDefs()

getTree

public javax.swing.JTree getTree()
returns the underlying JTree.

Returns:
the underlying JTree

setTreeModel

public void setTreeModel(javax.swing.tree.TreeModel nuTreeModel)
Set the TreeModel to use for the tree.

Parameters:
nuTreeModel - the TreeModel to use for the tree
See Also:
getTreeModel()

getTreeModel

public javax.swing.tree.TreeModel getTreeModel()
Return the TreeModel used by the tree.

Returns:
the TreeModel used by the tree.
See Also:
setTreeModel(TreeModel nuTreeModel)

setToolTipText

public void setToolTipText(java.lang.String text)

releaseResources

public void releaseResources(InfoBusManagerReleaseEvent e)
Description copied from interface: InfoBusManagerListener
A signalling method used to indicate the the control should free all resources and unregister any listeners that it has registered.

Specified by:
releaseResources in interface InfoBusManagerListener

setEnabled

public void setEnabled(boolean b)
An override of java.awt.Component.setEnabled.

Specified by:
setEnabled in interface Control
Parameters:
b - boolean flag indicating whether the control is enabled

getInfoBusName

public java.lang.String getInfoBusName()
Returns the name of the InfoBus this control is connected to.

Delegated to ControlSupport.

Specified by:
getInfoBusName in interface Control
Returns:
The name of the InfoBus this control is connected to.
See Also:
ControlSupport#getInfoBusName

setInfoBusName

public void setInfoBusName(java.lang.String infoBusName)
Sets the name of the InfoBus this control is connected to.

By default, the control is connected to the default InfoBus, named DEFAULT_INFOBUS_NAME.

If the named InfoBus does not exist, it is created automatically.

If the control is already connected to an InfoBus, it is disconnected first.

Delegated to ControlSupport.

Specified by:
setInfoBusName in interface Control
Parameters:
infoBusName - The name of the InfoBus to connect to.
See Also:
Control.DEFAULT_INFOBUS_NAME, ControlSupport#setInfoBusName

getDataItemName

public java.lang.String getDataItemName()
Returns the name of the InfoBus DataItem bound to the root node.

Specified by:
getDataItemName in interface Control
Returns:
The name of the DataItem bound to the root node.
See Also:
#setNodeDefinitions(String[][5] defs), getNodeDefinitions(), getDataItem(), ControlSupport#setDataItemName, getDataItem(), ControlSupport#getDataItemName

setDataItemName

public void setDataItemName(java.lang.String dataItemName)
Sets the name of the InfoBus DataItem to which this control is bound.

This method is ignored because the functionality is limited. It has been replaced by setNodeDefinitions().

Specified by:
setDataItemName in interface Control
Parameters:
dataItemName - The name of the DataItem to bind to.
See Also:
#setNodeDefinitions(String[][5] defs), getNodeDefinitions(), getDataItem(), ControlSupport#setDataItemName

getDataItem

public java.lang.Object getDataItem()
Returns the InfoBus DataItem bound to selected node.

To get the full list of DataItems, one should use getDataItems().

Specified by:
getDataItem in interface Control
Returns:
The InfoBus DataItem bound to the currently selected node, or null if there isn't a selected node.
See Also:
getDataItems(), ControlSupport#getDataItem

getDataItems

public java.lang.Object[] getDataItems()
Returns a list of DataItems is bound to each level of the tree.

Returns:
a list of InfoBus DataItems bound to each level of the tree, or null if the control is unbound.
See Also:
getDataItem(), ControlSupport#getDataItem

dataItemChanged

public void dataItemChanged(java.lang.Object oldDataItem,
                            java.lang.Object newDataItem)
Notifies the control that the bound InfoBus DataItem has changed.

Specified by:
dataItemChanged in interface Control
Parameters:
oldDataItem - The formerly bound DataItem (can be null).
newDataItem - The newly bound DataItem (can be null).

getComponent

public java.awt.Component getComponent()
Returns the AWT component associated with this control.

Specified by:
getComponent in interface Control
Returns:
The AWT component for this control.

isFocusValidated

public boolean isFocusValidated()
Determines whether focus into this control causes validation to occur.

Delegated to ControlSupport.

Specified by:
isFocusValidated in interface Control
Returns:
true if focus into this control causes validation to occur, false otherwise.
See Also:
ControlSupport#isFocusValidated

setFocusValidated

public void setFocusValidated(boolean focusValidated)
Sets whether focus into this control causes validation to occur.

Delegated to ControlSupport.

Specified by:
setFocusValidated in interface Control
Parameters:
focusValidated - If true, focus into this control will cause validation to occur.
See Also:
ControlSupport#setFocusValidated

addNavigatingListener

public void addNavigatingListener(NavigatingListener listener)
Adds a navigating listener to this control.

The listener will be notified of NavigateIn and NavigateOut events.

Delegate to ControlSupport.

Specified by:
addNavigatingListener in interface Control
Parameters:
listener - The listener to add.
See Also:
ControlSupport#addNavigatedListener

removeNavigatingListener

public void removeNavigatingListener(NavigatingListener listener)
Removes a navigating listener from this control.

Delegated to ControlSupport.

Specified by:
removeNavigatingListener in interface Control
Parameters:
listener - The listener to remove.
See Also:
ControlSupport#removeNavigatedListener

processNavigatingEvent

public void processNavigatingEvent(NavigatingEvent event)
                            throws NavigatingException
Processes a navigating event for this control.

This method is for use by the NavigatedManager only.

Delegated to ControlSupport.

Specified by:
processNavigatingEvent in interface Control
Parameters:
event - The navigating event.
Throws:
NavigatingException - If the navigation is redirected to a different control.
See Also:
ControlSupport#processNavigatedEvent

addNavigatedListener

public void addNavigatedListener(NavigatedListener listener)
Adds a navigated listener to this control.

The listener will be notified of NavigateIn and NavigateOut events.

Delegated to ControlSupport.

Specified by:
addNavigatedListener in interface Control
Parameters:
listener - The listener to add.
See Also:
ControlSupport#addNavigatedListener

removeNavigatedListener

public void removeNavigatedListener(NavigatedListener listener)
Removes a navigated listener from this control.

Delegated to ControlSupport.

Specified by:
removeNavigatedListener in interface Control
Parameters:
listener - The listener to remove.
See Also:
ControlSupport#removeNavigatedListener

processNavigatedEvent

public void processNavigatedEvent(NavigatedEvent event)
Processes a navigated event for this control.

This method is for use by the NavigationManager only.

Delegated to ControlSupport.

Specified by:
processNavigatedEvent in interface Control
Parameters:
event - The navigated event.
See Also:
ControlSupport#processNavigatedEvent

currencyChanged

public void currencyChanged(CurrencyChangedEvent e)
This method is used to track the change of keyboard focus.

Specified by:
currencyChanged in interface CurrencyListener

dataItemValueChanged

public void dataItemValueChanged(javax.infobus.DataItemValueChangedEvent e)
Indicates a changed value in the bound data item.

A reference to the data item that changed can be obtained from the event.

Specified by:
dataItemValueChanged in interface javax.infobus.DataItemChangeListener
See Also:
DataItemChangeListener.dataItemValueChanged(javax.infobus.DataItemValueChangedEvent)

dataItemAdded

public void dataItemAdded(javax.infobus.DataItemAddedEvent e)
Indicates that a new item was added to the bound aggregate data item (e.g. ArrayAccess, a JDK Collection, etc).

A reference to the data item that was added, and a reference to the one that gained it, can be obtained from the event.

Specified by:
dataItemAdded in interface javax.infobus.DataItemChangeListener
See Also:
DataItemChangeListener.dataItemAdded(javax.infobus.DataItemAddedEvent)

dataItemDeleted

public void dataItemDeleted(javax.infobus.DataItemDeletedEvent e)
Indicates that an item was deleted from the bound aggregate data item (e. g. ArrayAccess, a JDK Collection, etc).

A reference to the data item that was deleted, and a reference to the one that lost it, can be obtained from the event.

Specified by:
dataItemDeleted in interface javax.infobus.DataItemChangeListener
See Also:
DataItemChangeListener.dataItemDeleted(javax.infobus.DataItemDeletedEvent)

dataItemRevoked

public void dataItemRevoked(javax.infobus.DataItemRevokedEvent e)
Indicates that the bound data item (and its sub-items, if any) has been revoked, and is temporarily unavailable.

A reference to the data item that was revoked can be obtained from the event.

Specified by:
dataItemRevoked in interface javax.infobus.DataItemChangeListener
See Also:
DataItemChangeListener.dataItemRevoked(javax.infobus.DataItemRevokedEvent)

rowsetCursorMoved

public void rowsetCursorMoved(javax.infobus.RowsetCursorMovedEvent e)
Indicates that the cursor for the bound RowsetAccess data item has changed rows.

A reference to the rowset data item can be obtained from the event.

Specified by:
rowsetCursorMoved in interface javax.infobus.DataItemChangeListener
See Also:
DataItemChangeListener.rowsetCursorMoved(javax.infobus.RowsetCursorMovedEvent)

enabledChanged

public void enabledChanged(boolean b)
Specified by:
enabledChanged in interface ControlEnabledListener

focusLost

public void focusLost(java.awt.event.FocusEvent event)
This method is an implementaion side effect

Specified by:
focusLost in interface java.awt.event.FocusListener

focusGained

public void focusGained(java.awt.event.FocusEvent event)
This method is an implementaion side effect

Specified by:
focusGained in interface java.awt.event.FocusListener

Oracle Data-aware Controls Reference

 

Copyright © 1997, 2003, Oracle. All rights reserved.