Class XLogicButton

Class XLogicButton

java.lang.Object
   |
   +----java.awt.Component
           |
           +----java.awt.Canvas
                   |
                   +----XLogicButton

class XLogicButton
extends Canvas
Represents one button in logic-field
See Also:
bs

Variable Index

 o color
Color of button

Constructor Index

 o XLogicButton(XLogicField, int)
Constructor, sets parent and row variables and sets color to invalid value

Method Index

 o handleEvent(Event)
Handles clicked events on this button.
 o paint(Graphics)
Draws this button.

Variables

 o color
  public int color
Color of button

Constructors

 o XLogicButton
  public XLogicButton(XLogicField _parent,
                      int _row)
Constructor, sets parent and row variables and sets color to invalid value

Methods

 o paint
  public void paint(Graphics g)
Draws this button. If color is invalid, 3d-rectangle is drawn else circle of this color is drawn
Overrides:
paint in class Canvas
See Also:
color, getColor
 o handleEvent
  public boolean handleEvent(Event event)
Handles clicked events on this button. if left mouse-button is pressed, value of color is incremented if right mouse-button is pressed, value of color is decremented (this button must be on current row)
Overrides:
handleEvent in class Component
See Also:
color