fi.hut.tml.xsmiles.gui.components.swing
Class SwingRange

java.lang.Object
  extended byfi.hut.tml.xsmiles.gui.components.general.ComponentBase
      extended byfi.hut.tml.xsmiles.gui.components.swing.SwingStylableComponent
          extended byfi.hut.tml.xsmiles.gui.components.swing.SwingRange
All Implemented Interfaces:
java.awt.Adjustable, javax.swing.event.ChangeListener, java.util.EventListener, XComponent, XRange

public class SwingRange
extends SwingStylableComponent
implements XRange, javax.swing.event.ChangeListener, java.awt.Adjustable

textarea

Author:
Mikko Honkala

Field Summary
 
Fields inherited from class fi.hut.tml.xsmiles.gui.components.swing.SwingStylableComponent
HELPKEY
 
Fields inherited from class fi.hut.tml.xsmiles.gui.components.general.ComponentBase
content, currentFont, currentZoom, defaultBGColor, defaultFont, defaultSize, fInputMode, hintText, minSize, style
 
Fields inherited from interface fi.hut.tml.xsmiles.gui.components.XRange
HORIZONTAL, VERTICAL
 
Fields inherited from interface java.awt.Adjustable
HORIZONTAL, NO_ORIENTATION, VERTICAL
 
Constructor Summary
SwingRange(int min, int max, int stepsize)
           
SwingRange(int min, int max, int stepsize, int orientation)
           
 
Method Summary
 void addAdjustmentListener(java.awt.event.AdjustmentListener l)
          add a listener for changes in the range control
 java.awt.Component createContent(int min, int max, int stepsize, int orientation)
          creates the content component
 int getBlockIncrement()
           
 int getMaximum()
           
 int getMinimum()
           
 int getOrientation()
           
 int getUnitIncrement()
           
 int getValue()
           
 int getVisibleAmount()
           
 void init(int min, int max, int stepsize, int orientation)
           
 void removeAdjustmentListener(java.awt.event.AdjustmentListener l)
          remove a listener for changes in the range control
 void setBlockIncrement(int param)
           
 void setLabelTable(java.util.Dictionary dictionary)
          give the dictionary for the labels
 void setMaximum(int param)
           
 void setMinimum(int param)
           
 void setUnitIncrement(int param)
           
 void setValue(int n)
           
 void setVisibleAmount(int param)
           
 void stateChanged(javax.swing.event.ChangeEvent e)
           
 
Methods inherited from class fi.hut.tml.xsmiles.gui.components.swing.SwingStylableComponent
addHelpListener, createHint, getFormatter, init, isCaption, removeHelpListener, setBackground, setHintRecursively, setHintText, sizeComponent
 
Methods inherited from class fi.hut.tml.xsmiles.gui.components.general.ComponentBase
addActionListener, addFocusListener, addMouseListener, getAddableComponent, getComponent, getDefaultBackgroundColor, getDefaultSize, getEnabled, getHeight, getMinimumSize, getPreferredSize, getSizableComponent, getSize, getStylableComponent, getStyle, getWidth, getX, getY, removeActionListener, removeFocusListener, removeMouseListener, setBounds, setDefaultSize, setEnabled, setFocus, setFont, setForeground, setInputMode, setStyle, setVisible, setZoom, sizeComponent
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface fi.hut.tml.xsmiles.gui.components.XComponent
addActionListener, addFocusListener, addHelpListener, addMouseListener, getComponent, getEnabled, getHeight, getSize, getStyle, getWidth, getX, getY, removeActionListener, removeFocusListener, removeHelpListener, removeMouseListener, setBackground, setBounds, setEnabled, setFocus, setForeground, setHintText, setInputMode, setStyle, setVisible, setZoom
 

Constructor Detail

SwingRange

public SwingRange(int min,
                  int max,
                  int stepsize,
                  int orientation)

SwingRange

public SwingRange(int min,
                  int max,
                  int stepsize)
Method Detail

init

public void init(int min,
                 int max,
                 int stepsize,
                 int orientation)
Parameters:
min -
max -
orientation - VERTICAL HORIZONTAL

createContent

public java.awt.Component createContent(int min,
                                        int max,
                                        int stepsize,
                                        int orientation)
creates the content component


setValue

public void setValue(int n)
Specified by:
setValue in interface XRange
Parameters:
n - The new value

getValue

public int getValue()
Specified by:
getValue in interface XRange
Returns:
The current value set

addAdjustmentListener

public void addAdjustmentListener(java.awt.event.AdjustmentListener l)
add a listener for changes in the range control

Specified by:
addAdjustmentListener in interface XRange

removeAdjustmentListener

public void removeAdjustmentListener(java.awt.event.AdjustmentListener l)
remove a listener for changes in the range control

Specified by:
removeAdjustmentListener in interface XRange

stateChanged

public void stateChanged(javax.swing.event.ChangeEvent e)
Specified by:
stateChanged in interface javax.swing.event.ChangeListener

getOrientation

public int getOrientation()
Specified by:
getOrientation in interface java.awt.Adjustable

getBlockIncrement

public int getBlockIncrement()
Specified by:
getBlockIncrement in interface java.awt.Adjustable

getMinimum

public int getMinimum()
Specified by:
getMinimum in interface java.awt.Adjustable

getUnitIncrement

public int getUnitIncrement()
Specified by:
getUnitIncrement in interface java.awt.Adjustable

getVisibleAmount

public int getVisibleAmount()
Specified by:
getVisibleAmount in interface java.awt.Adjustable

setMaximum

public void setMaximum(int param)
Specified by:
setMaximum in interface java.awt.Adjustable

setBlockIncrement

public void setBlockIncrement(int param)
Specified by:
setBlockIncrement in interface java.awt.Adjustable

getMaximum

public int getMaximum()
Specified by:
getMaximum in interface java.awt.Adjustable

setVisibleAmount

public void setVisibleAmount(int param)
Specified by:
setVisibleAmount in interface java.awt.Adjustable

setUnitIncrement

public void setUnitIncrement(int param)
Specified by:
setUnitIncrement in interface java.awt.Adjustable

setMinimum

public void setMinimum(int param)
Specified by:
setMinimum in interface java.awt.Adjustable

setLabelTable

public void setLabelTable(java.util.Dictionary dictionary)
give the dictionary for the labels

Specified by:
setLabelTable in interface XRange


X-Smiles 1.2