gishur.awt
Class SymbolSpinNumCombo

java.lang.Object
  |
  +--gishur.awt.SymbolbarElement
        |
        +--gishur.awt.SymbolbarLabel
              |
              +--gishur.awt.SymbolSpinNumCombo
All Implemented Interfaces:
java.awt.event.ActionListener, java.util.EventListener, java.awt.event.MouseListener, java.awt.event.MouseMotionListener

public class SymbolSpinNumCombo
extends SymbolbarLabel
implements java.awt.event.ActionListener

A symbolbar element which can show a numerical value and change it via two little spin buttons. This Symbolbarelement needs 2 places in the Symbolbar!

Version:
1.0
Author:
Thomas Wolf

Field Summary
static int SYMBOLSPINCOMBO_VALUE_CHANGED
          ActionEvent-Type: Changed Value
 
Fields inherited from class gishur.awt.SymbolbarLabel
back_color, border_hspace, border_vspace, font, leftaligned, text_color, text_space
 
Fields inherited from class gishur.awt.SymbolbarElement
_needs_repaint, command, label, width
 
Constructor Summary
SymbolSpinNumCombo(java.lang.String label, java.lang.String command, int value, int min, int max)
          Constructor.
SymbolSpinNumCombo(java.lang.String label, java.lang.String command, int width, int value, int min, int max)
          Constructor.
 
Method Summary
 void actionPerformed(java.awt.event.ActionEvent e)
          Invoked when an action occurs.
 void disable()
          Schaltet das Symbolelement aus.
 void enable()
          Schaltet das Symbolelement ein.
 int max()
          Returns the maximal value
 int min()
          Returns the minimal value
 void setMinMax(int min, int max)
          Sets the minimal and maximal stored values.
protected  void setParent(Symbolbar symbolbar)
          Setzt die zugeordnete Symbolleiste.
 void setValue(int value)
          Sets the value of the combo.
 int value()
          Returns the stored value
 
Methods inherited from class gishur.awt.SymbolbarLabel
setText, text, update
 
Methods inherited from class gishur.awt.SymbolbarElement
active, enabled, getCommand, getLabel, getParent, getPreferredHeight, getSize, mouseClicked, mouseDragged, mouseEntered, mouseExited, mouseMoved, mousePressed, mouseReleased, setActive, setCommand, setLabel, setSize
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

SYMBOLSPINCOMBO_VALUE_CHANGED

public static final int SYMBOLSPINCOMBO_VALUE_CHANGED
ActionEvent-Type: Changed Value
Constructor Detail

SymbolSpinNumCombo

public SymbolSpinNumCombo(java.lang.String label,
                          java.lang.String command,
                          int width,
                          int value,
                          int min,
                          int max)
Constructor.

SymbolSpinNumCombo

public SymbolSpinNumCombo(java.lang.String label,
                          java.lang.String command,
                          int value,
                          int min,
                          int max)
Constructor.
Method Detail

value

public int value()
Returns the stored value
Returns:
The value.

min

public int min()
Returns the minimal value
Returns:
The min value.

max

public int max()
Returns the maximal value
Returns:
The max value.

setValue

public void setValue(int value)
Sets the value of the combo.
Parameters:
value - new value

setMinMax

public void setMinMax(int min,
                      int max)
Sets the minimal and maximal stored values.
Parameters:
min - minimal value
max - maximal value

setParent

protected void setParent(Symbolbar symbolbar)
Setzt die zugeordnete Symbolleiste.
Overrides:
setParent in class SymbolbarElement
Parameters:
symbolbar - Symbolleiste

actionPerformed

public void actionPerformed(java.awt.event.ActionEvent e)
Invoked when an action occurs.
Specified by:
actionPerformed in interface java.awt.event.ActionListener

enable

public void enable()
Schaltet das Symbolelement ein. Nur im eingeschalteten Modus werden MouseEvents empfangen.
Overrides:
enable in class SymbolbarElement

disable

public void disable()
Schaltet das Symbolelement aus.
Overrides:
disable in class SymbolbarElement