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.
-
addItemListener(ItemListener)
- Adds the specified item listener to recieve item events from
this checkbox.
-
getPaint()
-
-
getSelectedObjects()
- Returns the an array (length 1) containing the checkbox
label or null if the checkbox is not selected.
-
getState()
- Returns the boolean state of the Checkbox.
-
mouseClicked(MouseEvent)
- The mouse click on a pmCheckbox ist mapped
to an ItemEvent
-
mouseEntered(MouseEvent)
- no functionality behind
-
mouseExited(MouseEvent)
- no functionality behind
-
mousePressed(MouseEvent)
- no functionality behind
-
mouseReleased(MouseEvent)
- no functionality behind
-
paint(Graphics)
- paints the checkbox corresponding to the state: true =+, false = -
Note:
if getPaint() == false, nothing is drawn at all!
-
processEvent(AWTEvent)
- Processes events on this checkbox.
-
processItemEvent(ItemEvent)
- Processes item events occurring on this checkbox by
dispatching them to any registered ItemListener objects.
-
removeItemListener(ItemListener)
- Removes the specified item listener so that it no longer
receives item events from this checkbox.
-
setPaint(boolean)
- This sets wether the Checkbox is painted at all.
-
setState(boolean)
- Sets the Checkbox to the specifed boolean state.
-
toString()
-
setState
public void setState(boolean state)
- Sets the Checkbox to the specifed boolean state.
- Parameters:
- state - the boolean state
- See Also:
- getState
getState
public boolean getState()
- Returns the boolean state of the Checkbox.
- See Also:
- setState
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
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
getPaint
public boolean getPaint()
- Returns:
- the current Paint-Status flag
addItemListener
public void addItemListener(ItemListener l)
- Adds the specified item listener to recieve item events from
this checkbox.
- Parameters:
- l - the item listener
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
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
mouseClicked
public void mouseClicked(MouseEvent e)
- The mouse click on a pmCheckbox ist mapped
to an ItemEvent
mousePressed
public void mousePressed(MouseEvent e)
- no functionality behind
mouseReleased
public void mouseReleased(MouseEvent e)
- no functionality behind
mouseEntered
public void mouseEntered(MouseEvent e)
- no functionality behind
mouseExited
public void mouseExited(MouseEvent e)
- no functionality behind
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
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
toString
public String toString()
- Overrides:
- toString in class Component
All Packages Class Hierarchy This Package Previous Next Index