Elexis: Das führende OpenSource-Arztpraxisprogamm
im deutschsprachigen Raum
Java doc für Elexis version 2.1.7.dev vom 01.09.2013

ch.elexis.util
Class NumberInput

java.lang.Object
  extended by org.eclipse.swt.widgets.Widget
      extended by org.eclipse.swt.widgets.Control
          extended by org.eclipse.swt.widgets.Scrollable
              extended by org.eclipse.swt.widgets.Composite
                  extended by ch.elexis.util.NumberInput
All Implemented Interfaces:
org.eclipse.swt.graphics.Drawable

public class NumberInput
extends org.eclipse.swt.widgets.Composite

A class to display and let the user change or enter numbers. It will also display a spinner besides the input field to let the user increment or decrement the value by a specific count between a given mi and max value.


Field Summary
 
Fields inherited from class org.eclipse.swt.widgets.Control
view
 
Constructor Summary
NumberInput(org.eclipse.swt.widgets.Composite parent, java.lang.String label)
          Create an empty number input with a default increment of 5, a minimum of 5 and a maximum of 1440 (which happens to be the number of minutes in a day)
 
Method Summary
 org.eclipse.swt.widgets.Spinner getControl()
           
 int getValue()
          Get the actually displayed value of the input field
 void setMinMaxInc(int min, int max, int inc)
          set the spinner's minimum, maximum and increment values
 void setValue(int val)
          Set the value to display
 
Methods inherited from class org.eclipse.swt.widgets.Composite
changed, checkSubclass, computeSize, drawBackground, getBackgroundMode, getChildren, getLayout, getLayoutDeferred, getTabList, isLayoutDeferred, layout, layout, layout, layout, layout, setBackgroundMode, setFocus, setLayout, setLayoutDeferred, setTabList
 
Methods inherited from class org.eclipse.swt.widgets.Scrollable
computeTrim, getClientArea, getHorizontalBar, getScrollbarsMode, getVerticalBar
 
Methods inherited from class org.eclipse.swt.widgets.Control
addControlListener, addDragDetectListener, addFocusListener, addGestureListener, addHelpListener, addKeyListener, addMenuDetectListener, addMouseListener, addMouseMoveListener, addMouseTrackListener, addMouseWheelListener, addPaintListener, addTouchListener, addTraverseListener, computeSize, dragDetect, dragDetect, forceFocus, getAccessible, getBackground, getBackgroundImage, getBorderWidth, getBounds, getCursor, getDragDetect, getEnabled, getFont, getForeground, getLayoutData, getLocation, getMenu, getMonitor, getOrientation, getParent, getRegion, getShell, getSize, getToolTipText, getTouchEnabled, getVisible, internal_dispose_GC, internal_new_GC, isEnabled, isFocusControl, isReparentable, isVisible, moveAbove, moveBelow, pack, pack, print, redraw, redraw, removeControlListener, removeDragDetectListener, removeFocusListener, removeGestureListener, removeHelpListener, removeKeyListener, removeMenuDetectListener, removeMouseListener, removeMouseMoveListener, removeMouseTrackListener, removeMouseWheelListener, removePaintListener, removeTouchListener, removeTraverseListener, setBackground, setBackgroundImage, setBounds, setBounds, setCapture, setCursor, setDragDetect, setEnabled, setFont, setForeground, setLayoutData, setLocation, setLocation, setMenu, setOrientation, setParent, setRedraw, setRegion, setSize, setSize, setToolTipText, setTouchEnabled, setVisible, toControl, toControl, toDisplay, toDisplay, traverse, traverse, traverse, update
 
Methods inherited from class org.eclipse.swt.widgets.Widget
addDisposeListener, addListener, checkWidget, dispose, getData, getData, getDisplay, getListeners, getStyle, isDisposed, isListening, notifyListeners, removeDisposeListener, removeListener, removeListener, reskin, setData, setData, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

NumberInput

public NumberInput(org.eclipse.swt.widgets.Composite parent,
                   java.lang.String label)
Create an empty number input with a default increment of 5, a minimum of 5 and a maximum of 1440 (which happens to be the number of minutes in a day)

Parameters:
parent -
label - the label to display on top of the input field
Method Detail

setMinMaxInc

public void setMinMaxInc(int min,
                         int max,
                         int inc)
set the spinner's minimum, maximum and increment values

Parameters:
min - the spinner can not reduce the number lower than min
max - the spinner can not increase the num,ber higher than max
inc - the spinner will increase or decrease every time by inc

getValue

public int getValue()
Get the actually displayed value of the input field

Returns:
a value that is not necessarily between min and max

getControl

public org.eclipse.swt.widgets.Spinner getControl()

setValue

public void setValue(int val)
Set the value to display

Parameters:
val - an integer that has not necessarily to be between min and max

Elexis: Das führende OpenSource-Arztpraxisprogamm
im deutschsprachigen Raum
Java doc für Elexis version 2.1.7.dev vom 01.09.2013