public class GFFigureCanvas extends Canvas implements IAdaptable
Figures.
Note: Only one of the styles RIGHT_TO_LEFT, LEFT_TO_RIGHT may be specified.
| Modifier and Type | Field and Description |
|---|---|
static int |
ALWAYS
Always show scrollbar.
|
static int |
AUTOMATIC
Automatically show scrollbar when needed.
|
static int |
NEVER
Never show scrollbar.
|
| Constructor and Description |
|---|
GFFigureCanvas(Composite parent,
DiagramBehavior diagramBehavior)
Creates a new FigureCanvas with the given parent.
|
GFFigureCanvas(Composite parent,
int style,
DiagramBehavior diagramBehavior)
Constructor.
|
GFFigureCanvas(Composite parent,
int style,
org.eclipse.draw2d.LightweightSystem lws,
DiagramBehavior diagramBehavior)
Constructor.
|
GFFigureCanvas(Composite parent,
org.eclipse.draw2d.LightweightSystem lws,
DiagramBehavior diagramBehavior)
Constructs a new FigureCanvas with the given parent and
LightweightSystem.
|
| Modifier and Type | Method and Description |
|---|---|
Point |
computeSize(int wHint,
int hHint,
boolean changed) |
java.lang.Object |
getAdapter(java.lang.Class adapter) |
org.eclipse.draw2d.IFigure |
getContents()
Gets the contents.
|
org.eclipse.draw2d.geometry.Rectangle |
getDiagramBoundsFromEditPartChildren() |
Font |
getFont() |
int |
getHorizontalScrollBarVisibility()
Gets the horizontal scroll bar visibility.
|
org.eclipse.draw2d.LightweightSystem |
getLightweightSystem()
Gets the lightweight system.
|
int |
getVerticalScrollBarVisibility()
Gets the vertical scroll bar visibility.
|
org.eclipse.draw2d.Viewport |
getViewport()
Returns the Viewport.
|
void |
regainHorizontalSpace()
Regain horizontal space.
|
void |
regainSpace()
Regain space.
|
void |
regainVerticalSpace()
Regain vertical space.
|
void |
removeCornerPixels() |
void |
scrollSmoothTo(int x,
int y)
Scroll smooth to.
|
void |
scrollTo(int x,
int y)
Scroll to.
|
void |
scrollToX(SelectionEvent event,
int hOffset)
Scrolls the contents horizontally so that they are offset by
hOffset. |
void |
scrollToY(SelectionEvent event,
int vOffset)
Scrolls the contents vertically so that they are offset by
vOffset. |
void |
setBorder(org.eclipse.draw2d.Border border)
Sets the given border on the LightweightSystem's root figure.
|
void |
setContents(org.eclipse.draw2d.IFigure figure)
Sets the contents of the
Viewport. |
void |
setCornerPixels() |
void |
setFont(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(org.eclipse.draw2d.Viewport vp)
Sets the Viewport.
|
drawBackground, getCaret, getIME, scroll, setCaret, setIMEchanged, drawBackground, getBackgroundMode, getChildren, getLayout, getLayoutDeferred, getTabList, isLayoutDeferred, layout, layout, layout, layout, layout, setBackgroundMode, setFocus, setLayout, setLayoutDeferred, setTabListcomputeTrim, getClientArea, getHorizontalBar, getScrollbarsMode, getVerticalBaraddControlListener, addDragDetectListener, addFocusListener, addGestureListener, addHelpListener, addKeyListener, addMenuDetectListener, addMouseListener, addMouseMoveListener, addMouseTrackListener, addMouseWheelListener, addPaintListener, addTouchListener, addTraverseListener, computeSize, dragDetect, dragDetect, forceFocus, getAccessible, getBackground, getBackgroundImage, getBorderWidth, getBounds, getCursor, getDragDetect, getEnabled, getForeground, getLayoutData, getLocation, getMenu, getMonitor, getOrientation, getParent, getRegion, getShell, getSize, getTextDirection, getToolTipText, getTouchEnabled, getVisible, internal_dispose_GC, internal_new_GC, isEnabled, isFocusControl, isReparentable, isVisible, moveAbove, moveBelow, pack, pack, print, redraw, redraw, removeControlListener, removeDragDetectListener, removeFocusListener, removeGestureListener, removeHelpListener, removeKeyListener, removeMenuDetectListener, removeMouseListener, removeMouseMoveListener, removeMouseTrackListener, removeMouseWheelListener, removePaintListener, removeTouchListener, removeTraverseListener, requestLayout, setBackground, setBackgroundImage, setBounds, setBounds, setCapture, setCursor, setDragDetect, setEnabled, setForeground, setLayoutData, setLocation, setLocation, setMenu, setOrientation, setParent, setRedraw, setRegion, setSize, setSize, setTextDirection, setToolTipText, setTouchEnabled, setVisible, toControl, toControl, toDisplay, toDisplay, traverse, traverse, traverse, updateaddDisposeListener, addListener, dispose, getData, getData, getDisplay, getListeners, getStyle, isAutoDirection, isDisposed, isListening, notifyListeners, removeDisposeListener, removeListener, reskin, setData, setData, toStringequals, getClass, hashCode, notify, notifyAll, wait, wait, waitisAutoScalablepublic static int NEVER
public static int AUTOMATIC
public static int ALWAYS
public GFFigureCanvas(Composite parent, DiagramBehavior diagramBehavior)
parent - the parentdiagramEditor - the diagram editorpublic GFFigureCanvas(Composite parent, int style, DiagramBehavior diagramBehavior)
parent - the parent compositestyle - look at class javadoc for valid stylesdiagramEditor - the diagram editorpublic GFFigureCanvas(Composite parent, org.eclipse.draw2d.LightweightSystem lws, DiagramBehavior diagramBehavior)
parent - the parentlws - the LightweightSystemdiagramEditor - the diagram editorpublic GFFigureCanvas(Composite parent, int style, org.eclipse.draw2d.LightweightSystem lws, DiagramBehavior diagramBehavior)
parent - the parent compositestyle - look at class javadoc for valid styleslws - the lightweight systemdiagramEditor - the diagram editorpublic Point computeSize(int wHint, int hHint, boolean changed)
computeSize in class Compositepublic org.eclipse.draw2d.IFigure getContents()
Viewport.public int getHorizontalScrollBarVisibility()
public org.eclipse.draw2d.LightweightSystem getLightweightSystem()
public int getVerticalScrollBarVisibility()
public org.eclipse.draw2d.Viewport getViewport()
null, a new one is created.public void scrollToX(SelectionEvent event, int hOffset)
hOffset.hOffset - the new horizontal offsetevent - the eventpublic void scrollToY(SelectionEvent event, int vOffset)
vOffset.vOffset - the new vertical offsetevent - the eventpublic void regainSpace()
public void regainHorizontalSpace()
public void regainVerticalSpace()
public org.eclipse.draw2d.geometry.Rectangle getDiagramBoundsFromEditPartChildren()
public void scrollSmoothTo(int x,
int y)
x - the xy - the ypublic void scrollTo(int x,
int y)
x - the xy - the ypublic void setBorder(org.eclipse.draw2d.Border border)
border - The new borderpublic void setContents(org.eclipse.draw2d.IFigure figure)
Viewport.figure - the new contentspublic void setHorizontalScrollBarVisibility(int v)
v - the new visibilitypublic void setScrollBarVisibility(int both)
AUTOMATIC, ALWAYS, and
NEVER.both - the new visibilitypublic void setVerticalScrollBarVisibility(int v)
v - the new visibilitypublic void setViewport(org.eclipse.draw2d.Viewport vp)
new Viewport(true).vp - the new viewportpublic void removeCornerPixels()
public void setCornerPixels()
public java.lang.Object getAdapter(java.lang.Class adapter)
getAdapter in interface IAdaptable