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.ReverseFigureChildrenIteratorNested classes/interfaces inherited from interface org.eclipse.draw2d.IFigure
org.eclipse.draw2d.IFigure.NoInsets -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected org.csstudio.swt.widgets.figures.ScrollbarFigure.ThumbDraggerListens to mouse events on the scrollbar to take care of scrolling.protected final org.eclipse.draw2d.geometry.TransposerTransposes 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, toolTipFields inherited from interface org.eclipse.draw2d.IFigure
MAX_DIMENSION, MIN_DIMENSION, NO_INSETSFields inherited from interface org.eclipse.draw2d.Orientable
HORIZONTAL, VERTICALFields 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
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidprotected org.eclipse.draw2d.ClickableCreates the default 'Down' ArrowButton for the ScrollBar.protected org.eclipse.draw2d.IFigureCreates the Scrollbar's "thumb", the draggable Figure that indicates the Scrollbar's position.protected org.eclipse.draw2d.ClickableCreates the default 'Up' ArrowButton for the ScrollBar.protected org.eclipse.draw2d.ClickableCreates the pagedown Figure for the Scrollbar.protected org.eclipse.draw2d.ClickableCreates the pageup Figure for the Scrollbar.doubledoubledoubledoubledoubledoubledoublegetValue()protected doubleReturns the size of the range of allowable values.protected voidInitilization of the ScrollBar.booleanbooleanprotected voidlayout()voidmanualSetValue(double value) Set Value from manual control of the widget.voidpageDown()voidpageUp()protected voidpaintClientArea(org.eclipse.draw2d.Graphics graphics) voidvoidvoidsetDirection(int direction) voidsetDownClickable(org.eclipse.draw2d.Clickable down) Sets the Clickable that represents the down arrow of the Scrollbar to down.voidsetEnabled(boolean value) voidsetExtent(double extent) voidsetFocusTraversable(boolean focusTraversable) voidsetFormatPattern(String formatPattern) voidsetHorizontal(boolean value) Sets the orientation of the ScrollBar.voidsetMaximum(double maximum) voidsetMinimum(double minimum) voidsetOrientation(int value) voidsetPageDown(org.eclipse.draw2d.Clickable down) Sets the pagedown button to the passed Clickable.voidsetPageIncrement(double pageIncrement) voidsetPageUp(org.eclipse.draw2d.Clickable up) Sets the pageup button to the passed Clickable.voidsetRequestFocusEnabled(boolean requestFocusEnabled) voidsetShowValueTip(boolean showValueTip) voidsetStepIncrement(double stepIncrement) voidsetThumb(org.eclipse.draw2d.IFigure figure) Sets the ScrollBar's thumb to the passed Figure.voidsetUpClickable(org.eclipse.draw2d.Clickable up) Sets the Clickable that represents the up arrow of the Scrollbar to up.voidsetValue(double value) voidstepDown()voidstepUp()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, validateMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods 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:
getBeanInfoin 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:
layoutin 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:
paintClientAreain classorg.eclipse.draw2d.Figure
-
removeManualValueChangeListener
-
revalidate
public void revalidate()- Specified by:
revalidatein interfaceorg.eclipse.draw2d.IFigure- Overrides:
revalidatein classorg.eclipse.draw2d.Figure
-
setDirection
public void setDirection(int direction) - Specified by:
setDirectionin 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:
setEnabledin interfaceorg.eclipse.draw2d.IFigure- Overrides:
setEnabledin 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:
setOrientationin 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:
setFocusTraversablein interfaceorg.eclipse.draw2d.IFigure- Overrides:
setFocusTraversablein classorg.eclipse.draw2d.Figure
-
setRequestFocusEnabled
public void setRequestFocusEnabled(boolean requestFocusEnabled) - Specified by:
setRequestFocusEnabledin interfaceorg.eclipse.draw2d.IFigure- Overrides:
setRequestFocusEnabledin classorg.eclipse.draw2d.Figure
-