Package org.eclipse.gef.mvc.fx.ui.parts
Class AbstractFXView
java.lang.Object
org.eclipse.core.commands.common.EventManager
org.eclipse.ui.part.WorkbenchPart
org.eclipse.ui.part.ViewPart
org.eclipse.gef.mvc.fx.ui.parts.AbstractFXView
- All Implemented Interfaces:
IAdaptable
,IExecutableExtension
,IPersistable
,IViewPart
,IWorkbenchPart
,IWorkbenchPart2
,IWorkbenchPart3
,IWorkbenchPartOrientation
Abstract base class for views.
-
Field Summary
Fields inherited from interface org.eclipse.ui.IWorkbenchPart
PROP_TITLE
-
Constructor Summary
ConstructorsConstructorDescriptionAbstractFXView
(Injector injector) Constructs a newAbstractFXView
that uses the givenInjector
to inject its members. -
Method Summary
Modifier and TypeMethodDescriptionprotected void
activate()
Activates thisAbstractFXView
by activating theIDomain
that was previously injected.protected void
Create actions for this view and registers at the action bars of the view's site.void
createPartControl
(Composite parent) protected void
Deactivates thisAbstractFXView
by deactivating itsIDomain
that was previously injected.void
dispose()
protected void
Dispose the actions created by this view.getAdapter
(Class key) protected FXCanvas
Returns theFXCanvas
that was previously created by the injectedIFXCanvasFactory
.Returns theIDomain
that was previously injected.protected org.eclipse.gef.mvc.fx.ui.actions.FitToViewportActionGroup
Returns theActionGroup
that manages the fit-to-viewport actions.protected void
Hooks all viewers that are part of thisAbstractFXView
into theFXCanvas
that was previously created by the injectedIFXCanvasFactory
.void
void
setFocus()
protected void
Unhooks all viewers that are part of thisAbstractFXView
.Methods inherited from class org.eclipse.ui.part.ViewPart
checkSite, getViewSite, init, saveState, setContentDescription, setInitializationData, setPartName
Methods inherited from class org.eclipse.ui.part.WorkbenchPart
addPartPropertyListener, addPropertyListener, firePartPropertyChanged, firePropertyChange, getConfigurationElement, getContentDescription, getDefaultImage, getOrientation, getPartName, getPartProperties, getPartProperty, getSite, getTitle, getTitleImage, getTitleToolTip, removePartPropertyListener, removePropertyListener, setPartProperty, setSite, setTitle, setTitleImage, setTitleToolTip, showBusy
Methods inherited from class org.eclipse.core.commands.common.EventManager
addListenerObject, clearListeners, getListeners, isListenerAttached, removeListenerObject
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.eclipse.ui.IWorkbenchPart
addPropertyListener, getSite, getTitle, getTitleImage, getTitleToolTip, removePropertyListener
-
Constructor Details
-
AbstractFXView
Constructs a newAbstractFXView
that uses the givenInjector
to inject its members.- Parameters:
injector
- TheInjector
that is used to inject the members of thisAbstractFXView
.
-
-
Method Details
-
activate
protected void activate()Activates thisAbstractFXView
by activating theIDomain
that was previously injected. -
createActions
protected void createActions()Create actions for this view and registers at the action bars of the view's site. -
createPartControl
- Specified by:
createPartControl
in interfaceIWorkbenchPart
- Specified by:
createPartControl
in classWorkbenchPart
-
deactivate
protected void deactivate()Deactivates thisAbstractFXView
by deactivating itsIDomain
that was previously injected. -
dispose
public void dispose()- Specified by:
dispose
in interfaceIWorkbenchPart
- Overrides:
dispose
in classWorkbenchPart
-
disposeActions
protected void disposeActions()Dispose the actions created by this view. -
getAdapter
- Specified by:
getAdapter
in interfaceIAdaptable
- Overrides:
getAdapter
in classWorkbenchPart
-
getCanvas
Returns theFXCanvas
that was previously created by the injectedIFXCanvasFactory
.- Returns:
- The
FXCanvas
that was previously created by the injectedIFXCanvasFactory
.
-
getContentViewer
-
getDomain
Returns theIDomain
that was previously injected.- Returns:
- The
IDomain
that was previously injected.
-
getFitToViewportActionGroup
protected org.eclipse.gef.mvc.fx.ui.actions.FitToViewportActionGroup getFitToViewportActionGroup()Returns theActionGroup
that manages the fit-to-viewport actions.- Returns:
- the
ActionGroup
that manages the fit-to-viewport actions. - Since:
- 5.1
-
hookViewers
protected void hookViewers()Hooks all viewers that are part of thisAbstractFXView
into theFXCanvas
that was previously created by the injectedIFXCanvasFactory
. -
init
- Specified by:
init
in interfaceIViewPart
- Overrides:
init
in classViewPart
- Throws:
PartInitException
-
setFocus
public void setFocus()- Specified by:
setFocus
in interfaceIWorkbenchPart
- Specified by:
setFocus
in classWorkbenchPart
-
unhookViewers
protected void unhookViewers()Unhooks all viewers that are part of thisAbstractFXView
.
-