Oracle Fusion Middleware Java API Reference for Oracle Extension SDK Reference
11g Release 1 (11.1.1.6.0)

E13403-07

oracle.ide.controls.tree
Class JTreeCellData

java.lang.Object
  extended by oracle.ide.controls.tree.JTreeCellData
All Implemented Interfaces:
java.lang.Comparable

public class JTreeCellData
extends java.lang.Object
implements java.lang.Comparable

Data structure for describing a tree cell. This is used to direct the behavior of the JTreeCellRenderer.


Field Summary
protected  TriStateBoolean _checkBoxState
          If there is a check box, this variable reports its state.
protected  boolean _hasCheckBox
          If true, then the cell renderer should include a checkbox; if false then no checkbox.
protected  boolean _hasRadioButton
          If true, then the cell renderer should include a radio button; if false then no radio button.
protected  int _heightAdj
          Used to adjust the height of an individual node.
protected  javax.swing.Icon _icon
          The icon shown with the text.
protected  boolean _isArmed
          If true, indicates that the check box is partially committed.
protected  boolean _isCheckBoxEnabled
          This should be true if the tree node's checkbox should have a visual appearance of being enabled.
protected  boolean _isCheckBoxSelectable
          This should be true if the tree node's checkbox is selectable (i.e.
protected  boolean _isPressed
          If true, indicates that the check box should be rendered as being pressed down.
protected  boolean _isRadioButtonEnabled
          This should be true if the tree node's radio button should have a visual appearance of being enabled.
protected  boolean _isRadioButtonSelected
          This should be true if the tree node's radio button should have a visual appearance of being selected.
protected  boolean _isTextEnabled
          This should be true if the tree node's text is drawn as enabled; false otherwise.
protected  boolean _isTextSelectable
          This should be true if the tree node's text is selectable; false otherwise.
protected  java.lang.String _text
          The string label that is shown in the tree.
protected  java.lang.String _toolTipText
          The tooltip to show in the tree.
protected  boolean _useDefaultIcons
          If true, then it instructs the cell renderer to use the default icons in the tree instead of any explicitly specified icons.
protected  java.lang.Object _userObject
          Can be used to hold additional user information.
 
Constructor Summary
JTreeCellData(javax.swing.Icon icon, java.lang.String text)
          A JTreeCellData with only an icon and a text label; there is no checkbox.
JTreeCellData(javax.swing.Icon icon, java.lang.String text, boolean hasCheckBox)
          A JTreeCellData with an icon, text label, and checkbox whose state is initially TriStateBoolean.FALSE.
JTreeCellData(javax.swing.Icon icon, java.lang.String text, boolean hasCheckBox, TriStateBoolean checkBoxState)
           
JTreeCellData(java.lang.String text)
          A JTreeCellData with only a text label; there is no icon or checkbox.
 
Method Summary
 int compareTo(JTreeCellData otherData)
           
 int compareTo(java.lang.Object object)
           
 TriStateBoolean getCheckBoxState()
           
 boolean getHasCheckBox()
           
 boolean getHasRadioButton()
           
 int getHeightAdjustment()
           
 javax.swing.Icon getIcon()
           
 java.lang.String getText()
           
 java.lang.String getToolTipText()
           
 boolean getUseDefaultIcons()
           
 java.lang.Object getUserObject()
           
 boolean isArmed()
           
 boolean isCheckBoxEnabled()
           
 boolean isCheckBoxSelectable()
           
 boolean isEnabled()
          Convenience method.
 boolean isPressed()
           
 boolean isRadioButtonEnabled()
           
 boolean isRadioButtonSelected()
           
 boolean isTextEnabled()
           
 boolean isTextSelectable()
           
 void setArmed(boolean isArmed)
           
 void setCheckBoxEnabled(boolean isCheckBoxEnabled)
           
 void setCheckBoxSelectable(boolean isCheckBoxSelectable)
           
 void setCheckBoxState(boolean checkBoxState)
          Convenience method.
 void setCheckBoxState(TriStateBoolean checkBoxState)
           
 void setEnabled(boolean isEnabled)
          Convenience method.
 void setEnabled(boolean isEnabled, boolean isTextSelectable)
          Convenience method.
 void setHasCheckBox(boolean hasCheckBox)
           
 void setHasRadioButton(boolean hasRadioButton)
          Set radio button for this item.
 void setHeightAdjustment(int heightAdj)
           
 void setIcon(javax.swing.Icon icon)
           
 void setPressed(boolean isPressed)
           
 void setRadioButtonEnabled(boolean enabled)
           
 void setRadioButtonSelected(boolean selected)
           
 void setText(java.lang.String text)
           
 void setTextEnabled(boolean isTextEnabled)
           
 void setTextSelectable(boolean isTextSelectable)
           
 void setToolTipText(java.lang.String toolTipText)
           
 void setUseDefaultIcons(boolean useDefaultIcons)
           
 void setUserObject(java.lang.Object userObject)
           
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

_text

protected java.lang.String _text
The string label that is shown in the tree.


_isTextEnabled

protected boolean _isTextEnabled
This should be true if the tree node's text is drawn as enabled; false otherwise.


_isTextSelectable

protected boolean _isTextSelectable
This should be true if the tree node's text is selectable; false otherwise. Usually, you should allow the text to be selected even if the label itself is disabled. This at least lets the user know that the selection is acknowledged, but no action is permitted.


_toolTipText

protected java.lang.String _toolTipText
The tooltip to show in the tree.


_icon

protected javax.swing.Icon _icon
The icon shown with the text. If null, no icon is shown.


_useDefaultIcons

