public abstract class GraphicalComposite extends Composite implements org.eclipse.gef.commands.CommandStackListener, org.eclipse.gef.commands.CommandStackEventListener, ISelectionListener
Constructor and Description |
---|
GraphicalComposite(Composite parent,
int style)
Constructs the editor part
|
Modifier and Type | Method and Description |
---|---|
void |
commandStackChanged(java.util.EventObject event)
Deprecated.
Replaced by
stackChanged(CommandStackEvent) because
the class CommandStackListener is deprecated by GEF |
void |
createControl()
Realizes the Editor by creating it's Control.
|
void |
dispose() |
org.eclipse.gef.ui.actions.ActionRegistry |
getActionRegistry()
Lazily creates and returns the action registry.
|
java.lang.Object |
getAdapter(java.lang.Class type)
Returns the adapter for the specified key.
|
org.eclipse.gef.DefaultEditDomain |
getEditDomain()
Returns the edit domain.
|
org.eclipse.gef.GraphicalViewer |
getGraphicalViewer()
Returns the graphical viewer.
|
java.util.List |
getSelectionActions()
Returns the list of IDs of Actions that are dependant on changes in the workbench's
ISelectionService . |
void |
hookGraphicalViewer()
Hooks the GraphicalViewer to the rest of the Editor.
|
boolean |
isDirty()
Returns
true if the command stack is dirty |
void |
selectionChanged(IWorkbenchPart part,
ISelection selection) |
void |
setEditDomain(org.eclipse.gef.DefaultEditDomain editDomain)
Sets the EditDomain for this EditorPart.
|
boolean |
setFocus() |
void |
setGraphicalViewer(org.eclipse.gef.GraphicalViewer viewer)
Sets the graphicalViewer for this EditorPart.
|
void |
stackChanged(org.eclipse.gef.commands.CommandStackEvent event)
When the command stack changes, the actions interested in the command
stack are updated.
|
changed, computeSize, drawBackground, getBackgroundMode, getChildren, getLayout, getLayoutDeferred, getTabList, isLayoutDeferred, layout, layout, layout, layout, layout, setBackgroundMode, setLayout, setLayoutDeferred, setTabList
computeTrim, getClientArea, getHorizontalBar, getScrollbarsMode, getVerticalBar
addControlListener, 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, getFont, 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, setFont, setForeground, setLayoutData, setLocation, setLocation, setMenu, setOrientation, setParent, setRedraw, setRegion, setSize, setSize, setTextDirection, setToolTipText, setTouchEnabled, setVisible, toControl, toControl, toDisplay, toDisplay, traverse, traverse, traverse, update
addDisposeListener, addListener, getData, getData, getDisplay, getListeners, getStyle, isAutoDirection, isDisposed, isListening, notifyListeners, removeDisposeListener, removeListener, reskin, setData, setData, toString
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
isAutoScalable
public GraphicalComposite(Composite parent, int style)
public void stackChanged(org.eclipse.gef.commands.CommandStackEvent event)
stackChanged
in interface org.eclipse.gef.commands.CommandStackEventListener
event
- the change eventpublic void commandStackChanged(java.util.EventObject event)
stackChanged(CommandStackEvent)
because
the class CommandStackListener
is deprecated by GEFcommandStackChanged
in interface org.eclipse.gef.commands.CommandStackListener
event
- the change eventpublic void createControl()
WARNING: This method may or may not be called by the workbench prior to dispose()
.
parent
- the parent compositepublic void dispose()
dispose
in class Widget
IWorkbenchPart.dispose()
public org.eclipse.gef.ui.actions.ActionRegistry getActionRegistry()
public java.lang.Object getAdapter(java.lang.Class type)
IMPORTANT certain requests, such as the property sheet, may be made before or after
#createPartControl(Composite)
is called. The order is unspecified by the Workbench.
IAdaptable.getAdapter(java.lang.Class)
public org.eclipse.gef.DefaultEditDomain getEditDomain()
public org.eclipse.gef.GraphicalViewer getGraphicalViewer()
public java.util.List getSelectionActions()
ISelectionService
. The associated Actions can be found in the action registry. Such
actions should implement the UpdateAction
interface so that they can be updated in
response to selection changes.updateActions(List)
public void hookGraphicalViewer()
public boolean isDirty()
true
if the command stack is dirtyISaveablePart.isDirty()
public void selectionChanged(IWorkbenchPart part, ISelection selection)
selectionChanged
in interface ISelectionListener
ISelectionListener.selectionChanged(IWorkbenchPart,
ISelection)
public void setEditDomain(org.eclipse.gef.DefaultEditDomain editDomain)
ed
- the domainpublic void setGraphicalViewer(org.eclipse.gef.GraphicalViewer viewer)
viewer
- the graphical viewer