|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.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.eclipse.draw2d.FigureCanvas
A Canvas that contains Figures
.
Field Summary | |
static int |
ALWAYS
Always show scrollbar |
static int |
AUTOMATIC
Automatically show scrollbar when needed |
static int |
NEVER
Never show scrollbar |
Fields inherited from class org.eclipse.swt.widgets.Composite |
embeddedHandle |
Fields inherited from class org.eclipse.swt.widgets.Widget |
handle |
Constructor Summary | |
FigureCanvas(org.eclipse.swt.widgets.Composite parent)
Creates a new FigureCanvas with the given parent. |
|
FigureCanvas(org.eclipse.swt.widgets.Composite parent,
LightweightSystem lws)
Constructs a new FigureCanvas with the given parent and LightweightSystem. |
Method Summary | |
org.eclipse.swt.graphics.Point |
computeSize(int wHint,
int hHint,
boolean changed)
|
IFigure |
getContents()
|
org.eclipse.swt.graphics.Font |
getFont()
|
int |
getHorizontalScrollBarVisibility()
|
LightweightSystem |
getLightweightSystem()
|
int |
getVerticalScrollBarVisibility()
|
Viewport |
getViewport()
Returns the Viewport. |
void |
scrollSmoothTo(int x,
int y)
Scrolls in an animated way to the new x and y location. |
void |
scrollTo(int x,
int y)
Scrolls the contents to the new x and y location. |
void |
scrollToX(int hOffset)
Scrolls the contents horizontally so that they are offset by hOffset . |
void |
scrollToY(int vOffset)
Scrolls the contents vertically so that they are offset by vOffset . |
void |
setBorder(Border border)
Sets the given border on the LightweightSystem's root figure. |
void |
setContents(IFigure figure)
Sets the contents of the Viewport . |
void |
setFont(org.eclipse.swt.graphics.Font font)
|
void |
setHorizontalScrollBarVisibility(int v)
Sets the horizontal scrollbar visibility. |
void |
setScrollBarVisibility(int both)
Sets both the horizontal and vertical scrollbar visibility to the given value. |
void |
setVerticalScrollBarVisibility(int v)
Sets the vertical scrollbar visibility. |
void |
setViewport(Viewport vp)
Sets the Viewport. |
Methods inherited from class org.eclipse.swt.widgets.Canvas |
getCaret, scroll, setCaret |
Methods inherited from class org.eclipse.swt.widgets.Composite |
checkSubclass, getChildren, getLayout, getTabList, layout, layout, setFocus, setLayout, setTabList |
Methods inherited from class org.eclipse.swt.widgets.Scrollable |
computeTrim, getBorderWidth, getClientArea, getHorizontalBar, getVerticalBar |
Methods inherited from class org.eclipse.swt.widgets.Control |
addControlListener, addFocusListener, addHelpListener, addKeyListener, addMouseListener, addMouseMoveListener, addMouseTrackListener, addPaintListener, addTraverseListener, computeSize, forceFocus, getAccessible, getBackground, getBounds, getEnabled, getForeground, getLayoutData, getLocation, getMenu, getMonitor, getParent, getShell, getSize, getToolTipText, getVisible, internal_dispose_GC, internal_new_GC, isEnabled, isFocusControl, isReparentable, isVisible, moveAbove, moveBelow, pack, pack, redraw, redraw, removeControlListener, removeFocusListener, removeHelpListener, removeKeyListener, removeMouseListener, removeMouseMoveListener, removeMouseTrackListener, removePaintListener, removeTraverseListener, setBackground, setBounds, setBounds, setCapture, setCursor, setEnabled, setForeground, setLayoutData, setLocation, setLocation, setMenu, setParent, setRedraw, setSize, setSize, setToolTipText, setVisible, toControl, toControl, toDisplay, toDisplay, traverse, update |
Methods inherited from class org.eclipse.swt.widgets.Widget |
addDisposeListener, addListener, checkWidget, dispose, getData, getData, getDisplay, getStyle, isDisposed, isListening, notifyListeners, removeDisposeListener, removeListener, removeListener, setData, setData, toString |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
public static int NEVER
public static int AUTOMATIC
public static int ALWAYS
Constructor Detail |
public FigureCanvas(org.eclipse.swt.widgets.Composite parent)
parent
- the parentpublic FigureCanvas(org.eclipse.swt.widgets.Composite parent, LightweightSystem lws)
parent
- the parentlws
- the LightweightSystemMethod Detail |
public org.eclipse.swt.graphics.Point computeSize(int wHint, int hHint, boolean changed)
Composite.computeSize(int, int, boolean)
public IFigure getContents()
Viewport
.public org.eclipse.swt.graphics.Font getFont()
Control.getFont()
public int getHorizontalScrollBarVisibility()
public LightweightSystem getLightweightSystem()
public int getVerticalScrollBarVisibility()
public Viewport getViewport()
null
, a new one is created.
public void scrollSmoothTo(int x, int y)
x
- the x coordinate to scroll toy
- the y coordinate to scroll topublic void scrollTo(int x, int y)
scrollToY(int)
or scrollToX(int)
, respectively, to increase
performance.
x
- the x coordinate to scroll toy
- the y coordinate to scroll topublic void scrollToX(int hOffset)
hOffset
.
hOffset
- the new horizontal offsetpublic void scrollToY(int vOffset)
vOffset
.
vOffset
- the new vertical offsetpublic void setBorder(Border border)
border
- The new borderpublic void setContents(IFigure figure)
Viewport
.
figure
- the new contentspublic void setFont(org.eclipse.swt.graphics.Font font)
Control.setFont(org.eclipse.swt.graphics.Font)
public void setHorizontalScrollBarVisibility(int v)
AUTOMATIC
,
ALWAYS
, and NEVER
.
v
- the new visibilitypublic void setScrollBarVisibility(int both)
AUTOMATIC
, ALWAYS
, and NEVER
.
both
- the new visibilitypublic void setVerticalScrollBarVisibility(int v)
AUTOMATIC
,
ALWAYS
, and NEVER
.
v
- the new visibilitypublic void setViewport(Viewport vp)
new Viewport(true)
.
vp
- the new viewport
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |