Package org.csstudio.ui.util.widgets
Class RangeWidget
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.RangeWidget
- All Implemented Interfaces:
- Drawable
Widget that display a range (currently only time, and only vertical) which can be modified using a mouse drag.
- 
Field SummaryFields inherited from class org.eclipse.swt.widgets.CompositeembeddedHandle
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionvoidaddRangeListener(RangeListener listener) Adds a listener, notified if the range resolution changes.doubleDistance represented by each pixel (e.g. 10 ms per pixel).intWhether the range starts at the top or at the bottom.booleanWhether the use can use the mouse to change the resolution.voidremoveRangeListener(RangeListener listener) voidsetDistancePerPx(double distancePerPx) Changes how much distance is represented by each pixel.voidsetEditable(boolean editable) Changes whether the use can use the mouse to change the resolution.voidsetStartPosition(int startPosition) Determines whether the range start at the top (and goes down) or at the bottom (and goes up).Methods inherited from class org.eclipse.swt.widgets.CanvasdrawBackground, getCaret, getIME, scroll, setCaret, setFont, setIMEMethods inherited from class org.eclipse.swt.widgets.Compositechanged, checkSubclass, drawBackground, getBackgroundMode, getChildren, getLayout, getLayoutDeferred, getTabList, isLayoutDeferred, layout, layout, layout, layout, layout, setBackgroundMode, setFocus, setLayout, setLayoutDeferred, setTabList, toStringMethods inherited from class org.eclipse.swt.widgets.ScrollablecomputeTrim, getClientArea, getHorizontalBar, getScrollbarsMode, getVerticalBar, setScrollbarsModeMethods inherited from class org.eclipse.swt.widgets.ControladdControlListener, 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, updateMethods inherited from class org.eclipse.swt.widgets.WidgetaddDisposeListener, addListener, addTypedListener, checkWidget, dispose, getData, getData, getDisplay, getListeners, getStyle, getTypedListeners, isAutoDirection, isDisposed, isListening, notifyListeners, removeDisposeListener, removeListener, removeListener, removeListener, removeTypedListener, reskin, setData, setData
- 
Constructor Details- 
RangeWidgetA new range widget.- Parameters:
- parent- parent component
- style- SWT style
 
 
- 
- 
Method Details- 
addRangeListenerAdds a listener, notified if the range resolution changes.
- 
removeRangeListener
- 
setStartPositionpublic void setStartPosition(int startPosition) Determines whether the range start at the top (and goes down) or at the bottom (and goes up).- Parameters:
- startPosition- SWT.TOP or SWT.BOTTOM
 
- 
getStartPositionpublic int getStartPosition()Whether the range starts at the top or at the bottom.- Returns:
- SWT.TOP or SWT.BOTTOM
 
- 
isEditablepublic boolean isEditable()Whether the use can use the mouse to change the resolution.- Returns:
- true if user changes are allowed
 
- 
setEditablepublic void setEditable(boolean editable) Changes whether the use can use the mouse to change the resolution.- Parameters:
- editable- true if user changes are allowed
 
- 
setDistancePerPxpublic void setDistancePerPx(double distancePerPx) Changes how much distance is represented by each pixel. For example, 1 ms per pixel or 20 seconds per pixel. The distance is expressed in seconds.- Parameters:
- distancePerPx- seconds (or fraction) represented by each pixel
 
- 
getDistancePerPxpublic double getDistancePerPx()Distance represented by each pixel (e.g. 10 ms per pixel).- Returns:
- seconds (or fraction) represented by each pixel
 
 
-