Class symantec.itools.awt.StateCheckBox
All Packages  Class Hierarchy  This Package  Previous  Next  Index
  Class symantec.itools.awt.StateCheckBox
Object
   |
   +----Component
           |
           +----Canvas
                   |
                   +----symantec.itools.awt.StateCheckBox
  -  public class StateCheckBox
  
-  extends Canvas
  
A two- or three-state checkbox that doesn't have an associated text label.
 A two-state checkbox behaves just like the standard checkbox. In three-state
 mode clicking the checkbox can switch the checkbox to a third state that
 appears both gray and checked.
 
 The third state is often used to indicate that an attribute of the current
 selection varies across the selected items. For example, a checkbox used to
 indicate "bold text" might use the third state if the currently selected
 text included both bold and plain characters.
 
 It is also used to indicate a default action or state.
 
  -  Version:
  
 -  1.0, Nov 26, 1996
  
 -  Author:
  
 -  Symantec
 
  
  -  
	STATE_CHECKED
   -   A state constant indicating that the current state is "checked".
  
 -  
	STATE_DEFAULT
   -   A state constant indicating that the current state is "default".
  
 -  
	STATE_UNCHECKED
   -   A state constant indicating that the current state is "unchecked".
  
 -  
	THREE_STATE
   -   A style constant indicating that this is a three-state checkbox.
  
 -  
	TWO_STATE
   -   A style constant indicating that this is a two-state checkbox.
  
 -  
	actionListener
   -   The action listener to keep track of listeners for our action event.
  
 -  
	changes
   -   Handles tracking non-vetoable change listeners and notifying them of each change
 to this component's properties.
  
 -  
	mouse
   -   The this component's mouse event listener.
  
 -  
	vetos
   -   Handles tracking vetoable change listeners and notifying them of each change
 to this component's properties.
 
  
  -  
	symantec.itools.awt.StateCheckBox()
   -   Constructs a two-state StateCheckBox that is currently unchecked.
 
  
  -  
	addActionListener(ActionListener)
   -   Adds the specified action listener to receive action events
 from this button.
  
 -  
	addNotify()
   -   Tells this component that it has been added to a container.
  
 -  
	addPropertyChangeListener(PropertyChangeListener)
   -   Adds a listener for all event changes.
  
 -  
	addVetoableChangeListener(VetoableChangeListener)
   -   Adds a vetoable listener for all event changes.
  
 -  
	getState()
   -   Gets the current checkbox state: unchecked, checked, or default.
  
 -  
	getStyle()
   -   Gets the current style: two-state or three-state.
  
 -  
	paint(Graphics)
   -   Paints this component using the given graphics context.
  
 -  
	preferredSize()
   -   Returns the recommended dimensions to properly display this component.
  
 -  
	removeActionListener(ActionListener)
   -   Removes the specified action listener so it no longer receives
 action events from this button.
  
 -  
	removeNotify()
   -   Tells this component that it is being removed from a container.
  
 -  
	removePropertyChangeListener(PropertyChangeListener)
   -   Removes a listener for all event changes.
  
 -  
	removeVetoableChangeListener(VetoableChangeListener)
   -   Removes a vetoable listener for all event changes.
  
 -  
	reshape(int, int, int, int)
   -   Moves and/or resizes this component.
  
 -  
	sendActionEvent()
   -   Sends an action performed event to any action listeners, as needed.
  
 -  
	setState(int)
   -   Sets the current checkbox state to unchecked, checked, or default.
  
 -  
	setStyle(int)
   -   Sets the current style to two-state or three-state.
 
  
STATE_CHECKED
public static final int STATE_CHECKED
  -  A state constant indicating that the current state is "checked".
 
STATE_DEFAULT
public static final int STATE_DEFAULT
  -  A state constant indicating that the current state is "default".
 Default is the third state of a three-state checkbox.
 
STATE_UNCHECKED
public static final int STATE_UNCHECKED
  -  A state constant indicating that the current state is "unchecked".
 
THREE_STATE
public static final int THREE_STATE
  -  A style constant indicating that this is a three-state checkbox.
 
TWO_STATE
public static final int TWO_STATE
  -  A style constant indicating that this is a two-state checkbox.
 
actionListener
protected java.awt.event.ActionListener actionListener
  -  The action listener to keep track of listeners for our action event.
 
changes
protected symantec.itools.beans.PropertyChangeSupport changes
  -  Handles tracking non-vetoable change listeners and notifying them of each change
 to this component's properties.
 
mouse
protected symantec.itools.awt.StateCheckBox. Mouse mouse
  -  The this component's mouse event listener.
 
vetos
protected symantec.itools.beans.VetoableChangeSupport vetos
  -  Handles tracking vetoable change listeners and notifying them of each change
 to this component's properties.
 
  
StateCheckBox
public StateCheckBox()
  -  Constructs a two-state StateCheckBox that is currently unchecked.
  
 
 
  
addActionListener
public synchronized void addActionListener(ActionListener l)
  -  Adds the specified action listener to receive action events
 from this button.
  
 
 
    -  Parameters:
    
 -  l - the action listener
  
 
 
 
addNotify
public synchronized void addNotify()
  -  Tells this component that it has been added to a container.
 This is a standard Java AWT method which gets called by the AWT when
 this component is added to a container. Typically, it is used to
 create this component's peer.
  
 
 
    -  Overrides:
    
 -  addNotify in class Canvas
    
 -  See Also:
    
 -  removeNotify
  
 
 
 
