Package org.csstudio.swt.widgets.figures
Class ScrollbarFigure
java.lang.Object
org.eclipse.draw2d.Figure
org.csstudio.swt.widgets.figures.ScrollbarFigure
- All Implemented Interfaces:
Introspectable
,org.eclipse.draw2d.IFigure
,org.eclipse.draw2d.Orientable
,org.eclipse.draw2d.PositionConstants
public class ScrollbarFigure
extends org.eclipse.draw2d.Figure
implements org.eclipse.draw2d.Orientable, Introspectable
ScrollBar Figure which supports double value.
-
Nested Class Summary
Nested classes/interfaces inherited from class org.eclipse.draw2d.Figure
org.eclipse.draw2d.Figure.FigureIterator, org.eclipse.draw2d.Figure.IdentitySearch, org.eclipse.draw2d.Figure.ReverseFigureChildrenIterator
Nested classes/interfaces inherited from interface org.eclipse.draw2d.IFigure
org.eclipse.draw2d.IFigure.NoInsets
-
Field Summary
Modifier and TypeFieldDescriptionprotected org.csstudio.swt.widgets.figures.ScrollbarFigure.ThumbDragger
Listens to mouse events on the scrollbar to take care of scrolling.protected final org.eclipse.draw2d.geometry.Transposer
Transposes from vertical to horizontal if needed.Fields inherited from class org.eclipse.draw2d.Figure
bgColor, border, bounds, fgColor, flags, font, MAX_FLAG, maxSize, minSize, NO_MANAGER, prefSize, toolTip
Fields inherited from interface org.eclipse.draw2d.IFigure
MAX_DIMENSION, MIN_DIMENSION, NO_INSETS
Fields inherited from interface org.eclipse.draw2d.Orientable
HORIZONTAL, VERTICAL
Fields inherited from interface org.eclipse.draw2d.PositionConstants
ALWAYS_LEFT, ALWAYS_RIGHT, BOTTOM, CENTER, EAST, EAST_WEST, LEFT, LEFT_CENTER_RIGHT, MIDDLE, NONE, NORTH, NORTH_EAST, NORTH_SOUTH, NORTH_WEST, NSEW, RIGHT, SOUTH, SOUTH_EAST, SOUTH_WEST, TOP, TOP_MIDDLE_BOTTOM, WEST
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
protected org.eclipse.draw2d.Clickable
Creates the default 'Down' ArrowButton for the ScrollBar.protected org.eclipse.draw2d.IFigure
Creates the Scrollbar's "thumb", the draggable Figure that indicates the Scrollbar's position.protected org.eclipse.draw2d.Clickable
Creates the default 'Up' ArrowButton for the ScrollBar.protected org.eclipse.draw2d.Clickable
Creates the pagedown Figure for the Scrollbar.protected org.eclipse.draw2d.Clickable
Creates the pageup Figure for the Scrollbar.double
double
double
double
double
double
double
getValue()
protected double
Returns the size of the range of allowable values.protected void
Initilization of the ScrollBar.boolean
boolean
protected void
layout()
void
manualSetValue
(double value) Set Value from manual control of the widget.void
pageDown()
void
pageUp()
protected void
paintClientArea
(org.eclipse.draw2d.Graphics graphics) void
void
void
setDirection
(int direction) void
setDownClickable
(org.eclipse.draw2d.Clickable down) Sets the Clickable that represents the down arrow of the Scrollbar to down.void
setEnabled
(boolean value) void
setExtent
(double extent) void
setFocusTraversable
(boolean focusTraversable) void
setFormatPattern
(String formatPattern) void
setHorizontal
(boolean value) Sets the orientation of the ScrollBar.void
setMaximum
(double maximum) void
setMinimum
(double minimum) void
setOrientation
(int value) void
setPageDown
(org.eclipse.draw2d.Clickable down) Sets the pagedown button to the passed Clickable.void
setPageIncrement
(double pageIncrement) void
setPageUp
(org.eclipse.draw2d.Clickable up) Sets the pageup button to the passed Clickable.void
setRequestFocusEnabled
(boolean requestFocusEnabled) void
setShowValueTip
(boolean showValueTip) void
setStepIncrement
(double stepIncrement) void
setThumb
(org.eclipse.draw2d.IFigure figure) Sets the ScrollBar's thumb to the passed Figure.void
setUpClickable
(org.eclipse.draw2d.Clickable up) Sets the Clickable that represents the up arrow of the Scrollbar to up.void
setValue
(double value) void
stepDown()
void
stepUp()
Methods inherited from class org.eclipse.draw2d.Figure
add, add, add, add, addAncestorListener, addCoordinateListener, addFigureListener, addFocusListener, addKeyListener, addLayoutListener, addListener, addMouseListener, addMouseMotionListener, addNotify, addPropertyChangeListener, addPropertyChangeListener, containsPoint, containsPoint, erase, findDescendantAtExcluding, findFigureAt, findFigureAt, findFigureAt, findFigureAtExcluding, findMouseEventTargetAt, findMouseEventTargetInDescendantsAt, fireCoordinateSystemChanged, fireFigureMoved, fireMoved, firePropertyChange, firePropertyChange, firePropertyChange, getBackgroundColor, getBorder, getBounds, getChildren, getChildrenRevIterable, getClientArea, getClientArea, getClippingStrategy, getCursor, getFlag, getFont, getForegroundColor, getInsets, getLayoutManager, getListeners, getListenersIterable, getLocalBackgroundColor, getLocalFont, getLocalForegroundColor, getLocation, getMaximumSize, getMinimumSize, getMinimumSize, getParent, getPreferredSize, getPreferredSize, getSize, getToolTip, getUpdateManager, handleFocusGained, handleFocusLost, handleKeyPressed, handleKeyReleased, handleMouseDoubleClicked, handleMouseDragged, handleMouseEntered, handleMouseExited, handleMouseHover, handleMouseMoved, handleMousePressed, handleMouseReleased, hasFocus, internalGetEventDispatcher, intersects, invalidate, invalidateTree, isCoordinateSystem, isEnabled, isFocusTraversable, isMirrored, isMouseEventTarget, isOpaque, isRequestFocusEnabled, isShowing, isValid, isValidationRoot, isVisible, optimizeClip, paint, paintBorder, paintChildren, paintFigure, primTranslate, remove, removeAll, removeAncestorListener, removeCoordinateListener, removeFigureListener, removeFocusListener, removeKeyListener, removeLayoutListener, removeListener, removeMouseListener, removeMouseMotionListener, removeNotify, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, requestFocus, setBackgroundColor, setBorder, setBounds, setChildrenDirection, setChildrenEnabled, setChildrenOrientation, setClippingStrategy, setConstraint, setCursor, setFlag, setFont, setForegroundColor, setLayoutManager, setLocation, setMaximumSize, setMinimumSize, setOpaque, setParent, setPreferredSize, setPreferredSize, setSize, setSize, setToolTip, setValid, setVisible, translate, translateFromParent, translateToAbsolute, translateToParent, translateToRelative, useLocalCoordinates, validate
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.eclipse.draw2d.IFigure
add, add, add, add, addAncestorListener, addCoordinateListener, addFigureListener, addFocusListener, addKeyListener, addLayoutListener, addMouseListener, addMouseMotionListener, addNotify, addPropertyChangeListener, addPropertyChangeListener, containsPoint, containsPoint, erase, findFigureAt, findFigureAt, findFigureAt, findFigureAtExcluding, findMouseEventTargetAt, getBackgroundColor, getBorder, getBounds, getChildren, getClientArea, getClientArea, getClippingStrategy, getCursor, getFont, getForegroundColor, getInsets, getLayoutManager, getLocalBackgroundColor, getLocalForegroundColor, getLocation, getMaximumSize, getMinimumSize, getMinimumSize, getParent, getPreferredSize, getPreferredSize, getSize, getToolTip, getUpdateManager, handleFocusGained, handleFocusLost, handleKeyPressed, handleKeyReleased, handleMouseDoubleClicked, handleMouseDragged, handleMouseEntered, handleMouseExited, handleMouseHover, handleMouseMoved, handleMousePressed, handleMouseReleased, hasFocus, internalGetEventDispatcher, intersects, invalidate, invalidateTree, isCoordinateSystem, isEnabled, isFocusTraversable, isMirrored, isOpaque, isRequestFocusEnabled, isShowing, isVisible, paint, remove, removeAncestorListener, removeCoordinateListener, removeFigureListener, removeFocusListener, removeKeyListener, removeLayoutListener, removeMouseListener, removeMouseMotionListener, removeNotify, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, requestFocus, setBackgroundColor, setBorder, setBounds, setClippingStrategy, setConstraint, setCursor, setFont, setForegroundColor, setLayoutManager, setLocation, setMaximumSize, setMinimumSize, setOpaque, setParent, setPreferredSize, setSize, setSize, setToolTip, setVisible, translate, translateFromParent, translateToAbsolute, translateToParent, translateToRelative, validate
-
Field Details
-
transposer
protected final org.eclipse.draw2d.geometry.Transposer transposerTransposes from vertical to horizontal if needed. -
thumbDragger
protected org.csstudio.swt.widgets.figures.ScrollbarFigure.ThumbDragger thumbDraggerListens to mouse events on the scrollbar to take care of scrolling.
-
-
Constructor Details
-
ScrollbarFigure
public ScrollbarFigure()
-
-
Method Details
-
addManualValueChangeListener
-
createDefaultDownButton
protected org.eclipse.draw2d.Clickable createDefaultDownButton()Creates the default 'Down' ArrowButton for the ScrollBar. -
createDefaultThumb
protected org.eclipse.draw2d.IFigure createDefaultThumb()Creates the Scrollbar's "thumb", the draggable Figure that indicates the Scrollbar's position. -
createDefaultUpButton
protected org.eclipse.draw2d.Clickable createDefaultUpButton()Creates the default 'Up' ArrowButton for the ScrollBar. -
createPageDown
protected org.eclipse.draw2d.Clickable createPageDown()Creates the pagedown Figure for the Scrollbar. -
createPageUp
protected org.eclipse.draw2d.Clickable createPageUp()Creates the pageup Figure for the Scrollbar. -
getBeanInfo
- Specified by:
getBeanInfo
in interfaceIntrospectable
- Throws:
IntrospectionException
-
getCoercedValue
public double getCoercedValue() -
getExtent
public double getExtent() -
getFormatPattern
-
getMaximum
public double getMaximum() -
getMinimum
public double getMinimum() -
getPageIncrement
public double getPageIncrement() -
getStepIncrement
public double getStepIncrement() -
getValue
public double getValue() -
getValueRange
protected double getValueRange()Returns the size of the range of allowable values. -
initializeParts
protected void initializeParts()Initilization of the ScrollBar. Sets the Scrollbar to have a ScrollBarLayout with vertical orientation. Creates the Figures that make up the components of the ScrollBar. -
isHorizontal
public boolean isHorizontal() -
isShowValueTip
public boolean isShowValueTip() -
layout
protected void layout()- Overrides:
layout
in classorg.eclipse.draw2d.Figure
-
manualSetValue
public void manualSetValue(double value) Set Value from manual control of the widget. Value will be coerced in range. -
pageDown
public void pageDown() -
pageUp
public void pageUp() -
paintClientArea
protected void paintClientArea(org.eclipse.draw2d.Graphics graphics) - Overrides:
paintClientArea
in classorg.eclipse.draw2d.Figure
-
removeManualValueChangeListener
-
revalidate
public void revalidate()- Specified by:
revalidate
in interfaceorg.eclipse.draw2d.IFigure
- Overrides:
revalidate
in classorg.eclipse.draw2d.Figure
-
setDirection
public void setDirection(int direction) - Specified by:
setDirection
in interfaceorg.eclipse.draw2d.Orientable
-
setDownClickable
public void setDownClickable(org.eclipse.draw2d.Clickable down) Sets the Clickable that represents the down arrow of the Scrollbar to down. -
setEnabled
public void setEnabled(boolean value) - Specified by:
setEnabled
in interfaceorg.eclipse.draw2d.IFigure
- Overrides:
setEnabled
in classorg.eclipse.draw2d.Figure
-
setExtent
public void setExtent(double extent) -
setFormatPattern
-
setHorizontal
public void setHorizontal(boolean value) Sets the orientation of the ScrollBar. Iftrue
, the Scrollbar will have a horizontal orientation. Iffalse
, the scrollBar will have a vertical orientation. -
setMaximum
public void setMaximum(double maximum) -
setMinimum
public void setMinimum(double minimum) -
setOrientation
public void setOrientation(int value) - Specified by:
setOrientation
in interfaceorg.eclipse.draw2d.Orientable
-
setPageDown
public void setPageDown(org.eclipse.draw2d.Clickable down) Sets the pagedown button to the passed Clickable. The pagedown button is the figure between the down arrow button and the ScrollBar's thumb figure. -
setPageIncrement
public void setPageIncrement(double pageIncrement) -
setPageUp
public void setPageUp(org.eclipse.draw2d.Clickable up) Sets the pageup button to the passed Clickable. The pageup button is the rectangular figure between the down arrow button and the ScrollBar's thumb figure. -
setShowValueTip
public void setShowValueTip(boolean showValueTip) - Parameters:
showValueTip
- the showValueTip to set
-
setStepIncrement
public void setStepIncrement(double stepIncrement) - Parameters:
stepIncrement
- the stepIncrement to set
-
setThumb
public void setThumb(org.eclipse.draw2d.IFigure figure) Sets the ScrollBar's thumb to the passed Figure. The thumb is the draggable component of the ScrollBar that indicates the ScrollBar's position. -
setUpClickable
public void setUpClickable(org.eclipse.draw2d.Clickable up) Sets the Clickable that represents the up arrow of the Scrollbar to up. -
setValue
public void setValue(double value) -
stepDown
public void stepDown() -
stepUp
public void stepUp() -
setFocusTraversable
public void setFocusTraversable(boolean focusTraversable) - Specified by:
setFocusTraversable
in interfaceorg.eclipse.draw2d.IFigure
- Overrides:
setFocusTraversable
in classorg.eclipse.draw2d.Figure
-
setRequestFocusEnabled
public void setRequestFocusEnabled(boolean requestFocusEnabled) - Specified by:
setRequestFocusEnabled
in interfaceorg.eclipse.draw2d.IFigure
- Overrides:
setRequestFocusEnabled
in classorg.eclipse.draw2d.Figure
-