vipratech.beans.userbeans
Class NumericInput

java.lang.Object
  |
  +--java.awt.Component
        |
        +--java.awt.Container
              |
              +--java.awt.Panel
                    |
                    +--vipratech.awt.VPanel
                          |
                          +--vipratech.beans.userbeans.NumericInput

public class NumericInput
extends VPanel
implements java.awt.event.FocusListener

This bean show a numeric inputfield which can be use for getting value to control something(volumeflow).

The Label can translate with the key value in the Lanugagefile

It communicate with other beans about PropertyValue "Numeric".

Version:
0.9, July 25, 2001
Author:
Hendrik Dathe   dathe@chemie.uni-leipzig.de
See Also:
Serialized Form

Fields inherited from class vipratech.awt.VPanel
fm
 
Fields inherited from class java.awt.Component
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT
 
Constructor Summary
NumericInput()
          The Constructor
 
Method Summary
 void addAdjustmentFloatListener(AdjustmentFloatListener l)
          Allows this component to be unwired at design time with adjustmentfloatlisteners
 void addKeyListener(java.awt.event.KeyListener listener)
          Allows this component to be wired at design time with action listeners
 void addPropertyChangeListener(java.beans.PropertyChangeListener pcl)
          Allows property change listeners to be registered at design time.
 void focusGained(java.awt.event.FocusEvent event)
          Method to handle the focus event gain
 void focusLost(java.awt.event.FocusEvent event)
          Method to handle the focus event focus lost
 int getDecimalplaces()
          Method to get the inkrement value in the textfield
 boolean getEnabled()
          Returns the enabled state of the button.
 float getInkrement()
          Method to get the inkrement value in the textfield
 java.lang.String getKey()
          Returns the key for the component.
 java.lang.String getLabel()
          Method to get the text from the label
 float getMaximumvalue()
          Method to get the maximum value in the textfield
 int getMinimumlength()
          Method to get the length of the label + the textfield
 java.awt.Dimension getMinimumSize()
          Returns the minimum size of this component
 float getMinimumvalue()
          Method to get the minimum value in the textfield
 java.lang.Float getOldValue()
           
 java.awt.Dimension getPreferredSize()
          Returns the preferred size of this component.
 int getStringlength()
          Method to get the length of the String in the textfield
 java.lang.String getUnit()
          Method to get the unit of the value
 java.lang.Float getValue()
          Method to get the value in the textfield or which is calculated
 void init()
          Method to show everything on the Screen
 boolean isLabelon()
          Method to get is label on or off
 boolean isUniton()
          Method to get the status of the unit
 boolean ondown(int x4, int y4)
          Measure the mouseposition and return true if it is on the down Spinner
 boolean onup(int x3, int y3)
          Measure the mouseposition and return true if it is on the up Spinner
 void paint(java.awt.Graphics g)
          Method to paint the Spinner
 void propertyChange(java.beans.PropertyChangeEvent event)
          Allows this component to be wired up to vipratech.beans.standardbeans.LanguageChoice at design time and the connectinbg to vipratech.beans.userbeans.NumericInput.
 void removeAdjustmentFloatListener(AdjustmentFloatListener l)
          Allows this component to be wired at design time with adjustmentfloatlisteners
 void removeKeyListener(java.awt.event.KeyListener listener)
          Allows this component to be un-wired at design time with action listeners
 void removePropertyChangeListener(java.beans.PropertyChangeListener pcl)
          Allows property change listeners to be de-registered at design time.
 void setDecimalplaces(int newDecimalplaces)
          Method to set the decimalplaces in the textfield
 void setEnabled(boolean enabled)
          Allows the button to be disabled.
 void setInkrement(float newInkrement)
          Method to set the inkrement value in the textfield important the inkrement must be the samw or lower then the decimalplaces
 void setKey(java.lang.String key)
          Sets a key for the component.
 void setLabel(java.lang.String newLabel)
          Method to set the text on the label
 void setLabelon(boolean newLabelon)
          Method to set the label visbile
 void setLocale(java.util.Locale locale)
          Method to set the Locale
 void setMaximumvalue(float newMaximumvalue)
          Method to set the maximum value in the textfield
 void setMinimumvalue(float newMinimumvalue)
          Method to set the minimum value in the textfield
 void setOldValue(float Value)
           
 void setStringlength(int newStringlength)
          Method to set the length of the String in the textfield
 void setUnit(java.lang.String newUnit)
          Method to set the unit of the value
 void setUniton(boolean newUniton)
          Method to set the unit on/off
 void setValue(float newValue)
          Method to set the value in the textfield or which is calculated
 
Methods inherited from class java.awt.Panel
addNotify
 
Methods inherited from class java.awt.Container
add, add, add, add, add, addContainerListener, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getAlignmentX, getAlignmentY, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getInsets, getLayout, getMaximumSize, insets, invalidate, isAncestorOf, layout, list, list, locate, minimumSize, paintComponents, preferredSize, print, printComponents, remove, remove, removeAll, removeContainerListener, removeNotify, setFont, setLayout, update, validate
 
Methods inherited from class java.awt.Component
action, add, addComponentListener, addFocusListener, addInputMethodListener, addMouseListener, addMouseMotionListener, addPropertyChangeListener, bounds, checkImage, checkImage, contains, contains, createImage, createImage, disable, dispatchEvent, enable, enable, enableInputMethods, getBackground, getBounds, getBounds, getColorModel, getComponentOrientation, getCursor, getDropTarget, getFont, getFontMetrics, getForeground, getGraphics, getHeight, getInputContext, getInputMethodRequests, getLocale, getLocation, getLocation, getLocationOnScreen, getName, getParent, getPeer, getSize, getSize, getToolkit, getTreeLock, getWidth, getX, getY, gotFocus, handleEvent, hasFocus, hide, imageUpdate, inside, isDisplayable, isDoubleBuffered, isEnabled, isFocusTraversable, isLightweight, isOpaque, isShowing, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, postEvent, prepareImage, prepareImage, printAll, remove, removeComponentListener, removeFocusListener, removeInputMethodListener, removeMouseListener, removeMouseMotionListener, removePropertyChangeListener, repaint, repaint, repaint, repaint, requestFocus, reshape, resize, resize, setBackground, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setForeground, setLocation, setLocation, setName, setSize, setSize, setVisible, show, show, size, toString, transferFocus
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

NumericInput

public NumericInput()
The Constructor
Method Detail

init

public void init()
Method to show everything on the Screen

focusGained

public void focusGained(java.awt.event.FocusEvent event)
Method to handle the focus event gain
Specified by:
focusGained in interface java.awt.event.FocusListener

focusLost

public void focusLost(java.awt.event.FocusEvent event)
Method to handle the focus event focus lost
Specified by:
focusLost in interface java.awt.event.FocusListener

setEnabled

public final void setEnabled(boolean enabled)
Allows the button to be disabled. The button is enabled by default.
Overrides:
setEnabled in class java.awt.Component

getEnabled

public final boolean getEnabled()
Returns the enabled state of the button.

addKeyListener

public void addKeyListener(java.awt.event.KeyListener listener)
Allows this component to be wired at design time with action listeners
Overrides:
addKeyListener in class java.awt.Component

removeKeyListener

public void removeKeyListener(java.awt.event.KeyListener listener)
Allows this component to be un-wired at design time with action listeners
Overrides:
removeKeyListener in class java.awt.Component

onup

public boolean onup(int x3,
                    int y3)
Measure the mouseposition and return true if it is on the up Spinner

ondown

public boolean ondown(int x4,
                      int y4)
Measure the mouseposition and return true if it is on the down Spinner

paint

public void paint(java.awt.Graphics g)
Method to paint the Spinner
Overrides:
paint in class java.awt.Container

getMinimumlength

public int getMinimumlength()
Method to get the length of the label + the textfield
Returns:
int

setStringlength

public void setStringlength(int newStringlength)
Method to set the length of the String in the textfield
See Also:
setColumns

getStringlength

public int getStringlength()
Method to get the length of the String in the textfield
Returns:
int
See Also:
TextField.getColumns()

setLabel

public void setLabel(java.lang.String newLabel)
Method to set the text on the label
See Also:
Label.setText(java.lang.String)

getLabel

public java.lang.String getLabel()
Method to get the text from the label
Returns:
String

setLabelon

public void setLabelon(boolean newLabelon)
Method to set the label visbile

isLabelon

public boolean isLabelon()
Method to get is label on or off

setKey

public void setKey(java.lang.String key)
Sets a key for the component. The key is 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. The key 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)
Method to set the Locale
Overrides:
setLocale in class java.awt.Component

propertyChange

public void propertyChange(java.beans.PropertyChangeEvent event)
Allows this component to be wired up to vipratech.beans.standardbeans.LanguageChoice at design time and the connectinbg to vipratech.beans.userbeans.NumericInput.

addPropertyChangeListener

public void addPropertyChangeListener(java.beans.PropertyChangeListener pcl)
Allows property change listeners to be registered at design time.
Overrides:
addPropertyChangeListener in class java.awt.Component

removePropertyChangeListener

public void removePropertyChangeListener(java.beans.PropertyChangeListener pcl)
Allows property change listeners to be de-registered at design time.
Overrides:
removePropertyChangeListener in class java.awt.Component

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

getMinimumSize

public final java.awt.Dimension getMinimumSize()
Returns the minimum size of this component
Overrides:
getMinimumSize in class java.awt.Container

getPreferredSize

public final java.awt.Dimension getPreferredSize()
Returns the preferred size of this component.
Overrides:
getPreferredSize in class java.awt.Container

setMaximumvalue

public void setMaximumvalue(float newMaximumvalue)
Method to set the maximum value in the textfield

getMaximumvalue

public float getMaximumvalue()
Method to get the maximum value in the textfield
Returns:
float

setMinimumvalue

public void setMinimumvalue(float newMinimumvalue)
Method to set the minimum value in the textfield

getMinimumvalue

public float getMinimumvalue()
Method to get the minimum value in the textfield
Returns:
float

setInkrement

public void setInkrement(float newInkrement)
Method to set the inkrement value in the textfield important the inkrement must be the samw or lower then the decimalplaces

getInkrement

public float getInkrement()
Method to get the inkrement value in the textfield
Returns:
float

getValue

public java.lang.Float getValue()
Method to get the value in the textfield or which is calculated
Returns:
float

setValue

public void setValue(float newValue)
Method to set the value in the textfield or which is calculated

setOldValue

public void setOldValue(float Value)

getOldValue

public java.lang.Float getOldValue()

setDecimalplaces

public void setDecimalplaces(int newDecimalplaces)
Method to set the decimalplaces in the textfield
See Also:
setInkrement(float)

getDecimalplaces

public int getDecimalplaces()
Method to get the inkrement value in the textfield
Returns:
int

setUnit

public void setUnit(java.lang.String newUnit)
Method to set the unit of the value
Returns:
int

getUnit

public java.lang.String getUnit()
Method to get the unit of the value
Returns:
String

setUniton

public void setUniton(boolean newUniton)
Method to set the unit on/off

isUniton

public boolean isUniton()
Method to get the status of the unit
Returns:
boolean

dathe@chemie.uni-leipzig.de"

http://leipzig.vernetztes-studium.de