LumiSoft.UI.Controls
Class WNumericEdit

java.lang.Object
  extended by java.awt.Component
      extended by java.awt.Container
          extended by javax.swing.JComponent
              extended by javax.swing.JPanel
                  extended by LumiSoft.UI.Controls.WControl
                      extended by LumiSoft.UI.Controls.WSpinEdit
                          extended by LumiSoft.UI.Controls.WNumericEdit
All Implemented Interfaces:
java.awt.event.FocusListener, java.awt.event.KeyListener, java.awt.event.MouseListener, java.awt.event.MouseMotionListener, java.awt.image.ImageObserver, java.awt.MenuContainer, java.io.Serializable, java.util.EventListener, javax.accessibility.Accessible, IDisposable

public class WNumericEdit
extends WSpinEdit
implements java.awt.event.KeyListener, java.awt.event.FocusListener

Numeric edit control.

See Also:
Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from class javax.swing.JComponent
javax.swing.JComponent.AccessibleJComponent
 
Field Summary
 
Fields inherited from class javax.swing.JComponent
TOOL_TIP_TEXT_KEY, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOW
 
Fields inherited from class java.awt.Component
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT
 
Fields inherited from interface java.awt.image.ImageObserver
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH
 
Constructor Summary
WNumericEdit()
          Default constructor.
 
Method Summary
 void focusGained(java.awt.event.FocusEvent e)
           
 void focusLost(java.awt.event.FocusEvent e)
           
 int getDecimalPlaces()
          Gets number of decimal places.
 java.awt.Font getFont()
          Gets font.
 double getMaximumValue()
          Gets maximum value allowed to enter.
 double getMinimumValue()
          Gets minimum value allowed to enter.
 boolean getReadOnly()
          Gets if numeric box is readonly.
 int getSpinnerStep()
          Gets spinner step to use for incrementing and decrrementing.
 int getTextAlign()
          Gets text alignmet.
 double getValue()
          Gets numericbox value.
 void keyPressed(java.awt.event.KeyEvent e)
           
 void keyReleased(java.awt.event.KeyEvent e)
           
 void keyTyped(java.awt.event.KeyEvent e)
           
 void setDecimalPlaces(int value)
          Sets number of decimal places.
 void setEnabled(boolean value)
          Sets if numericbox is enabled.
 void setFont(java.awt.Font value)
          Sets font.
 void setMaximumValue(double value)
          Sets maximum value allowed to enter.
 void setMinimumValue(double value)
          Sets minimum value allowed to enter.
 void setReadOnly(boolean value)
          Sets if numeric box is readonly.
 void setSpinnerStep(int value)
          Sets spinner step to use for incrementing and decrrementing.
 void setTextAlign(int value)
          Sets text alignment.
 void setValue(double value)
          Sets numericbox value.
 
Methods inherited from class LumiSoft.UI.Controls.WSpinEdit
addValueChangedListener, getSpinnersAlign, getSpinnersVisible, mouseClicked, mouseDragged, mouseEntered, mouseExited, mouseMoved, mousePressed, mouseReleased, paintComponent, removeValueChangedListener, setSpinnersAlign, setSpinnersVisible
 
Methods inherited from class LumiSoft.UI.Controls.WControl
Dispose, FlashControl, getAnchorStyle, getViewStyle, getWText, setAnchorStyle, setBounds, setViewStyle, setWText
 
Methods inherited from class javax.swing.JPanel
getAccessibleContext, getUI, getUIClassID, setUI, updateUI
 
Methods inherited from class javax.swing.JComponent
addAncestorListener, addNotify, addVetoableChangeListener, computeVisibleRect, contains, createToolTip, disable, enable, firePropertyChange, firePropertyChange, firePropertyChange, getActionForKeyStroke, getActionMap, getAlignmentX, getAlignmentY, getAncestorListeners, getAutoscrolls, getBorder, getBounds, getClientProperty, getComponentPopupMenu, getConditionForKeyStroke, getDebugGraphicsOptions, getDefaultLocale, getFontMetrics, getGraphics, getHeight, getInheritsPopupMenu, getInputMap, getInputMap, getInputVerifier, getInsets, getInsets, getListeners, getLocation, getMaximumSize, getMinimumSize, getNextFocusableComponent, getPopupLocation, getPreferredSize, getRegisteredKeyStrokes, getRootPane, getSize, getToolTipLocation, getToolTipText, getToolTipText, getTopLevelAncestor, getTransferHandler, getVerifyInputWhenFocusTarget, getVetoableChangeListeners, getWidth, getVisibleRect, getX, getY, grabFocus, isDoubleBuffered, isLightweightComponent, isManagingFocus, isOpaque, isOptimizedDrawingEnabled, isPaintingTile, isRequestFocusEnabled, isValidateRoot, paint, paintImmediately, paintImmediately, print, printAll, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removeNotify, removeVetoableChangeListener, repaint, repaint, requestDefaultFocus, requestFocus, requestFocus, requestFocusInWindow, resetKeyboardActions, reshape, revalidate, scrollRectToVisible, setActionMap, setAlignmentX, setAlignmentY, setAutoscrolls, setBackground, setBorder, setComponentPopupMenu, setDebugGraphicsOptions, setDefaultLocale, setDoubleBuffered, setFocusTraversalKeys, setForeground, setInheritsPopupMenu, setInputMap, setInputVerifier, setMaximumSize, setMinimumSize, setNextFocusableComponent, setOpaque, setPreferredSize, setRequestFocusEnabled, setToolTipText, setTransferHandler, setVerifyInputWhenFocusTarget, setVisible, unregisterKeyboardAction, update
 
