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

# Class DoubleFieldWithDropDown

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.DoubleFieldWithDropDown

All Implemented Interfaces:
  `EventListener`, `org.eclipse.swt.events.ModifyListener`, `org.eclipse.swt.events.SelectionListener`, `org.eclipse.swt.graphics.Drawable`

public class DoubleFieldWithDropDown extends org.eclipse.swt.widgets.Composite implements org.eclipse.swt.events.ModifyListener, org.eclipse.swt.events.SelectionListener
A Combo control allowing only non-negative decimal input. Writes its state to a IPrintPreferences object passed in the constructor.

## Field Summary

Fields
Modifier and Type
Field
Description
`static final String`
`decimalNumberFormat`

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

`handle`

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

`nativeZoom`

## Constructor Summary

Constructors
Constructor
Description
`DoubleFieldWithDropDown(org.eclipse.swt.widgets.Composite parent, int style, IPrintPreferences prefs, int index, double[] defaults)`
Creates a new DoubleFieldWithDropDown.

## Method Summary

Modifier and Type
Method
Description
`void`
`addModifyListener(org.eclipse.swt.events.ModifyListener listener)`
`Object`
`getText()`
`void`
`modifyText(org.eclipse.swt.events.ModifyEvent e)`
`void`
`setEnabled(boolean en)`
`void`
`updateControl()`
Updates control according to value in the IPrintPreferences.
`void`
`widgetDefaultSelected(org.eclipse.swt.events.SelectionEvent e)`
`void`
`widgetSelected(org.eclipse.swt.events.SelectionEvent e)`

### 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, setScrollbarsMode`

### 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, getData, getDragDetect, getEnabled, getFont, getForeground, getLayoutData, getLocation, getMenu, getMonitor, getOrientation, getParent, getRegion, getShell, getSize, getTextDirection, 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, requestLayout, setAutoscalingMode, setBackground, setBackgroundImage, setBounds, setBounds, setCapture, setCursor, setData, 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, addTypedListener, checkWidget, dispose, getData, getDisplay, getListeners, getStyle, getTypedListeners, isAutoDirection, isDisposed, isListening, notifyListeners, removeDisposeListener, removeListener, removeListener, removeListener, removeTypedListener, reskin, setData`

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

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

### Methods inherited from interface org.eclipse.swt.graphics.Drawable

`isAutoScalable`

## Field Details

### decimalNumberFormat

public static final String decimalNumberFormat

See Also:
  - Constant Field Values

## Constructor Details

### DoubleFieldWithDropDown

public DoubleFieldWithDropDown(org.eclipse.swt.widgets.Composite parent, int style, IPrintPreferences prefs, int index, double[] defaults)
Creates a new DoubleFieldWithDropDown.

## Method Details

### 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 Object 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`

### widgetSelected

public void widgetSelected(org.eclipse.swt.events.SelectionEvent e)

Specified by:
  `widgetSelected` in interface `org.eclipse.swt.events.SelectionListener`

### widgetDefaultSelected

public void widgetDefaultSelected(org.eclipse.swt.events.SelectionEvent e)

Specified by:
  `widgetDefaultSelected` in interface `org.eclipse.swt.events.SelectionListener`