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

E13403-04

oracle.ide.controls.checkboxlist
Class CheckBoxListCellData

java.lang.Object
  extended by oracle.ide.controls.checkboxlist.CheckBoxListCellData
All Implemented Interfaces:
java.lang.Comparable, Copyable

public class CheckBoxListCellData
extends java.lang.Object
implements java.lang.Comparable, Copyable

Class for describing a checkbox list cell. This is used to direct the behavior of the CheckBoxListCellRenderer.


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  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 list's checkbox should have a visual appearance of being enabled.
protected  boolean _isCheckBoxSelectable
          This should be true if the list'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 _isTextEnabled
          This should be true if the list's text is drawn as enabled; false otherwise.
protected  boolean _isTextSelectable
          This should be true if the list's text is selectable; false otherwise.
protected  java.lang.String _text
          The string label that is shown in the list.
protected  java.lang.String _toolTipText
          The tooltip to show in the list
protected  java.lang.Object _userObject
          Can be used to hold additional user information.
 
Constructor Summary
CheckBoxListCellData(javax.swing.Icon icon, java.lang.String text, boolean hasCheckBox, java.lang.Object userObject)
          A CheckBoxListCellData with an icon, text label, and checkbox whose state is initially TriStateBoolean.FALSE .
CheckBoxListCellData(javax.swing.Icon icon, java.lang.String text, boolean hasCheckBox, TriStateBoolean checkBoxState, java.lang.Object userObject)
          A CheckBoxListCellData with an icon, text label, a checkbox whose state is initially set to checkBoxState.
CheckBoxListCellData(javax.swing.Icon icon, java.lang.String text, boolean hasCheckBox, TriStateBoolean checkBoxState, java.lang.Object userObject, java.lang.String toolTipText)
          A CheckBoxListCellData with an icon, text label, a checkbox whose state is initially set to checkBoxState.
CheckBoxListCellData(javax.swing.Icon icon, java.lang.String text, java.lang.Object userObject)
          A CheckBoxListCellData with an icon and a text label; there is no checkbox.
CheckBoxListCellData(javax.swing.Icon icon, java.lang.String text, java.lang.Object userObject, java.lang.String toolTipText)
          A CheckBoxListCellData with an icon, a text label, and a tooltip; there is no checkbox.
 
Method Summary
 int compareTo(CheckBoxListCellData otherData)
           
 int compareTo(java.lang.Object object)
           
 java.lang.Object copyTo(java.lang.Object target)
          Copies the internal state of this object to the specified copy.
protected  void copyToImpl(CheckBoxListCellData copy)
           
protected  void fireChanged(java.lang.Object source)
           
 TriStateBoolean getCheckBoxState()
           
 java.lang.Object getGroupId()
           
 boolean getHasCheckBox()
           
 int getHeightAdjustment()
           
 javax.swing.Icon getIcon()
           
 java.lang.String getText()
           
 java.lang.String getToolTipText()
           
 java.lang.Object getUserObject()
           
 boolean isArmed()
           
 boolean isCheckBoxEnabled()
           
 boolean isCheckBoxSelectable()
           
 boolean isEnabled()
          Convenience method.
 boolean isGroupTitle()
           
 boolean isPressed()
           
 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 setCheckBoxStateWithoutFiring(TriStateBoolean checkBoxState)
          Sets the state of the checkbox without firing any change event.
 void setEnabled(boolean isEnabled)
          Convenience method.
 void setEnabled(boolean isEnabled, boolean isTextSelectable)
          Convenience method.
 void setGroupId(java.lang.Object groupId)
           
 void setGroupTitle(boolean groupTitle)
           
 void setHasCheckBox(boolean hasCheckBox)
           
 void setHeightAdjustment(int heightAdj)
           
 void setIcon(javax.swing.Icon icon)
           
 void setPressed(boolean isPressed)
           
 void setStateListener(CheckBoxListItemStateListener listener)
           
 void setText(java.lang.String text)
           
 void setTextEnabled(boolean isTextEnabled)
           
 void setTextSelectable(boolean isTextSelectable)
           
 void setToolTipText(java.lang.String toolTipText)
           
 void setUserObject(java.lang.Object userObject)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

_text

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


_isTextEnabled

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


_isTextSelectable

protected boolean _isTextSelectable
This should be true if the list'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.


_icon

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


_hasCheckBox

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


_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 list's checkbox should have a visual appearance of being enabled.


_isCheckBoxSelectable

protected boolean _isCheckBoxSelectable
This should be true if the list'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.


_toolTipText

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


_heightAdj

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

Constructor Detail

CheckBoxListCellData

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

Parameters:
icon - The icon to display in the CheckBoxList
text - The text to display in the CheckBoxList
userObject - the user-data to store

CheckBoxListCellData

public CheckBoxListCellData(javax.swing.Icon icon,
                            java.lang.String text,
                            java.lang.Object userObject,
                            java.lang.String toolTipText)