Methods inherited from class java.awt.Container
add, add, add, add, add, addContainerListener, addPropertyChangeListener, addPropertyChangeListener, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getComponentZOrder, getContainerListeners, getFocusTraversalKeys, getFocusTraversalPolicy, getLayout, getMousePosition, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusCycleRoot, isFocusTraversalPolicyProvider, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paintComponents, preferredSize, printComponents, remove, remove, removeAll, removeContainerListener, setComponentZOrder, setFocusCycleRoot, setFocusTraversalPolicy, setFocusTraversalPolicyProvider, setLayout, transferFocusBackward, transferFocusDownCycle, validate
 
Methods inherited from class java.awt.Component
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, bounds, checkImage, checkImage, contains, createImage, createImage, createVolatileImage, createVolatileImage, dispatchEvent, enable, enableInputMethods, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getBackground, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusCycleRootAncestor, getFocusListeners, getFocusTraversalKeysEnabled, getForeground, getGraphicsConfiguration, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputContext, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocale, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMousePosition, getMouseWheelListeners, getName, getParent, getPeer, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getToolkit, getTreeLock, gotFocus, handleEvent, hasFocus, hide, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isEnabled, isFocusable, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isMaximumSizeSet, isMinimumSizeSet, isPreferredSizeSet, isShowing, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, postEvent, prepareImage, prepareImage, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, resize, resize, setBounds, setComponentOrientation, setCursor, setDropTarget, setFocusable, setFocusTraversalKeysEnabled, setIgnoreRepaint, setLocale, setLocation, setLocation, setName, setSize, setSize, show, show, size, toString, transferFocus, transferFocusUpCycle
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

WNumericEdit

public WNumericEdit()
Default constructor.

Method Detail

keyPressed

public void keyPressed(java.awt.event.KeyEvent e)
Specified by:
keyPressed in interface java.awt.event.KeyListener

keyTyped

public void keyTyped(java.awt.event.KeyEvent e)
Specified by:
keyTyped in interface java.awt.event.KeyListener

keyReleased

public void keyReleased(java.awt.event.KeyEvent e)
Specified by:
keyReleased in interface java.awt.event.KeyListener

focusGained

public void focusGained(java.awt.event.FocusEvent e)
Specified by:
focusGained in interface java.awt.event.FocusListener

focusLost

public void focusLost(java.awt.event.FocusEvent e)
Specified by:
focusLost in interface java.awt.event.FocusListener

getFont

public java.awt.Font getFont()
Gets font.

Specified by:
getFont in interface java.awt.MenuContainer
Overrides:
getFont in class java.awt.Component

setFont

public void setFont(java.awt.Font value)
Sets font.

Overrides:
setFont in class javax.swing.JComponent

getValue

public double getValue()
Gets numericbox value.

Returns:

setValue

public void setValue(double value)
Sets numericbox value.

Parameters:
value -

getMaximumValue

public double getMaximumValue()
Gets maximum value allowed to enter.

Returns:

setMaximumValue

public void setMaximumValue(double value)
Sets maximum value allowed to enter.

Parameters:
value -

getMinimumValue

public double getMinimumValue()
Gets minimum value allowed to enter.

Returns:

setMinimumValue

public void setMinimumValue(double value)
Sets minimum value allowed to enter.

Parameters:
value -

getDecimalPlaces

public int getDecimalPlaces()
Gets number of decimal places.

Returns:

setDecimalPlaces

public void setDecimalPlaces(int value)
Sets number of decimal places.

Parameters:
value -

getSpinnerStep

public int getSpinnerStep()
Gets spinner step to use for incrementing and decrrementing.

Returns:

setSpinnerStep

public void setSpinnerStep(int value)
Sets spinner step to use for incrementing and decrrementing.

Parameters:
value -

getTextAlign

public int getTextAlign()
Gets text alignmet.

Returns:

setTextAlign

public void setTextAlign(int value)
Sets text alignment.

Parameters:
value -

getReadOnly

public boolean getReadOnly()
Gets if numeric box is readonly.

Returns:

setReadOnly

public void setReadOnly(boolean value)
Sets if numeric box is readonly.

Parameters:
value -

setEnabled

public void setEnabled(boolean value)
Sets if numericbox is enabled.

Overrides:
setEnabled in class javax.swing.JComponent