protected boolean _useDefaultIcons
If true, then it instructs the cell renderer to use the default icons in the tree instead of any explicitly specified icons. Explicitly specified icons do not override this setting because a null for _icon actually means no icon.


_hasCheckBox

protected boolean _hasCheckBox
If true, then the cell renderer should include a checkbox; if false then no checkbox. The checkbox is automatically a tri-state checkbox. To set the checkbox to the third state, call setCheckBoxState(null).


_hasRadioButton

protected boolean _hasRadioButton
If true, then the cell renderer should include a radio button; if false then no radio button.


_isRadioButtonEnabled

protected boolean _isRadioButtonEnabled
This should be true if the tree node's radio button should have a visual appearance of being enabled.


_isRadioButtonSelected

protected boolean _isRadioButtonSelected
This should be true if the tree node's radio button should have a visual appearance of being selected.


_checkBoxState

protected TriStateBoolean _checkBoxState
If there is a check box, this variable reports its state. If no checkbox, then this variable's value is undefined.


_isCheckBoxEnabled

protected boolean _isCheckBoxEnabled
This should be true if the tree node's checkbox should have a visual appearance of being enabled.


_isCheckBoxSelectable

protected boolean _isCheckBoxSelectable
This should be true if the tree node's checkbox is selectable (i.e. if it can be toggled). If false, any attempt to change the checkbox should be ignored.


_isArmed

protected boolean _isArmed
If true, indicates that the check box is partially committed.


_isPressed

protected boolean _isPressed
If true, indicates that the check box should be rendered as being pressed down.


_userObject

protected java.lang.Object _userObject
Can be used to hold additional user information.


_heightAdj

protected int _heightAdj
Used to adjust the height of an individual node.

Constructor Detail

JTreeCellData

public JTreeCellData(java.lang.String text)
A JTreeCellData with only a text label; there is no icon or checkbox.


JTreeCellData

public JTreeCellData(javax.swing.Icon icon,
                     java.lang.String text)
A JTreeCellData with only an icon and a text label; there is no checkbox.


JTreeCellData

public JTreeCellData(javax.swing.Icon icon,
                     java.lang.String text,
                     boolean hasCheckBox)
A JTreeCellData with an icon, text label, and checkbox whose state is initially TriStateBoolean.FALSE.


JTreeCellData

public JTreeCellData(javax.swing.Icon icon,
                     java.lang.String text,
                     boolean hasCheckBox,
                     TriStateBoolean checkBoxState)
Method Detail

compareTo

public int compareTo(java.lang.Object object)
Specified by:
compareTo in interface java.lang.Comparable

compareTo

public int compareTo(JTreeCellData otherData)

setEnabled

public void setEnabled(boolean isEnabled)
Convenience method.


setEnabled

public void setEnabled(boolean isEnabled,
                       boolean isTextSelectable)
Convenience method.


isEnabled

public boolean isEnabled()
Convenience method.


toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object
Returns:
The text value of the node, needed for abbot testing

getText

public java.lang.String getText()

setText

public void setText(java.lang.String text)

isTextEnabled

public boolean isTextEnabled()

setTextEnabled

public void setTextEnabled(boolean isTextEnabled)

isTextSelectable

public boolean isTextSelectable()

setTextSelectable

public void setTextSelectable(boolean isTextSelectable)

getToolTipText

public java.lang.String getToolTipText()

setToolTipText

public void setToolTipText(java.lang.String toolTipText)

getIcon

public javax.swing.Icon getIcon()

setIcon

public void setIcon(javax.swing.Icon icon)

getUseDefaultIcons

public boolean getUseDefaultIcons()

setUseDefaultIcons

public void setUseDefaultIcons(boolean useDefaultIcons)

getHasCheckBox

public boolean getHasCheckBox()

setHasCheckBox

public void setHasCheckBox(boolean hasCheckBox)

getHasRadioButton

public boolean getHasRadioButton()

setRadioButtonEnabled

public void setRadioButtonEnabled(boolean enabled)

setRadioButtonSelected

public void setRadioButtonSelected(boolean selected)

isRadioButtonEnabled

public boolean isRadioButtonEnabled()

isRadioButtonSelected

public boolean isRadioButtonSelected()

setHasRadioButton

public void setHasRadioButton(boolean hasRadioButton)
                       throws java.lang.IllegalStateException
Set radio button for this item. Can't mix radio and check box for the same tree cell data

Throws:
java.lang.IllegalStateException - throw if check box set

getCheckBoxState

public TriStateBoolean getCheckBoxState()

setCheckBoxState

public void setCheckBoxState(TriStateBoolean checkBoxState)

setCheckBoxState

public void setCheckBoxState(boolean checkBoxState)
Convenience method.


isCheckBoxEnabled

public boolean isCheckBoxEnabled()

setCheckBoxEnabled

public void setCheckBoxEnabled(boolean isCheckBoxEnabled)

isCheckBoxSelectable

public boolean isCheckBoxSelectable()

setCheckBoxSelectable

public void setCheckBoxSelectable(boolean isCheckBoxSelectable)

isArmed

public boolean isArmed()

setArmed

public void setArmed(boolean isArmed)

isPressed

public boolean isPressed()

setPressed

public void setPressed(boolean isPressed)

getUserObject

public java.lang.Object getUserObject()

setUserObject

public void setUserObject(java.lang.Object userObject)

getHeightAdjustment

public int getHeightAdjustment()

setHeightAdjustment

public void setHeightAdjustment(int heightAdj)

Oracle Fusion Middleware Java API Reference for Oracle Extension SDK Reference
11g Release 1 (11.1.1.6.0)

E13403-07

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