Class de.unikl.AWTNode.pmCheckbox
All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class de.unikl.AWTNode.pmCheckbox

java.lang.Object
   |
   +----java.awt.Component
           |
           +----java.awt.Canvas
                   |
                   +----de.unikl.AWTNode.pmCheckbox

public class pmCheckbox
extends Canvas
implements MouseListener
pmCheckbox = plus/minus Checkbox

The Checkbox draws a + if its state ist true; otherwise it draws a -.

The switches setPaint/getPaint sets wether the Checkbox would ever draw itsself, regardless of if its visible. You can set setPaint(false) and you have no Checkbox on the screen, although you call the setVisible(true) method.


Method Index

 o addItemListener(ItemListener)
Adds the specified item listener to recieve item events from this checkbox.
 o getPaint()
 o getSelectedObjects()
Returns the an array (length 1) containing the checkbox label or null if the checkbox is not selected.
 o getState()
Returns the boolean state of the Checkbox.
 o mouseClicked(MouseEvent)
The mouse click on a pmCheckbox ist mapped to an ItemEvent
 o mouseEntered(MouseEvent)
no functionality behind
 o mouseExited(MouseEvent)
no functionality behind
 o mousePressed(MouseEvent)
no functionality behind
 o mouseReleased(MouseEvent)
no functionality behind
 o paint(Graphics)
paints the checkbox corresponding to the state: true =+, false = - Note: if getPaint() == false, nothing is drawn at all!
 o processEvent(AWTEvent)
Processes events on this checkbox.
 o processItemEvent(ItemEvent)
Processes item events occurring on this checkbox by dispatching them to any registered ItemListener objects.
 o removeItemListener(ItemListener)
Removes the specified item listener so that it no longer receives item events from this checkbox.
 o setPaint(boolean)
This sets wether the Checkbox is painted at all.
 o setState(boolean)
Sets the Checkbox to the specifed boolean state.
 o toString()

Methods

 o setState
  public void setState(boolean state)
Sets the Checkbox to the specifed boolean state.
Parameters:
state - the boolean state
See Also:
getState
 o getState
  public boolean getState()
Returns the boolean state of the Checkbox.
See Also:
setState
 o paint
  public void paint(Graphics g)
paints the checkbox corresponding to the state: true =+, false = - Note: if getPaint() == false, nothing is drawn at all!
Overrides:
paint in class Canvas
 o setPaint
  public void setPaint(boolean lpaint)
This sets wether the Checkbox is painted at all. true means: paint is possible false measn: we never paint it, even not when you call paint()
Parameters:
lpaint - sets wether we draw the Checkbox or not
 o getPaint
  public boolean getPaint()
Returns:
the current Paint-Status flag
 o addItemListener
  public void addItemListener(ItemListener l)
Adds the specified item listener to recieve item events from this checkbox.
Parameters:
l - the item listener
 o removeItemListener
  public void removeItemListener(ItemListener l)
Removes the specified item listener so that it no longer receives item events from this checkbox.
Parameters:
l - the item listener
 o getSelectedObjects
  public Object[] getSelectedObjects()
Returns the an array (length 1) containing the checkbox label or null if the checkbox is not selected.
See Also:
ItemSelectable
 o mouseClicked
  public void mouseClicked(MouseEvent e)
The mouse click on a pmCheckbox ist mapped to an ItemEvent
 o mousePressed
  public void mousePressed(MouseEvent e)
no functionality behind
 o mouseReleased
  public void mouseReleased(MouseEvent e)
no functionality behind
 o mouseEntered
  public void mouseEntered(MouseEvent e)
no functionality behind
 o mouseExited
  public void mouseExited(MouseEvent e)
no functionality behind
 o processEvent
  protected void processEvent(AWTEvent e)
Processes events on this checkbox. If the event is an ItemEvent, it invokes the handleItemEvent method, else it calls its superclass's processEvent.
Parameters:
e - the event
 o processItemEvent
  protected void processItemEvent(ItemEvent e)
Processes item events occurring on this checkbox by dispatching them to any registered ItemListener objects. NOTE: This method will not be called unless item events are enabled for this component; this happens when one of the following occurs: a) An ItemListener object is registered via addItemListener() b) Item events are enabled via enableEvents()
Parameters:
e - the item event
See Also:
enableEvents
 o toString
  public String toString()
Overrides:
toString in class Component

All Packages  Class Hierarchy  This Package  Previous  Next  Index