Package org.csstudio.ui.util.widgets
Class StartEndRangeWidget
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.swt.widgets.Canvas
org.csstudio.ui.util.widgets.StartEndRangeWidget
- All Implemented Interfaces:
Drawable
A widget with which allows you to select a range from a predefine range of values.
-
Nested Class Summary
-
Field Summary
Fields inherited from class org.eclipse.swt.widgets.Composite
embeddedHandle
-
Constructor Summary
ConstructorDescriptionStartEndRangeWidget
(Composite parent, int style) Create a the StartEndRangeWidget widget. -
Method Summary
Modifier and TypeMethodDescriptionvoid
addRangeListener
(RangeListener listener) Adds a listener, notified if the range or the selected range changes.double
getMax()
Get the current maximum value of the range.double
getMin()
Get the current minimum value of the range.double
getRange()
Get the size of the current range.double
Get the maximum value of the selected range.double
get the minimum value of the selected range.double
Get the size of the selected rangeboolean
Returns if the widget has a valid range set.void
removeRangeListener
(RangeListener listener) void
Reset the widget.void
setMax
(double max) Deprecated.void
setMin
(double min) Deprecated.void
setOrientation
(StartEndRangeWidget.ORIENTATION orientation) Set the orientation of the widget (either horizontal or vertical)StartEndRangeWidget.ORIENTATION
.void
setRange
(double min, double max) Set the new min and max for the widget.void
setRanges
(double min, double max, double selectedMin, double selectedMax) Set both the range and the selected range of the widget.void
setSelectedMax
(double selectedMax) Set the maximum value of the selected range.void
setSelectedMin
(double selectedMin) set the minimum value of the selected range.void
setSelectedRange
(double selectedMin, double selectedMax) Set the selected range for the widget.Methods inherited from class org.eclipse.swt.widgets.Canvas
drawBackground, getCaret, getIME, scroll, setCaret, setFont, setIME
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, 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, setEnabled, 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, getData, getDisplay, getListeners, getStyle, getTypedListeners, isAutoDirection, isDisposed, isListening, notifyListeners, removeDisposeListener, removeListener, removeListener, removeTypedListener, reskin, setData, setData
-
Constructor Details
-
StartEndRangeWidget
Create a the StartEndRangeWidget widget.
-
-
Method Details
-
addRangeListener
Adds a listener, notified if the range or the selected range changes. -
removeRangeListener
-
getMin
public double getMin()Get the current minimum value of the range.- Returns:
-
setMin
Deprecated. -
getMax
public double getMax()Get the current maximum value of the range.- Returns:
-
setMax
Deprecated. -
isRangeSet
public boolean isRangeSet()Returns if the widget has a valid range set.- Returns:
-
resetRange
public void resetRange()Reset the widget. -
getSelectedMin
public double getSelectedMin()get the minimum value of the selected range.- Returns:
-
setSelectedMin
public void setSelectedMin(double selectedMin) set the minimum value of the selected range.- Parameters:
selectedMin
-
-
getSelectedMax
public double getSelectedMax()Get the maximum value of the selected range.- Returns:
-
setSelectedMax
public void setSelectedMax(double selectedMax) Set the maximum value of the selected range.- Parameters:
selectedMax
-
-
setSelectedRange
public void setSelectedRange(double selectedMin, double selectedMax) Set the selected range for the widget.- Parameters:
selectedMin
-selectedMax
-
-
setRange
public void setRange(double min, double max) Set the new min and max for the widget. The widget will resize while also attempting to retain the previous selected range if possible.- Parameters:
min
-max
-
-
setRanges
public void setRanges(double min, double max, double selectedMin, double selectedMax) Set both the range and the selected range of the widget.- Parameters:
min
-max
-selectedMin
-selectedMax
-
-
setOrientation
Set the orientation of the widget (either horizontal or vertical)StartEndRangeWidget.ORIENTATION
.- Parameters:
orientation
-
-
getRange
public double getRange()Get the size of the current range.- Returns:
-
getSelectedRange
public double getSelectedRange()Get the size of the selected range- Returns:
-