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
-
color
- The current color value of this button.
-
down
- indicates whether the button is currently down
-
mode
- The mode of the button, which can be raised or square.
-
modeOptions
- The possible options for the mode.
-
ColorButtonWidget()
- Constructor
-
ColorButtonWidget(Color)
- Constructor which also sets the color.
-
eventInButton(Event)
- Checks whether the given event occured within the button.
-
getColorValue()
- Get the current color as a Color object.
-
getMode()
- Get the mode of this button.
-
getModeOptions()
- Get the possible options for the mode.
-
getProperties(PropertyList)
- Get the properties of the color button.
-
getValue()
- Get the current color.
-
handleEvent(Event)
- Handle mouse events.
-
paint(Graphics)
- Paint the button with the current color.
-
paintNullColor(Graphics, int, int, int, int)
- Paint the null color area, which are diagonal lines.
-
setMode(int)
- Set the mode for the button.
-
setProperties(PropertyList)
- Set the properties of the color button.
-
setValue(Color)
- Set the current color.
-
setValue(Object)
- Set the current color.
mode
public int mode
- The mode of the button, which can be raised or square.
- See Also:
- getMode, setMode
modeOptions
public static Options modeOptions
- The possible options for the mode.
- See Also:
- getModeOptions, mode
color
public Color color
- The current color value of this button.
- See Also:
- getValue, getColorValue
down
protected boolean down
- indicates whether the button is currently down
ColorButtonWidget
public ColorButtonWidget()
- Constructor
ColorButtonWidget
public ColorButtonWidget(Color color)
- Constructor which also sets the color.
getProperties
public void getProperties(PropertyList list)
- Get the properties of the color button.
- Overrides:
- getProperties in class Widget
setProperties
public void setProperties(PropertyList list)
- Set the properties of the color button.
- Overrides:
- setProperties in class Widget
getModeOptions
public Options getModeOptions()
- Get the possible options for the mode.
- See Also:
- modeOptions
getMode
public int getMode()
- Get the mode of this button.
- See Also:
- mode
setMode
public void setMode(int mode)
- Set the mode for the button.
- See Also:
- mode
setValue
public void setValue(Object color)
- Set the current color.
- Overrides:
- setValue in class Widget
- See Also:
- color
setValue
public void setValue(Color color)
- Set the current color.
- See Also:
- color
getColorValue
public Color getColorValue()
- Get the current color as a Color object.
- See Also:
- color
getValue
public Object getValue()
- Get the current color.
- Overrides:
- getValue in class Widget
- See Also:
- color
paint
public void paint(Graphics g)
- Paint the button with the current color.
- Overrides:
- paint in class Widget
paintNullColor
protected void paintNullColor(Graphics g,
int x,
int y,
int width,
int height)
- Paint the null color area, which are diagonal lines.
eventInButton
protected boolean eventInButton(Event evt)
- Checks whether the given event occured within the button.
handleEvent
public boolean handleEvent(Event evt)
- Handle mouse events.
- Overrides:
- handleEvent in class Widget
All Packages Class Hierarchy This Package Previous Next Index