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

Class marimba.gui.SpinBoxTextWidget

java.lang.Object
   |
   +----marimba.gui.Widget
           |
           +----marimba.gui.TextWidget
                   |
                   +----marimba.gui.TextBoxWidget
                           |
                           +----marimba.gui.SpinBoxTextWidget

public class SpinBoxTextWidget
extends TextBoxWidget
A text widget with an up and down arrow for switching values.
Version:
1.14, 01/13/97
Author:
Klaas Waslander

Variable Index

 o down
Indicates whether one of the buttons is lowered.
 o fillButtons
A SpinBoxTextWidget can hide the background from the buttons by filling the buttons with the background color.
 o target
The button that is being pressed.

Constructor Index

 o SpinBoxTextWidget()
Constructor.

Method Index

 o action()
The user tried to change the value.
 o eventInText(Event)
Event is not in text area when it is on button.
 o findButton(int, int)
Which button is located under a given (x,y) coordinate.
 o getButtonHeight()
Get the height of the buttons.
 o getButtonWidth()
Get the width of the buttons.
 o getFillButtons()
Check if the buttons of the spinboxtextwidget are filled.
 o getOwner()
Get the owner; the SpinTextBoxWidget gives events to the owners handleEvent.
 o getProperties(PropertyList)
Get the properties of the dropdown textbox.
 o handleEvent(Event)
Handle user events.
 o insert(char)
Insert a character; only integers are allowed! It will do nothing if the new character will result in an invalid number, the new character will overwrite the old character at that position or it will be appended at the end if appropriate of course.
 o paintBackground(Graphics)
Paint the background and the two buttons.
 o paintButton(Graphics, int, int, int, int, int, int)
Paint a button raised or lowered and with an up or down arrow.
 o rightMargin()
Right margin.
 o setFillButtons(boolean)
Let the buttons of the spinboxtextwidget fill itself or not.
 o setProperties(PropertyList)
Set the properties of the dropdown textbox.
 o setStyle(int)
Set the style of this widget the same as in the super class, but adjust the transparent boolean.

Variables

 o target
  public int target
The button that is being pressed. Target can be none, up or down.
 o down
  public boolean down
Indicates whether one of the buttons is lowered.
 o fillButtons
  public boolean fillButtons
A SpinBoxTextWidget can hide the background from the buttons by filling the buttons with the background color.
See Also:
getFillButtons, setFillButtons

Constructors

 o SpinBoxTextWidget
  public SpinBoxTextWidget()
Constructor.

Methods

 o getProperties
  public void getProperties(PropertyList list)
Get the properties of the dropdown textbox.
Overrides:
getProperties in class TextBoxWidget
 o setProperties
  public void setProperties(PropertyList list)
Set the properties of the dropdown textbox.
Overrides:
setProperties in class TextBoxWidget
 o getFillButtons
  public boolean getFillButtons()
Check if the buttons of the spinboxtextwidget are filled.
See Also:
fillButtons
 o setFillButtons
  public void setFillButtons(boolean fillButtons)
Let the buttons of the spinboxtextwidget fill itself or not.
See Also:
fillButtons
 o setStyle
  public void setStyle(int style)
Set the style of this widget the same as in the super class, but adjust the transparent boolean.
Overrides:
setStyle in class TextBoxWidget
See Also:
style
 o insert
  public void insert(char ch)
Insert a character; only integers are allowed! It will do nothing if the new character will result in an invalid number, the new character will overwrite the old character at that position or it will be appended at the end if appropriate of course.
Overrides:
insert in class TextBoxWidget
 o rightMargin
  public int rightMargin()
Right margin.
Overrides:
rightMargin in class TextBoxWidget
 o getButtonWidth
  public int getButtonWidth()
Get the width of the buttons.
 o getButtonHeight
  public int getButtonHeight()
Get the height of the buttons.
 o getOwner
  public SpinBoxWidget getOwner()
Get the owner; the SpinTextBoxWidget gives events to the owners handleEvent. The owner is always a SpinBoxWidget.
 o findButton
  public int findButton(int x,
                        int y)
Which button is located under a given (x,y) coordinate.
Returns:
UP, DOWN or NONE
 o paintBackground
  public void paintBackground(Graphics g)
Paint the background and the two buttons.
Overrides:
paintBackground in class TextBoxWidget
 o paintButton
  public void paintButton(Graphics g,
                          int x,
                          int y,
                          int width,
                          int height,
                          int dir,
                          int mode)
Paint a button raised or lowered and with an up or down arrow. Constants defined in WidgetConstants are used for that.
 o eventInText
  protected boolean eventInText(Event evt)
Event is not in text area when it is on button.
Overrides:
eventInText in class TextWidget
 o handleEvent
  public boolean handleEvent(Event evt)
Handle user events.
Overrides:
handleEvent in class TextBoxWidget
 o action
  public void action()
The user tried to change the value.
Overrides:
action in class TextBoxWidget

All Packages  Class Hierarchy  This Package  Previous  Next  Index