vipratech.beans.standardbeans
Class VerticalSlider

java.lang.Object
  |
  +--java.awt.Component
        |
        +--java.awt.Canvas
              |
              +--vipratech.awt.VCanvas
                    |
                    +--vipratech.beans.standardbeans.VerticalSlider

public class VerticalSlider
extends VCanvas

The VerticalSlider.class provides a slider that returns a selected value over a set range.

The minumum, maximum and initial value of the slider can be set at design time. The slider label text can be localised and the slider display unit can also be configured. Both negative and positive ranges can be set on the slider.

This component can be wired up to other components at design time using adjustmentfloatlisteners.

Version:
1.05, August 24, 2001
Author:
Warwick Bailey & Hendrik Dathe    warwick-bailey@bigfoot.com
See Also:
Serialized Form

Fields inherited from class vipratech.awt.VCanvas
fm
 
Fields inherited from class java.awt.Component
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT
 
Constructor Summary
VerticalSlider()
          Constructor.
 
Method Summary
 void addAdjustmentFloatListener(AdjustmentFloatListener l)
          Allows this component to be unwired at design time with adjustmentfloatlisteners
 void destroy()
          Disposes of offscreen graphics.
 int getBlockIncrement()
           
 java.awt.Color getColor()
          Returns the background color of the slider.
 boolean getDisplayVisible()
          Returns the show/hide toggle of the display.
 boolean getEnabled()
          Returns the toggle for enabled/disabled
 java.lang.String getKey()
          Returns the key for the component that is used to extract a locale specific label from a key/value pair in a resource bundle.
 java.util.Locale getLocale()
          Returns the locale for this component.
 double getMaximum()
          Returns the maximum value.
 double getMinimum()
          Returns the minimum value.
 java.awt.Dimension getMinimumSize()
          Returns the minumum size.
 int getOrientation()
           
 boolean getPointer()
          Returns the toggle for button style.
 java.lang.String getSliderName()
          Method to get the slider Name for sending in AdjustmentFloat Listener
 java.lang.String getText()
          Returns the GUI text for this component.
 int getTicks()
          Returns the number of tick marks.
 boolean getTicksVisible()
          Returns the toggle for show/hide tick marks.
 java.lang.String getUnit()
          Returns the unit for display.
 int getUnitIncrement()
           
 float getValue()
          Returns the current value of the slider.
 int getValuePlace()
          Method to get the decimal places of the value
 int getVisibleAmount()
           
 void paint(java.awt.Graphics g)
          Draws the various parts of the slider display.
 void propertyChange(java.beans.PropertyChangeEvent event)
          Allows this component to be wired at design time with adjustment listeners public synchronized void addAdjustmentListener(AdjustmentListener listener) { al = AWTEventMulticaster.add(listener, al); } /** Allows this component to be un-wired at design time with adjustment listeners public synchronized void removeAdjustmentListener(AdjustmentListener listener) { al = AWTEventMulticaster.remove(listener, al); } protected void processAdjustmentEvent(AdjustmentEvent event) { if(al != null) al.adjustmentValueChanged(event); } /** Allows this component to be wired up to vipratech.beans.LanguageChoice at design time.
 void removeAdjustmentFloatListener(AdjustmentFloatListener l)
          Allows this component to be wired at design time with adjustmentfloatlisteners
 void setBlockIncrement(int blockIncrement)
           
 void setColor(java.awt.Color color)
          Sets the background color of the slider.
 void setDisplayVisible(boolean displayVisible)
          Toggles the display to show/hide.
 void setEnabled(boolean enabled)
          Toggle enabled/disabled state.
 void setKey(java.lang.String key)
          Sets a key for the component that can be used to extract a locale specific label from a key/value pair in a resource bundle.
 void setLocale(java.util.Locale locale)
          Sets the locale for this component.
 void setMaximum(double maximum)
          Sets the maximum value.
 void setMinimum(double minimum)
          Sets the minimum value.
 void setPointer(boolean pointer)
          Toggle button style.
 void setSliderName(java.lang.String newSliderName)
          Method to set the sliderName wich is sending in the AdjustmentListener
 void setText(java.lang.String text)
          Sets the GUI label for this component.
 void setTicks(int ticks)
          Sets the number of tick marks.
 void setTicksVisible(boolean ticksVisible)
          Toggle for show/hide the tick marks.
 void setUnit(java.lang.String unit)
          Sets the unit for display.
 void setUnitIncrement(int unitIncrement)
           
 void setValue(float value)
          Sets the button to specified value.
 void setValuePlace(int newValuePlace)
          Method to set the decimal places of the value
 void setVisibleAmount(int visibleAmount)
           
 void update(java.awt.Graphics g)
          Overidden method to eliminate animation flicker.
 
Methods inherited from class java.awt.Canvas
addNotify
 
Methods inherited from class java.awt.Component
action, add, addComponentListener, addFocusListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addPropertyChangeListener, addPropertyChangeListener, bounds, checkImage, checkImage, contains, contains, createImage, createImage, deliverEvent, disable, dispatchEvent, doLayout, enable, enable, enableInputMethods, getAlignmentX, getAlignmentY, getBackground, getBounds, getBounds, getColorModel, getComponentAt, getComponentAt, getComponentOrientation, getCursor, getDropTarget, getFont, getFontMetrics, getForeground, getGraphics, getHeight, getInputContext, getInputMethodRequests, getLocation, getLocation, getLocationOnScreen, getMaximumSize, getName, getParent, getPeer, getPreferredSize, getSize, getSize, getToolkit, getTreeLock, getWidth, getX, getY, gotFocus, handleEvent, hasFocus, hide, imageUpdate, inside, invalidate, isDisplayable, isDoubleBuffered, isEnabled, isFocusTraversable, isLightweight, isOpaque, isShowing, isValid, isVisible, keyDown, keyUp, layout, list, list, list, list, list, locate, location, lostFocus, minimumSize, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, postEvent, preferredSize, prepareImage, prepareImage, print, printAll, remove, removeComponentListener, removeFocusListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeNotify, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, repaint, requestFocus, reshape, resize, resize, setBackground, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setFont, setForeground, setLocation, setLocation, setName, setSize, setSize, setVisible, show, show, size, toString, transferFocus, validate
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

VerticalSlider

public VerticalSlider()
Constructor.
Method Detail

paint

public final void paint(java.awt.Graphics g)
Draws the various parts of the slider display.
Overrides:
paint in class java.awt.Canvas

update

public final void update(java.awt.Graphics g)
Overidden method to eliminate animation flicker.
Overrides:
update in class java.awt.Component

propertyChange

public void propertyChange(java.beans.PropertyChangeEvent event)
Allows this component to be wired at design time with adjustment listeners public synchronized void addAdjustmentListener(AdjustmentListener listener) { al = AWTEventMulticaster.add(listener, al); } /** Allows this component to be un-wired at design time with adjustment listeners public synchronized void removeAdjustmentListener(AdjustmentListener listener) { al = AWTEventMulticaster.remove(listener, al); } protected void processAdjustmentEvent(AdjustmentEvent event) { if(al != null) al.adjustmentValueChanged(event); } /** Allows this component to be wired up to vipratech.beans.LanguageChoice at design time.

destroy

public final void destroy()
Disposes of offscreen graphics.

getMinimumSize

public java.awt.Dimension getMinimumSize()
Returns the minumum size.
Overrides:
getMinimumSize in class java.awt.Component

setKey

public void setKey(java.lang.String key)
Sets a key for the component that can be used to extract a locale specific label from a key/value pair in a resource bundle.

getKey

public java.lang.String getKey()
Returns the key for the component that is used to extract a locale specific label from a key/value pair in a resource bundle.

setLocale

public void setLocale(java.util.Locale locale)
Sets the locale for this component.
Overrides:
setLocale in class java.awt.Component

getLocale

public java.util.Locale getLocale()
Returns the locale for this component.
Overrides:
getLocale in class java.awt.Component

setText

public void setText(java.lang.String text)
Sets the GUI label for this component.

getText

public java.lang.String getText()
Returns the GUI text for this component.

setValue

public final void setValue(float value)
Sets the button to specified value.

getValue

public final float getValue()
Returns the current value of the slider.

setMinimum

public final void setMinimum(double minimum)
Sets the minimum value.

getMinimum

public final double getMinimum()
Returns the minimum value.

setMaximum

public final void setMaximum(double maximum)
Sets the maximum value.

getMaximum

public final double getMaximum()
Returns the maximum value.

setDisplayVisible

public final void setDisplayVisible(boolean displayVisible)
Toggles the display to show/hide.

getDisplayVisible

public boolean getDisplayVisible()
Returns the show/hide toggle of the display.

setUnit

public final void setUnit(java.lang.String unit)
Sets the unit for display.

getUnit

public final java.lang.String getUnit()
Returns the unit for display.

setEnabled

public final void setEnabled(boolean enabled)
Toggle enabled/disabled state.
Overrides:
setEnabled in class java.awt.Component

getEnabled

public boolean getEnabled()
Returns the toggle for enabled/disabled

setTicks

public final void setTicks(int ticks)
Sets the number of tick marks.

getTicks

public final int getTicks()
Returns the number of tick marks.

setTicksVisible

public final void setTicksVisible(boolean ticksVisible)
Toggle for show/hide the tick marks.

getTicksVisible

public final boolean getTicksVisible()
Returns the toggle for show/hide tick marks.

setPointer

public final void setPointer(boolean pointer)
Toggle button style. False is a knob style, true is a pointer style.

getPointer

public boolean getPointer()
Returns the toggle for button style.

setColor

public final void setColor(java.awt.Color color)
Sets the background color of the slider.

getColor

public java.awt.Color getColor()
Returns the background color of the slider.

getBlockIncrement

public int getBlockIncrement()

getOrientation

public int getOrientation()

getUnitIncrement

public int getUnitIncrement()

getVisibleAmount

public int getVisibleAmount()

setBlockIncrement

public void setBlockIncrement(int blockIncrement)

setUnitIncrement

public void setUnitIncrement(int unitIncrement)

setVisibleAmount

public void setVisibleAmount(int visibleAmount)

removeAdjustmentFloatListener

public void removeAdjustmentFloatListener(AdjustmentFloatListener l)
Allows this component to be wired at design time with adjustmentfloatlisteners

addAdjustmentFloatListener

public void addAdjustmentFloatListener(AdjustmentFloatListener l)
Allows this component to be unwired at design time with adjustmentfloatlisteners

setValuePlace

public void setValuePlace(int newValuePlace)
Method to set the decimal places of the value

getValuePlace

public int getValuePlace()
Method to get the decimal places of the value

setSliderName

public void setSliderName(java.lang.String newSliderName)
Method to set the sliderName wich is sending in the AdjustmentListener

getSliderName

public java.lang.String getSliderName()
Method to get the slider Name for sending in AdjustmentFloat Listener

dathe@chemie.uni-leipzig.de"

http://leipzig.vernetztes-studium.de