|
Eclipse GEF 3.1 |
||||||||||
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.gef.ui.rulers.RulerComposite
A RulerComposite is used to show rulers to the north and west of the control of a
given graphical viewer
. The
rulers will be shown based on whether or not
horizontal ruler
and vertical ruler
properties are set on the given viewer, and the value of the
visibility
property.
Field Summary |
Fields inherited from class org.eclipse.swt.widgets.Control |
handle |
Constructor Summary | |
RulerComposite(Composite parent,
int style)
Constructor |
Method Summary | |
void |
layout(boolean change)
|
void |
setGraphicalViewer(ScrollingGraphicalViewer primaryViewer)
Creates rulers for the given graphical viewer. |
Methods inherited from class org.eclipse.swt.widgets.Composite |
changed, checkSubclass, computeSize, getChildren, getLayout, getLayoutDeferred, getTabList, isLayoutDeferred, layout, layout, layout, setFocus, setLayout, setLayoutDeferred, setTabList |
Methods inherited from class org.eclipse.swt.widgets.Scrollable |
computeTrim, getClientArea, getHorizontalBar, getVerticalBar |
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 |
Constructor Detail |
public RulerComposite(Composite parent, int style)
parent
- a widget which will be the parent of the new instance (cannot be null)style
- the style of widget to constructComposite.Composite(org.eclipse.swt.widgets.Composite, int)
Method Detail |
public void layout(boolean change)
Composite.layout(boolean)
public void setGraphicalViewer(ScrollingGraphicalViewer primaryViewer)
The primaryViewer or its Control cannot be null
. The primaryViewer's
Control should be a FigureCanvas and a child of this Composite. This method should
only be invoked once.
To create ruler(s), simply add the RulerProvider(s) (with the right key: RulerProvider.PROPERTY_HORIZONTAL_RULER or RulerProvider.PROPERTY_VERTICAL_RULER) as a property on the given viewer. It can be done after this method is invoked. RulerProvider.PROPERTY_RULER_VISIBILITY can be used to show/hide the rulers.
primaryViewer
- The graphical viewer for which the rulers have to be created
|
Eclipse GEF 3.1 |
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |