Class marimba.gui.ColorButtonWidget
All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class marimba.gui.ColorButtonWidget

java.lang.Object
   |
   +----marimba.gui.Widget
           |
           +----marimba.gui.ColorButtonWidget

public class ColorButtonWidget
extends Widget
A widget for choosing a color. It does not extend ButtonWidget since this button cannot be grouped and never displays a label, but it acts like a button.
Version:
1.4, 12/19/96
Author:
Klaas Waslander

Variable Index

 o color
The current color value of this button.
 o down
indicates whether the button is currently down
 o mode
The mode of the button, which can be raised or square.
 o modeOptions
The possible options for the mode.

Constructor Index

 o ColorButtonWidget()
Constructor
 o ColorButtonWidget(Color)
Constructor which also sets the color.

Method Index

 o eventInButton(Event)
Checks whether the given event occured within the button.
 o getColorValue()
Get the current color as a Color object.
 o getMode()
Get the mode of this button.
 o getModeOptions()
Get the possible options for the mode.
 o getProperties(PropertyList)
Get the properties of the color button.
 o getValue()
Get the current color.
 o handleEvent(Event)
Handle mouse events.
 o paint(Graphics)
Paint the button with the current color.
 o paintNullColor(Graphics, int, int, int, int)
Paint the null color area, which are diagonal lines.
 o setMode(int)
Set the mode for the button.
 o setProperties(PropertyList)
Set the properties of the color button.
 o setValue(Color)
Set the current color.
 o setValue(Object)
Set the current color.

Variables

 o mode
  public int mode
The mode of the button, which can be raised or square.
See Also:
getMode, setMode
 o modeOptions
  public static Options modeOptions
The possible options for the mode.
See Also:
getModeOptions, mode
 o color
  public Color color
The current color value of this button.
See Also:
getValue, getColorValue
 o down
  protected boolean down
indicates whether the button is currently down

Constructors

 o ColorButtonWidget
  public ColorButtonWidget()
Constructor
 o ColorButtonWidget
  public ColorButtonWidget(Color color)
Constructor which also sets the color.

Methods

 o getProperties
  public void getProperties(PropertyList list)
Get the properties of the color button.
Overrides:
getProperties in class Widget
 o setProperties
  public void setProperties(PropertyList list)
Set the properties of the color button.
Overrides:
setProperties in class Widget
 o getModeOptions
  public Options getModeOptions()
Get the possible options for the mode.
See Also:
modeOptions
 o getMode
  public int getMode()
Get the mode of this button.
See Also:
mode
 o setMode
  public void setMode(int mode)
Set the mode for the button.
See Also:
mode
 o setValue
  public void setValue(Object color)
Set the current color.
Overrides:
setValue in class Widget
See Also:
color
 o setValue
  public void setValue(Color color)
Set the current color.
See Also:
color
 o getColorValue
  public Color getColorValue()
Get the current color as a Color object.
See Also:
color
 o getValue
  public Object getValue()
Get the current color.
Overrides:
getValue in class Widget
See Also:
color
 o paint
  public void paint(Graphics g)
Paint the button with the current color.
Overrides:
paint in class Widget
 o paintNullColor
  protected void paintNullColor(Graphics g,
                                int x,
                                int y,
                                int width,
                                int height)
Paint the null color area, which are diagonal lines.
 o eventInButton
  protected boolean eventInButton(Event evt)
Checks whether the given event occured within the button.
 o handleEvent
  public boolean handleEvent(Event evt)
Handle mouse events.
Overrides:
handleEvent in class Widget

All Packages  Class Hierarchy  This Package  Previous  Next  Index