|
Draw2D v2.0 | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Object
|
+--org.eclipse.draw2d.Figure
|
+--org.eclipse.draw2d.ScrollPane
A class which implements automatic horizontal and/or vertical scrolling for a single IFigure child. ScrollBar visibilites are represented by integer class constants: NEVER: Never show the ScrollBar AUTOMATIC: Show as needed, when the ScrollPane can no longer contain its view. ALWAYS: Always show the ScrollBar. To use, instantiate a ScrollPane object and call its setView(IFigure) method passing the IFigure that is desired to have scrolling ability.
| Inner classes inherited from class org.eclipse.draw2d.Figure |
Figure.FigureIterator |
| Inner classes inherited from class org.eclipse.draw2d.IFigure |
IFigure.NoInsets |
| Field Summary | |
static int |
ALWAYS
|
static int |
AUTOMATIC
|
protected ScrollBar |
hBar
|
static int |
NEVER
|
protected ScrollBar |
vBar
|
protected Viewport |
viewport
|
| 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 |
| Constructor Summary | |
ScrollPane()
Constructs a new ScrollPane with a ScrollPaneLayout. |
|
| Method Summary | |
protected void |
createHorizontalScrollBar()
Creates a new horizontally oriented ScrollBar and adds it to this ScrollPane. |
protected void |
createVerticalScrollBar()
Creates a new vertically oriented ScrollBar and adds it to this ScrollPane. |
protected void |
createViewport()
Creates a new Viewport and adds it to this ScrollPane. |
ScrollBar |
getHorizontalScrollBar()
Returns the ScrollPane's horizontal ScrollBar. |
int |
getHorizontalScrollBarVisibility()
Returns the visibility of the ScrollPane's horizontal ScrollBar. |
ScrollBar |
getVerticalScrollBar()
Returns the ScrollPane's vertical ScrollBar. |
int |
getVerticalScrollBarVisibility()
Returns the visibility of the ScrollPane's vertical ScrollBar. |
IFigure |
getView()
Returns the ScrollPane's view. |
Viewport |
getViewport()
Returns the ScrollPane's Viewport. |
boolean |
isOpaque()
Returns true if this figure is opaque. |
void |
scrollHorizontalTo(int x)
Scrolls the Scrollpane horizontally x pixels from its left-most position. |
void |
scrollTo(Point location)
Scrolls the Scrollpane horizontally from its left-most position by location.x pixels and vertically from its top-most position by location.y pixels. |
void |
scrollVerticalTo(int y)
Scrolls the Scrollpane vertically y pixels from its top-most position. |
void |
setHorizontalScrollBar(ScrollBar bar)
Sets the ScrollPane's horizontal ScrollBar to the passed ScrollBar. |
void |
setHorizontalScrollBarVisibility(int v)
Sets the horizontal ScrollBar visibility of the ScrollPane to the passed value. |
void |
setScrollBarVisibility(int v)
Sets both the horizontal and vertical ScrollBar visibilities of the ScrollPane to the passed value. |
void |
setVerticalScrollBar(ScrollBar bar)
Sets the ScrollPane's vertical ScrollBar to the passed Scrollbar. |
void |
setVerticalScrollBarVisibility(int v)
Sets the vertical ScrollBar visibility of the ScrollPane to the passed value. |
void |
setView(IFigure figure)
Sets the ScrollPane's view to the passed IFigure. |
void |
setViewport(Viewport vp)
Sets the ScrollPane's Viewport to the passed value. |
void |
validate()
Causes this figure to layout itself, as well as its children. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
public static final int NEVER
public static final int AUTOMATIC
public static final int ALWAYS
protected Viewport viewport
protected ScrollBar hBar
protected ScrollBar vBar
| Constructor Detail |
public ScrollPane()
| Method Detail |
protected void createHorizontalScrollBar()
protected void createViewport()
protected void createVerticalScrollBar()
public ScrollBar getHorizontalScrollBar()
public int getHorizontalScrollBarVisibility()
public ScrollBar getVerticalScrollBar()
public int getVerticalScrollBarVisibility()
public IFigure getView()
public Viewport getViewport()
Viewport.public boolean isOpaque()
IFigureisOpaque in class Figurepublic void scrollHorizontalTo(int x)
public void scrollTo(Point location)
public void scrollVerticalTo(int y)
public void setHorizontalScrollBar(ScrollBar bar)
public void setHorizontalScrollBarVisibility(int v)
public void setScrollBarVisibility(int v)
public void setVerticalScrollBar(ScrollBar bar)
public void setVerticalScrollBarVisibility(int v)
public void setView(IFigure figure)
public void setViewport(Viewport vp)
public void validate()
IFigurevalidate in class Figure
|
Draw2D v2.0 | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||