com.neuron.app.tonto
Class CCFButton

java.lang.Object
  extended by com.neuron.app.tonto.CCFNode
      extended by com.neuron.app.tonto.CCFButton
All Implemented Interfaces:
INamed, java.lang.Cloneable

public class CCFButton
extends CCFNode
implements INamed

An on-screen button that can be assigned various icons to represent active/inactive and selected/unselected states.


Field Summary
static int STATE_ACTIVE_SELECTED
           
static int STATE_ACTIVE_UNSELECTED
           
static int STATE_INACTIVE_SELECTED
           
static int STATE_INACTIVE_UNSELECTED
           
 
Fields inherited from class com.neuron.app.tonto.CCFNode
TEXT_CENTER, TEXT_LEFT, TEXT_RIGHT
 
Method Summary
 void appendAction(CCFAction a)
           
 void convertToColor()
           
 void convertToGray()
           
 void copyColors(CCFButton src)
           
 void copyIcons(CCFButton src)
           
 void delete()
          Deletes this child from it's parent.
 CCFActionList getActionList()
          Returns the action list that is performed when this Button is clicked.
 CCFAction[] getActions()
           
 CCFColor getBackground()
          Get the background color for this button.
 CCFChild getChildWrapper()
           
 CCFFont getFont()
          Get the CCFFont for this Button.
 CCFColor getForeground()
          Get the foreground color for this button.
 CCFIconSet getIconSet()
          Get the CCFIconSet associated with this Button.
 java.lang.String getIDTag()
          Return the ID tag for this Button.
 java.awt.Point getLocation()
           
 java.lang.String getName()
          Return the name of this Button.
 java.awt.Dimension getSize()
          Returns the size of the button which is overridden by the size of the Button's active unclicked icon.
 int getTextAlignment()
           
 boolean getTextWrap()
           
 boolean isActive()
          Returns true of the button has an associated action list containing at least one item.
 boolean isResizable()
          Returns true if this button is resizable in it's current state (eg: an icon for this state exists).
 void setActionList(CCFActionList actions)
          Sets the action list that is performed when this Button is clicked.
 void setFont(CCFFont font)
          Set the CCFFont for this Button.
 void setIconSet(CCFIconSet set)
          Set the CCFIconSet associated with this Button.
 void setIDTag(java.lang.String idtag)
          Set the ID tag for this Button.
 void setLocation(java.awt.Point p)
           
 void setName(java.lang.String name)
          Set the name of this Button.
 void setParent(CCFNode p)
           
 void setSize(java.awt.Dimension size)
          Sets the size of the button.
 void setTextAlignment(int align)
           
 void setTextWrap(boolean w)
           
 java.lang.String toString()
           
 
Methods inherited from class com.neuron.app.tonto.CCFNode
getHeader, getParent, getParentDevice, getParentPanel
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

STATE_ACTIVE_UNSELECTED

public static final int STATE_ACTIVE_UNSELECTED
See Also:
Constant Field Values

STATE_ACTIVE_SELECTED

public static final int STATE_ACTIVE_SELECTED
See Also:
Constant Field Values

STATE_INACTIVE_UNSELECTED

public static final int STATE_INACTIVE_UNSELECTED
See Also:
Constant Field Values

STATE_INACTIVE_SELECTED

public static final int STATE_INACTIVE_SELECTED
See Also:
Constant Field Values
Method Detail

setParent

public void setParent(CCFNode p)

copyColors

public void copyColors(CCFButton src)

copyIcons

public void copyIcons(CCFButton src)

toString

public java.lang.String toString()
Overrides:
toString in class CCFNode

getTextAlignment

public int getTextAlignment()

setTextAlignment

public void setTextAlignment(int align)

getTextWrap

public boolean getTextWrap()

setTextWrap

public void setTextWrap(boolean w)

convertToColor

public void convertToColor()

convertToGray

public void convertToGray()

getFont

public CCFFont getFont()
Get the CCFFont for this Button.


setFont

public void setFont(CCFFont font)
Set the CCFFont for this Button.

Parameters:
font - new button font

getIconSet

public CCFIconSet getIconSet()
Get the CCFIconSet associated with this Button.


setIconSet

public void setIconSet(CCFIconSet set)
Set the CCFIconSet associated with this Button.

Parameters:
set - new set of state icons

getSize

public java.awt.Dimension getSize()
Returns the size of the button which is overridden by the size of the Button's active unclicked icon.


setSize

public void setSize(java.awt.Dimension size)
Sets the size of the button.


getChildWrapper

public CCFChild getChildWrapper()

getLocation

public java.awt.Point getLocation()

setLocation

public void setLocation(java.awt.Point p)

getActions

public CCFAction[] getActions()

getActionList

public CCFActionList getActionList()
Returns the action list that is performed when this Button is clicked.


appendAction

public void appendAction(CCFAction a)

setActionList

public void setActionList(CCFActionList actions)
Sets the action list that is performed when this Button is clicked.


getName

public java.lang.String getName()
Return the name of this Button.

Specified by:
getName in interface INamed

setName

public void setName(java.lang.String name)
Set the name of this Button.

Parameters:
name - button name

getIDTag

public java.lang.String getIDTag()
Return the ID tag for this Button.


setIDTag

public void setIDTag(java.lang.String idtag)
Set the ID tag for this Button.

Parameters:
idtag - ID Tag

getBackground

public CCFColor getBackground()
Get the background color for this button. This is derived from the active/inactive state icon associated with the buttons current state. For display purposes.


getForeground

public CCFColor getForeground()
Get the foreground color for this button. This is derived from the active/inactive state icon associated with the buttons current state. For display purposes.


isActive

public boolean isActive()
Returns true of the button has an associated action list containing at least one item.


isResizable

public boolean isResizable()
Returns true if this button is resizable in it's current state (eg: an icon for this state exists).


delete

public void delete()
Deletes this child from it's parent.