nextapp.echo
Class NativeCheckBox

java.lang.Object
  extended by nextapp.echo.AbstractComponent
      extended by nextapp.echo.NativeCheckBox
All Implemented Interfaces:
ToolTipPopUpSupport, java.io.Serializable, Component, ToolTipSupport

public class NativeCheckBox
extends AbstractComponent
implements ToolTipPopUpSupport

A selectable "check" button.

See Also:
Serialized Form

Field Summary
 
Fields inherited from interface nextapp.echo.ToolTipSupport
TOOL_TIP_TEXT_CHANGED_PROPERTY
 
Fields inherited from interface nextapp.echo.Component
BACKGROUND_CHANGED_PROPERTY, CHILDREN_CHANGED_PROPERTY, ENABLED_CHANGED_PROPERTY, FONT_CHANGED_PROPERTY, FOREGROUND_CHANGED_PROPERTY, IDENTIFIER_CHANGED_PROPERTY, LOCALE_CHANGED_PROPERTY, MODEL_CHANGED_PROPERTY, SELECTABLE_CHANGED_PROPERTY, STYLE_BACKGROUND, STYLE_FONT, STYLE_FOREGROUND, UPDATE_PROPERTY, VISIBLE_CHANGED_PROPERTY
 
Constructor Summary
NativeCheckBox()
          Creates an initially unselected check box with no text or image.
NativeCheckBox(java.lang.String text)
          Creates an initially unselected check box with the specified text.
NativeCheckBox(java.lang.String text, boolean selected)
          Creates a check box with the specified text and selection state.
 
Method Summary
 void addActionListener(ActionListener listener)
           
 void applyStyle(Style style)
          Sets stylistic properties of this component based on a Style object.
 void fire()
           
 java.lang.String getActionCommand()
           
 int getStateMargin()
           
 java.lang.String getText()
           
 ToolTipPopUp getToolTipPopUp()
          Returns the ToolTipPopUp component used to configure the rich tool tip support.
 java.lang.String getToolTipText()
          Returns the default tool tip text.
 boolean hasActionListeners()
           
 boolean isSelected()
           
 void removeActionListener(ActionListener listener)
           
 void setActionCommand(java.lang.String actionCommand)
           
 void setSelected(boolean selected)
           
 void setStateMargin(int stateMargin)
           
 void setText(java.lang.String text)
           
 void setToolTipText(java.lang.String newValue)
          Sets the default tool tip text.
 
Methods inherited from class nextapp.echo.AbstractComponent
add, add, addHierarchyListener, addPropertyChangeListener, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getBackground, getClientId, getComponent, getComponentCount, getComponents, getEchoInstance, getFont, getForeground, getIdentifier, getListenerList, getLocale, getParent, indexOf, init, isAncestorOf, isDifferent, isEnabled, isFocused, isRecursivelyVisible, isRegistered, isSelectableForScriptRecorder, isShowing, isVisible, processHierarchyEvent, remove, remove, removeAll, removeHierarchyListener, removePropertyChangeListener, setBackground, setClientId, setEnabled, setFocused, setFont, setForeground, setIdentifier, setLocale, setParent, setRegistered, setSelectableForScriptRecorder, setVisible, update, validate
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

NativeCheckBox

public NativeCheckBox()
Creates an initially unselected check box with no text or image.


NativeCheckBox

public NativeCheckBox(java.lang.String text)
Creates an initially unselected check box with the specified text.

Parameters:
text - The text to be displayed in the button.

NativeCheckBox

public NativeCheckBox(java.lang.String text,
                      boolean selected)
Creates a check box with the specified text and selection state.

Parameters:
text - The text to be displayed in the button.
selected - The selection state of the check box.
Method Detail

addActionListener

public void addActionListener(ActionListener listener)

removeActionListener

public void removeActionListener(ActionListener listener)

fire

public void fire()

getActionCommand

public java.lang.String getActionCommand()

setActionCommand

public void setActionCommand(java.lang.String actionCommand)

isSelected

public boolean isSelected()

setSelected

public void setSelected(boolean selected)

getStateMargin

public int getStateMargin()

setStateMargin

public void setStateMargin(int stateMargin)

getText

public java.lang.String getText()

setText

public void setText(java.lang.String text)

getToolTipText

public java.lang.String getToolTipText()
Description copied from interface: ToolTipSupport
Returns the default tool tip text.

Specified by:
getToolTipText in interface ToolTipSupport
Returns:
The tool tip text.

setToolTipText

public void setToolTipText(java.lang.String newValue)
Description copied from interface: ToolTipSupport
Sets the default tool tip text.

Specified by:
setToolTipText in interface ToolTipSupport
Parameters:
newValue - The new tool tip text.

getToolTipPopUp

public ToolTipPopUp getToolTipPopUp()
Description copied from interface: ToolTipPopUpSupport
Returns the ToolTipPopUp component used to configure the rich tool tip support.

Specified by:
getToolTipPopUp in interface ToolTipPopUpSupport
Returns:
a ToolTipPopUp component

hasActionListeners

public boolean hasActionListeners()

applyStyle

public void applyStyle(Style style)
Description copied from interface: Component
Sets stylistic properties of this component based on a Style object. The version of this method in Component will set foreground and background colors and the font from the style if they are present. Components should override this method if they allow more properties to be set from a style object, and should call super.applyStyle() if necessary.

Specified by:
applyStyle in interface Component
Overrides:
applyStyle in class AbstractComponent
Parameters:
style - The style object from which to retrieve properties for this Component.