addPropertyChangeListener
public synchronized void addPropertyChangeListener(PropertyChangeListener listener)
  -  Adds a listener for all event changes.
  
 
 
    -  Parameters:
    
 -  listener - the listener to add.
    
 -  See Also:
    
 -  removePropertyChangeListener
  
 
 
 
addVetoableChangeListener
public synchronized void addVetoableChangeListener(VetoableChangeListener listener)
  -  Adds a vetoable listener for all event changes.
  
 
 
    -  Parameters:
    
 -  listener - the listener to add.
    
 -  See Also:
    
 -  removeVetoableChangeListener
  
 
 
 
getState
public int getState()
  -  Gets the current checkbox state: unchecked, checked, or default.
  
 
 
    -  Returns:
    
 -  the current state: STATE_UNCHECKED, STATE_CHECKED, or STATE_DEFAULT
    
 -  See Also:
    
 -  getState, STATE_UNCHECKED, STATE_CHECKED, STATE_DEFAULT
  
 
 
 
getStyle
public int getStyle()
  -  Gets the current style: two-state or three-state.
  
 
 
    -  Returns:
    
 -  the current StateCheckBox style; either TWO_STATE or THREE_STATE
    
 -  See Also:
    
 -  setStyle, TWO_STATE, THREE_STATE
  
 
 
 
paint
public void paint(Graphics g)
  -  Paints this component using the given graphics context.
 This is a standard Java AWT method which typically gets called
 by the AWT to handle painting this component. It paints this component
 using the given graphics context. The graphics context clipping region
 is set to the bounding rectangle of this component and its [0,0]
 coordinate is this component's top-left corner.
  
 
 
    -  Parameters:
    
 -  g - the graphics context used for painting
    
 -  Overrides:
    
 -  paint in class Canvas
    
 -  See Also:
    
 -  repaint, update
  
 
 
 
preferredSize
public java.awt.Dimension preferredSize()
  -  Returns the recommended dimensions to properly display this component.
 This is a standard Java AWT method which gets called to determine
 the recommended size of this component.
 If this component has been reshaped, then the width and height of that
 request are returned.
  
 
 
    -  Overrides:
    
 -  preferredSize in class Component
    
 -  See Also:
    
 -  minimumSize
  
 
 
 
removeActionListener
public synchronized void removeActionListener(ActionListener l)
  -  Removes the specified action listener so it no longer receives
 action events from this button.
  
 
 
    -  Parameters:
    
 -  l - the action listener
  
 
 
 
removeNotify
public synchronized void removeNotify()
  -  Tells this component that it is being removed from a container.
 This is a standard Java AWT method which gets called by the AWT when
 this component is removed from a container. Typically, it is used to
 destroy the peers of this component and all its subcomponents.
  
 
 
    -  Overrides:
    
 -  removeNotify in class Component
    
 -  See Also:
    
 -  addNotify
  
 
 
 
removePropertyChangeListener
public synchronized void removePropertyChangeListener(PropertyChangeListener listener)
  -  Removes a listener for all event changes.
  
 
 
    -  Parameters:
    
 -  listener - the listener to remove.
    
 -  See Also:
    
 -  addPropertyChangeListener
  
 
 
 
removeVetoableChangeListener
public synchronized void removeVetoableChangeListener(VetoableChangeListener listener)
  -  Removes a vetoable listener for all event changes.
  
 
 
    -  Parameters:
    
 -  listener - the listener to remove.
    
 -  See Also:
    
 -  addVetoableChangeListener
  
 
 
 
reshape
public void reshape(int x,
                    int y,
                    int width,
                    int height)
  -  Moves and/or resizes this component.
 This is a standard Java AWT method which gets called to move and/or
 resize this component. Components that are in containers with layout
 managers should not call this method, but rely on the layout manager
 instead.
 It is overriden here to note the requested width and height.
  
 
 
    -  Parameters:
    
 -  x - horizontal position in the parent's coordinate space
    
-  y - vertical position in the parent's coordinate space
    
-  width - the new width
    
-  height - the new height
    
    -  Overrides:
    
 -  reshape in class Component
  
 
 
 
sendActionEvent
protected void sendActionEvent()
  -  Sends an action performed event to any action listeners, as needed.
  
 
 
setState
public void setState(int newState) throws PropertyVetoException
  -  Sets the current checkbox state to unchecked, checked, or default.
  
 
 
    -  Parameters:
    
 -  newState - the new state: STATE_UNCHECKED, STATE_CHECKED, or STATE_DEFAULT
    
 -  Throws: PropertyVetoException
    
 -   if the specified property value is unacceptable
    
 -  See Also:
    
 -  getState, STATE_UNCHECKED, STATE_CHECKED, STATE_DEFAULT
  
 
 
 
setStyle
public void setStyle(int newStyle) throws PropertyVetoException
  -  Sets the current style to two-state or three-state.
  
 
 
    -  Parameters:
    
 -  newStyle - new StateCheckBox state; either TWO_STATE or THREE_STATE
    
 -  Throws: PropertyVetoException
    
 -   if the specified property value is unacceptable
    
 -  See Also:
    
 -  getStyle, TWO_STATE, THREE_STATE
  
 
 
 
All Packages  Class Hierarchy  This Package  Previous  Next  Index