Class NullableSpinner
java.lang.Object
org.eclipse.swt.widgets.Widget
org.eclipse.swt.widgets.Control
org.eclipse.swt.widgets.Scrollable
org.eclipse.swt.widgets.Composite
com._1c.g5.v8.dt.common.ui.controls.NullableSpinner
- All Implemented Interfaces:
org.eclipse.swt.graphics.Drawable
public class NullableSpinner
extends org.eclipse.swt.widgets.Composite
Custom spinner control with
null
value support.-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic interface
Nullable spinner value listener. -
Field Summary
Fields inherited from class org.eclipse.swt.widgets.Control
handle
-
Constructor Summary
ConstructorsConstructorDescriptionNullableSpinner
(org.eclipse.swt.widgets.Composite parent, int style) Instantiates a new nullable spinner.NullableSpinner
(org.eclipse.swt.widgets.Composite parent, int style, org.eclipse.ui.forms.widgets.FormToolkit toolkit) Instantiates a new nullable spinner. -
Method Summary
Modifier and TypeMethodDescriptionvoid
Adds the value listener.int
Gets the maximum allowed value.int
Gets the minimum allowed value.getValue()
Gets the value.void
Removes the value listener.void
setEnabled
(boolean enabled) void
setMaximum
(int maximum) Sets the maximum allowed value.void
setMinimum
(int minimum) Sets the minimum allowed value.void
Sets the value.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, 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
Methods inherited from interface org.eclipse.swt.graphics.Drawable
isAutoScalable
-
Constructor Details
-
NullableSpinner
public NullableSpinner(org.eclipse.swt.widgets.Composite parent, int style) Instantiates a new nullable spinner.- Parameters:
parent
- the parent.style
- the style.
-
NullableSpinner
public NullableSpinner(org.eclipse.swt.widgets.Composite parent, int style, org.eclipse.ui.forms.widgets.FormToolkit toolkit) Instantiates a new nullable spinner.- Parameters:
parent
- the parent.style
- the style.toolkit
- the form toolkit.
-
-
Method Details
-
getValue
Gets the value.- Returns:
- the value.
-
setValue
Sets the value.- Parameters:
value
- the new value to set.
-
addValueListener
Adds the value listener.- Parameters:
listener
- the listener, should not benull
.
-
removeValueListener
Removes the value listener.- Parameters:
listener
- the listener, should not benull
.
-
getMinimum
public int getMinimum()Gets the minimum allowed value.- Returns:
- the minimum value.
-
setMinimum
public void setMinimum(int minimum) Sets the minimum allowed value.- Parameters:
minimum
- the new minimum value.
-
getMaximum
public int getMaximum()Gets the maximum allowed value.- Returns:
- the maximum value.
-
setMaximum
public void setMaximum(int maximum) Sets the maximum allowed value.- Parameters:
maximum
- the new maximum value.
-
setEnabled
public void setEnabled(boolean enabled) - Overrides:
setEnabled
in classorg.eclipse.swt.widgets.Control
-