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
public abstract class AbstractFXView extends ViewPart
Abstract base class for views.
-
-
Field Summary
-
Fields inherited from interface org.eclipse.ui.IWorkbenchPart
PROP_TITLE
-
-
Constructor Summary
Constructors Constructor Description AbstractFXView(Injector injector)
Constructs a newAbstractFXView
that uses the givenInjector
to inject its members.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected void
activate()
Activates thisAbstractFXView
by activating theIDomain
that was previously injected.protected void
createActions()
Create actions for this view and registers at the action bars of the view's site.void
createPartControl(Composite parent)
protected void
deactivate()
Deactivates thisAbstractFXView
by deactivating itsIDomain
that was previously injected.void
dispose()
protected void
disposeActions()
Dispose the actions created by this view.java.lang.Object
getAdapter(java.lang.Class key)
protected javafx.embed.swt.FXCanvas
getCanvas()
Returns theFXCanvas
that was previously created by the injectedIFXCanvasFactory
.IViewer
getContentViewer()
IDomain
getDomain()
Returns theIDomain
that was previously injected.protected org.eclipse.gef.mvc.fx.ui.actions.FitToViewportActionGroup
getFitToViewportActionGroup()
Returns theActionGroup
that manages the fit-to-viewport actions.protected void
hookViewers()
Hooks all viewers that are part of thisAbstractFXView
into theFXCanvas
that was previously created by the injectedIFXCanvasFactory
.void
init(IViewSite site)
void
setFocus()
protected void
unhookViewers()
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 Detail
-
AbstractFXView
public AbstractFXView(Injector injector)
Constructs a newAbstractFXView
that uses the givenInjector
to inject its members.- Parameters:
injector
- TheInjector
that is used to inject the members of thisAbstractFXView
.
-
-
Method Detail
-
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
public void createPartControl(Composite parent)
- 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
public java.lang.Object getAdapter(java.lang.Class key)
- Specified by:
getAdapter
in interfaceIAdaptable
- Overrides:
getAdapter
in classWorkbenchPart
-
getCanvas
protected javafx.embed.swt.FXCanvas getCanvas()
Returns theFXCanvas
that was previously created by the injectedIFXCanvasFactory
.- Returns:
- The
FXCanvas
that was previously created by the injectedIFXCanvasFactory
.
-
getContentViewer
public IViewer getContentViewer()
-
getDomain
public IDomain 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
public void init(IViewSite site) throws PartInitException
- 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
.
-
-