A CheckBoxListCellData with an icon, a text label, and a tooltip; there is no checkbox.

Parameters:
icon - The icon to display in the CheckBoxList
text - The text to display in the CheckBoxList
userObject - the user-data to store
toolTipText - the text to display as a tooltip

CheckBoxListCellData

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

Parameters:
icon - The icon to display in the CheckBoxList
text - The text to display in the CheckBoxList
hasCheckBox - true if a checkbox is to be displayed; false otherwise
userObject - the user-data to store

CheckBoxListCellData

public CheckBoxListCellData(javax.swing.Icon icon,
                            java.lang.String text,
                            boolean hasCheckBox,
                            TriStateBoolean checkBoxState,
                            java.lang.Object userObject)
A CheckBoxListCellData with an icon, text label, a checkbox whose state is initially set to checkBoxState. The CheckBoxListCellData has the specified userObject and no tooltip.

Parameters:
icon - The icon to display in the CheckBoxList
text - The text to display in the CheckBoxList
hasCheckBox - true if a checkbox is to be displayed; false otherwise
checkBoxState - the initial value to display in the checkbox
userObject - the user-data to store

CheckBoxListCellData

public CheckBoxListCellData(javax.swing.Icon icon,
                            java.lang.String text,
                            boolean hasCheckBox,
                            TriStateBoolean checkBoxState,
                            java.lang.Object userObject,
                            java.lang.String toolTipText)
A CheckBoxListCellData with an icon, text label, a checkbox whose state is initially set to checkBoxState. The CheckBoxListCellData has the specified userObject and a tooltip set.

Parameters:
icon - The icon to display in the CheckBoxList
text - The text to display in the CheckBoxList
hasCheckBox - true if a checkbox is to be displayed; false otherwise
checkBoxState - the initial value to display in the checkbox
userObject - the user-data to store
toolTipText - the text to display as a tooltip
Method Detail

setStateListener

public void setStateListener(CheckBoxListItemStateListener listener)

fireChanged

protected void fireChanged(java.lang.Object source)

compareTo

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

compareTo

public int compareTo(CheckBoxListCellData 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.


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)

getIcon

public javax.swing.Icon getIcon()

setIcon

public void setIcon(javax.swing.Icon icon)

getHasCheckBox

public boolean getHasCheckBox()

setHasCheckBox

public void setHasCheckBox(boolean hasCheckBox)

getCheckBoxState

public TriStateBoolean getCheckBoxState()

setCheckBoxState

public void setCheckBoxState(TriStateBoolean checkBoxState)

setCheckBoxStateWithoutFiring

public void setCheckBoxStateWithoutFiring(TriStateBoolean checkBoxState)
Sets the state of the checkbox without firing any change event.

Parameters:
checkBoxState - the new state to set.

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)

getToolTipText

public java.lang.String getToolTipText()

setToolTipText

public void setToolTipText(java.lang.String toolTipText)

getHeightAdjustment

public int getHeightAdjustment()

setHeightAdjustment

public void setHeightAdjustment(int heightAdj)

copyTo

public java.lang.Object copyTo(java.lang.Object target)
Description copied from interface: Copyable
Copies the internal state of this object to the specified copy. If copy is null, then this method should create a new instance of this class and proceed to copy the internal state to the newly created object. Generally, only the persistent state of the object should be copied, but whether or not it is appropriate to copy transient properties is at the discretion of the individual implementor.

Regardless of whether the copy occurs to an existing object or to a newly created object, the return value is object to which this object's state was copied.

There is a standard implementation pattern for the copyTo method that helps avoid problems that arise when a Copyable object is subclassed. The pattern is:


    public Object copyTo( Object target )
    {
      final <this_class> copy =
        target != null ? (<this_class>) target : new <this_class>();
      copyToImpl( copy );
      return copy;
    }

    protected final void copyToImpl( <this_class> copy )
    {
      super.copyToImpl( copy );  //  if necessary
      //  put code here for copying the properties of <this_class>
    }
  
The parameter passed into the copyToImpl method is the same type of this class. The responsibility of copyToImpl is to copy the state of this class through direct access of the fields. The copyToImpl method should not use getters and setters since these may be overridden, causing the state of this class to be incompletely copied.

Specified by:
copyTo in interface Copyable
Parameters:
target - The target object to which the state of this object should be copied. If target is null, then the copyTo method will return a new instance of this class.
Returns:
The object to which the state of this object was copied. If the target was non-null, then the return value is the same as the target object that was passed in; otherwise, the return value is a new instance of this class.

copyToImpl

protected final void copyToImpl(CheckBoxListCellData copy)

setGroupId

public void setGroupId(java.lang.Object groupId)

getGroupId

public java.lang.Object getGroupId()

isGroupTitle

public boolean isGroupTitle()

setGroupTitle

public void setGroupTitle(boolean groupTitle)

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

E13403-04

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