|
Eclipse Draw2d 2.1 |
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--org.eclipse.draw2d.Figure | +--org.eclipse.draw2d.ScrollBar
Provides for the scrollbars used by the ScrollPane
. A ScrollBar is made up of
five essential Figures: An 'Up' arrow button, a 'Down' arrow button, a draggable
'Thumb', a 'Pageup' button, and a 'Pagedown' button.
Nested Class Summary |
Nested classes inherited from class org.eclipse.draw2d.Figure |
Figure.FigureIterator |
Nested classes inherited from class org.eclipse.draw2d.IFigure |
IFigure.NoInsets |
Field Summary | |
protected static int |
MAX_FLAG
|
protected org.eclipse.draw2d.ScrollBar.ThumbDragger |
thumbDragger
Listens to mouse events on the scrollbar to take care of scrolling. |
protected Transposer |
transposer
Transposes from vertical to horizontal if needed. |
Fields inherited from class org.eclipse.draw2d.Figure |
bgColor, border, bounds, fgColor, flags, font, maxSize, minSize, NO_MANAGER, prefSize, toolTip |
Fields inherited from interface org.eclipse.draw2d.Orientable |
HORIZONTAL, VERTICAL |
Fields inherited from interface org.eclipse.draw2d.PositionConstants |
BOTTOM, CENTER, EAST, EAST_WEST, LEFT, LEFT_CENTER_RIGHT, MIDDLE, NONE, NORTH, NORTH_EAST, NORTH_SOUTH, NORTH_WEST, RIGHT, SOUTH, SOUTH_EAST, SOUTH_WEST, TOP, TOP_MIDDLE_BOTTOM, WEST |
Fields inherited from interface org.eclipse.draw2d.IFigure |
MAX_DIMENSION, MIN_DIMENSION, NO_INSETS |
Constructor Summary | |
ScrollBar()
Constructs a ScrollBar. |
Method Summary | |
protected Clickable |
createDefaultDownButton()
Creates the default 'Down' ArrowButton for the ScrollBar. |
protected IFigure |
createDefaultThumb()
Creates the Scrollbar's "thumb", the draggable Figure that indicates the Scrollbar's position. |
protected Clickable |
createDefaultUpButton()
Creates the default 'Up' ArrowButton for the ScrollBar. |
protected Clickable |
createPageDown()
Creates the pagedown Figure for the Scrollbar. |
protected Clickable |
createPageUp()
Creates the pageup Figure for the Scrollbar. |
protected IFigure |
getButtonDown()
Returns the figure used as the down button. |
protected IFigure |
getButtonUp()
Returns the figure used as the up button. |
int |
getExtent()
Returns the extent. |
int |
getMaximum()
Returns the maximum value. |
int |
getMinimum()
Returns the minumum value. |
protected IFigure |
getPageDown()
Returns the figure used for page down. |
int |
getPageIncrement()
Returns the the amound the scrollbar will move when the page up or page down areas are pressed. |
protected IFigure |
getPageUp()
Returns the figure used for page up. |
RangeModel |
getRangeModel()
Returns the range model for this scrollbar. |
int |
getStepIncrement()
Returns the amount the scrollbar will move when the up or down arrow buttons are pressed. |
protected IFigure |
getThumb()
Returns the figure used as the scrollbar's thumb. |
int |
getValue()
Returns the current scroll position of the scrollbar. |
protected int |
getValueRange()
Returns the size of the range of allowable values. |
protected void |
initialize()
Initilization of the ScrollBar. |
boolean |
isHorizontal()
Returns true if this scrollbar is orientated horizontally,
false otherwise. |
void |
propertyChange(PropertyChangeEvent event)
|
void |
revalidate()
Revalidates this IFigure. |
void |
setDirection(int direction)
Does nothing because this doesn't make sense for a scrollbar. |
void |
setDownClickable(Clickable down)
Sets the Clickable that represents the down arrow of the Scrollbar to down. |
void |
setEnabled(boolean value)
Sets this IFigure to be enabled. |
void |
setExtent(int ext)
Sets the extent of the Scrollbar to ext |
void |
setHorizontal(boolean value)
Sets the orientation of the ScrollBar. |
void |
setMaximum(int max)
Sets the maximum position to max. |
void |
setMinimum(int min)
Sets the minimum position to min. |
void |
setOrientation(int value)
Sets the orientation. |
void |
setPageDown(Clickable down)
Sets the pagedown button to the passed Clickable. |
void |
setPageIncrement(int increment)
Sets the ScrollBar to scroll increment pixels when its pageup or pagedown buttons are pressed. |
void |
setPageUp(Clickable up)
Sets the pageup button to the passed Clickable. |
void |
setRangeModel(RangeModel rangeModel)
Sets the ScrollBar's RangeModel to the passed value. |
void |
setStepIncrement(int increment)
Sets the ScrollBar's step increment to the passed value. |
void |
setThumb(IFigure figure)
Sets the ScrollBar's thumb to the passed Figure. |
void |
setUpClickable(Clickable up)
Sets the Clickable that represents the up arrow of the Scrollbar to up. |
void |
setValue(int v)
Sets the value of the Scrollbar to v |
protected void |
stepDown()
Causes the ScrollBar to scroll down (or right) by the value of its step increment. |
protected void |
stepUp()
Causes the ScrollBar to scroll up (or left) by the value of its step increment. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
protected static final int MAX_FLAG
Figure.MAX_FLAG
protected org.eclipse.draw2d.ScrollBar.ThumbDragger thumbDragger
protected final Transposer transposer
Constructor Detail |
public ScrollBar()
setHorizontal(boolean)
with true
to set horizontal orientation.
Method Detail |
protected Clickable createDefaultUpButton()
protected Clickable createDefaultDownButton()
protected Clickable createPageDown()
protected Clickable createPageUp()
protected IFigure createDefaultThumb()
protected IFigure getButtonUp()
protected IFigure getButtonDown()
public int getExtent()
RangeModel.getExtent()
public int getMinimum()
RangeModel.getMinimum()
public int getMaximum()
RangeModel.getMaximum()
protected IFigure getPageDown()
public int getPageIncrement()
protected IFigure getPageUp()
public RangeModel getRangeModel()
public int getStepIncrement()
protected IFigure getThumb()
public int getValue()
RangeModel.getValue()
protected int getValueRange()
protected void initialize()
public boolean isHorizontal()
true
if this scrollbar is orientated horizontally,
false
otherwise.
public void propertyChange(PropertyChangeEvent event)
propertyChange
in interface PropertyChangeListener
PropertyChangeListener.propertyChange(java.beans.PropertyChangeEvent)
public void revalidate()
IFigure
revalidate
in interface IFigure
revalidate
in class Figure
IFigure.revalidate()
public void setDirection(int direction)
setDirection
in interface Orientable
direction
- The directionOrientable.setDirection(int)
public void setDownClickable(Clickable down)
down
- the down buttonpublic void setUpClickable(Clickable up)
up
- the up buttonpublic void setEnabled(boolean value)
IFigure
setEnabled
in interface IFigure
setEnabled
in class Figure
value
- true
if this IFigure should be enabledIFigure.setEnabled(boolean)
public void setExtent(int ext)
ext
- the extentpublic final void setHorizontal(boolean value)
true
, the Scrollbar will have
a horizontal orientation. If false
, the scrollBar will have a vertical
orientation.
value
- true
if the scrollbar should be horizontalpublic void setMaximum(int max)
max
- the maximum positionpublic void setMinimum(int min)
min
- the minumum positionpublic void setOrientation(int value)
Orientable
Orientable.HORIZONTAL
or Orientable.VERTICAL
.
setOrientation
in interface Orientable
value
- The orientationOrientable.setOrientation(int)
public void setPageIncrement(int increment)
increment
- the new page incrementpublic void setPageDown(Clickable down)
down
- the page down figurepublic void setPageUp(Clickable up)
up
- the page up figurepublic void setRangeModel(RangeModel rangeModel)
rangeModel
- the new range modelpublic void setStepIncrement(int increment)
increment
- the new step incrementpublic void setThumb(IFigure figure)
figure
- the thumb figurepublic void setValue(int v)
v
- the new valueprotected void stepDown()
protected void stepUp()
|
Eclipse Draw2d 2.1 |
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |