Package org.eclipse.graphiti.ui.internal.util.ui

## Class DoubleField

- java.lang.Object
- - org.eclipse.swt.widgets.Widget
  - - org.eclipse.swt.widgets.Control
    - - org.eclipse.swt.widgets.Scrollable
      - - org.eclipse.swt.widgets.Composite
        - - org.eclipse.graphiti.ui.internal.util.ui.DoubleField

All Implemented Interfaces:
  `java.util.EventListener`, `org.eclipse.swt.events.ModifyListener`, `org.eclipse.swt.graphics.Drawable`, `org.eclipse.swt.internal.SWTEventListener`

    public class DoubleField
    extends org.eclipse.swt.widgets.Composite
    implements org.eclipse.swt.events.ModifyListener

A Text control allowing only non-negative decimal input. Writes its state to a IPrintPreferences object passed in the constructor.

### Field Summary

Fields
`static java.lang.String` `decimalNumberFormat`

### Fields inherited from class org.eclipse.swt.widgets.Composite

`embeddedHandle`

### Fields inherited from class org.eclipse.swt.widgets.Widget

`handle`

### Constructor Summary

Constructors
`DoubleField​(org.eclipse.swt.widgets.Composite parent, int style, IPrintPreferences prefs, int index)` Creates a new DoubleField.

### Method Summary

All Methods Instance Methods Concrete Methods
`void` `addModifyListener​(org.eclipse.swt.events.ModifyListener listener)`
`org.eclipse.swt.widgets.Text` `getText()`
`void` `modifyText​(org.eclipse.swt.events.ModifyEvent e)`
`void` `setEnabled​(boolean en)`
`void` `updateControl()` Updates control according to value in the IPrintPreferences.

### Methods inherited from class org.eclipse.swt.widgets.Composite

`changed, checkSubclass, drawBackground, getBackgroundMode, getChildren, getLayout, getLayoutDeferred, getTabList, isLayoutDeferred, layout, layout, layout, layout, layout, setBackgroundMode, setFocus, setLayout, setLayoutDeferred, setTabList, toString`

### 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, computeSize, dragDetect, dragDetect, forceFocus, getAccessible, getBackground, getBackgroundImage, getBorderWidth, getBounds, getCursor, getDragDetect, getEnabled, getFont, getForeground, getLayoutData, getLocation, getMenu, getMonitor, getOrientation, getParent, getRegion, getShell, getSize, getTextDirection, getToolTipText, getTouchEnabled, getVisible, internal_dispose_GC, internal_new_GC, isAutoScalable, 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, requestLayout, setBackground, setBackgroundImage, setBounds, setBounds, setCapture, setCursor, setDragDetect, setFont, setForeground, setLayoutData, setLocation, setLocation, setMenu, setOrientation, setParent, setRedraw, setRegion, setSize, setSize, setTextDirection, 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, isAutoDirection, isDisposed, isListening, notifyListeners, removeDisposeListener, removeListener, removeListener, reskin, setData, setData`

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

### Field Detail

#### decimalNumberFormat

    public static final java.lang.String decimalNumberFormat

See Also:
  Constant Field Values

### Constructor Detail

#### DoubleField

    public DoubleField​(org.eclipse.swt.widgets.Composite parent,
                       int style,
                       IPrintPreferences prefs,
                       int index)

Creates a new DoubleField.

### Method Detail

#### setEnabled

    public void setEnabled​(boolean en)

Overrides:
  `setEnabled` in class `org.eclipse.swt.widgets.Control`

#### updateControl

    public void updateControl()

Updates control according to value in the IPrintPreferences. If it is the first update with an empty textfield, the preference value is set. If it is not the first time an empty text field occurs, nothing happens avoiding the confusing behaviour of updating to 0.00 when the user deletes all characters for preparing new input.

#### getText

    public org.eclipse.swt.widgets.Text getText()

#### addModifyListener

    public void addModifyListener​(org.eclipse.swt.events.ModifyListener listener)

#### modifyText

    public void modifyText​(org.eclipse.swt.events.ModifyEvent e)

Specified by:
  `modifyText` in interface `org.eclipse.swt.events.ModifyListener`