Class marimba.gui.CommandButtonWidget
All Packages Class Hierarchy This Package Previous Next Index
Class marimba.gui.CommandButtonWidget
java.lang.Object
|
+----marimba.gui.Widget
|
+----marimba.gui.ButtonWidget
|
+----marimba.gui.CommandButtonWidget
- public class CommandButtonWidget
- extends ButtonWidget
A command button widget.
- Version:
- 1.66, 01/08/97
- Author:
- Arthur van Hoff, Klaas Waslander
-
img
- The image that is used for the command button.
-
isDefault
- A button can be the default button.
-
mode
- A CommandButton can be invisible, raised, filled, square,
rounded and can contain a picture.
-
modeOptions
- The possible options for the mode.
-
src
- The source-file for the image.
-
sticky
- A sticky button remains down or up after a mouse-click
to visualize that the value remains set or unset.
-
CommandButtonWidget()
- Constructor
-
CommandButtonWidget(String)
- Constructor
-
CommandButtonWidget(String, int)
- Constructor
-
focusInterest()
- CommandButtons can only support input focus when they
are not sticky and their mode is not invisible.
-
getEditor()
- Get the editor.
-
getImage()
- The image for the command button.
-
getMode()
- Get the mode of this button.
-
getModeOptions()
- Get the possible options for the mode.
-
getProperties(PropertyList)
- Get the properties of this widget.
-
getSource()
- Get the source-file for the image.
-
getSticky()
- This function has been replaced by isSticky().
-
handleEvent(Event)
- Handle keyboard event when pressing return and do
some defaultButton operations when it gets the focus.
-
imageUpdate(Image, int, int, int, int, int)
- Update the image.
-
isDefault()
- Check if this commandbutton is the default one.
-
isSticky()
- Get the sticky-ness.
-
paintButton(Graphics)
- Paint the button.
-
paintFocus(Graphics)
- Paint something more when focused.
-
paintLabel(Graphics)
- Paint the button label.
-
paintLabel(Graphics, String, int, int)
- Paint the button label.
-
paramString(StringBuffer)
- Debugging.
-
requestFocus()
- A sticky commandButton cannot request the focus.
-
setDefault(boolean)
- Set if this button is the default button or not.
-
setImage(Image)
- Set the image for the command button.
-
setMode(int)
- Set the mode for the button.
-
setProperties(PropertyList)
- Set the properties of this widget.
-
setSource(String)
- Set the source-file for the image.
-
setSticky(boolean)
- Set the sticky-ness.
-
start()
- Start loading the image label (if any)
mode
public int mode
- A CommandButton can be invisible, raised, filled, square,
rounded and can contain a picture.
- See Also:
- getMode, setMode, modeOptions
modeOptions
public static Options modeOptions
- The possible options for the mode.
- See Also:
- getModeOptions, mode
sticky
public boolean sticky
- A sticky button remains down or up after a mouse-click
to visualize that the value remains set or unset.
- See Also:
- isSticky, setSticky
src
public String src
- The source-file for the image.
- See Also:
- getSource, setSource
isDefault
public boolean isDefault
- A button can be the default button.
- See Also:
- isDefault, setDefault
img
public Image img
- The image that is used for the command button.
You can set the image by setting the source
and in that way persistify it, or set the image
directly.
- See Also:
- getImage, setImage
CommandButtonWidget
public CommandButtonWidget()
- Constructor
CommandButtonWidget
public CommandButtonWidget(String label)
- Constructor
CommandButtonWidget
public CommandButtonWidget(String label,
int mode)
- Constructor
getProperties
public void getProperties(PropertyList list)
- Get the properties of this widget.
- Overrides:
- getProperties in class ButtonWidget
setProperties
public void setProperties(PropertyList list)
- Set the properties of this widget.
- Overrides:
- setProperties in class ButtonWidget
getModeOptions
public Options getModeOptions()
- Get the possible options for the mode.
- See Also:
- modeOptions
isDefault
public boolean isDefault()
- Check if this commandbutton is the default one.
- See Also:
- isDefault
setDefault
public void setDefault(boolean isDefault)
- Set if this button is the default button or not.
- See Also:
- isDefault
getEditor
public String getEditor()
- Get the editor.
- Overrides:
- getEditor in class Widget
isSticky
public boolean isSticky()
- Get the sticky-ness.
- See Also:
- sticky
setSticky
public void setSticky(boolean sticky)
- Set the sticky-ness.
- Overrides:
- setSticky in class ButtonWidget
- See Also:
- sticky
getSource
public String getSource()
- Get the source-file for the image.
- See Also:
- src
setSource
public void setSource(String src)
- Set the source-file for the image.
- See Also:
- src
getImage
public Image getImage()
- The image for the command button.
setImage
public void setImage(Image img)
- Set the image for the command button.
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
start
public void start()
- Start loading the image label (if any)
- Overrides:
- start in class Widget
imageUpdate
public boolean imageUpdate(Image newimg,
int flags,
int x,
int y,
int w,
int h)
- Update the image.
- Overrides:
- imageUpdate in class Widget
requestFocus
public void requestFocus()
- A sticky commandButton cannot request the focus.
So when the button is sticky this method won't do anything.
- Overrides:
- requestFocus in class Widget
paintLabel
public void paintLabel(Graphics g,
String str,
int x,
int y)
- Paint the button label.
paintLabel
public void paintLabel(Graphics g)
- Paint the button label.
- Overrides:
- paintLabel in class ButtonWidget
paintButton
public void paintButton(Graphics g)
- Paint the button.
- Overrides:
- paintButton in class ButtonWidget
paintFocus
public void paintFocus(Graphics g)
- Paint something more when focused.
handleEvent
public boolean handleEvent(Event evt)
- Handle keyboard event when pressing return and do
some defaultButton operations when it gets the focus.
- Overrides:
- handleEvent in class ButtonWidget
focusInterest
public boolean focusInterest()
- CommandButtons can only support input focus when they
are not sticky and their mode is not invisible.
- Overrides:
- focusInterest in class ButtonWidget
paramString
public void paramString(StringBuffer buf)
- Debugging.
- Overrides:
- paramString in class ButtonWidget
getSticky
public boolean getSticky()
- This function has been replaced by isSticky().
It is only here for backward compatibility but will be
removed in a future version.
- Overrides:
- getSticky in class ButtonWidget
- See Also:
- isSticky
All Packages Class Hierarchy This Package Previous Next Index