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 newAbstractFXViewthat uses the givenInjectorto inject its members.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voidactivate()Activates thisAbstractFXViewby activating theIDomainthat was previously injected.protected voidcreateActions()Create actions for this view and registers at the action bars of the view's site.voidcreatePartControl(Composite parent)protected voiddeactivate()Deactivates thisAbstractFXViewby deactivating itsIDomainthat was previously injected.voiddispose()protected voiddisposeActions()Dispose the actions created by this view.java.lang.ObjectgetAdapter(java.lang.Class key)protected javafx.embed.swt.FXCanvasgetCanvas()Returns theFXCanvasthat was previously created by the injectedIFXCanvasFactory.IViewergetContentViewer()IDomaingetDomain()Returns theIDomainthat was previously injected.protected org.eclipse.gef.mvc.fx.ui.actions.FitToViewportActionGroupgetFitToViewportActionGroup()Returns theActionGroupthat manages the fit-to-viewport actions.protected voidhookViewers()Hooks all viewers that are part of thisAbstractFXViewinto theFXCanvasthat was previously created by the injectedIFXCanvasFactory.voidinit(IViewSite site)voidsetFocus()protected voidunhookViewers()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 newAbstractFXViewthat uses the givenInjectorto inject its members.- Parameters:
injector- TheInjectorthat is used to inject the members of thisAbstractFXView.
-
-
Method Detail
-
activate
protected void activate()
Activates thisAbstractFXViewby activating theIDomainthat 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:
createPartControlin interfaceIWorkbenchPart- Specified by:
createPartControlin classWorkbenchPart
-
deactivate
protected void deactivate()
Deactivates thisAbstractFXViewby deactivating itsIDomainthat was previously injected.
-
dispose
public void dispose()
- Specified by:
disposein interfaceIWorkbenchPart- Overrides:
disposein classWorkbenchPart
-
disposeActions
protected void disposeActions()
Dispose the actions created by this view.
-
getAdapter
public java.lang.Object getAdapter(java.lang.Class key)
- Specified by:
getAdapterin interfaceIAdaptable- Overrides:
getAdapterin classWorkbenchPart
-
getCanvas
protected javafx.embed.swt.FXCanvas getCanvas()
Returns theFXCanvasthat was previously created by the injectedIFXCanvasFactory.- Returns:
- The
FXCanvasthat was previously created by the injectedIFXCanvasFactory.
-
getContentViewer
public IViewer getContentViewer()
-
getDomain
public IDomain getDomain()
Returns theIDomainthat was previously injected.- Returns:
- The
IDomainthat was previously injected.
-
getFitToViewportActionGroup
protected org.eclipse.gef.mvc.fx.ui.actions.FitToViewportActionGroup getFitToViewportActionGroup()
Returns theActionGroupthat manages the fit-to-viewport actions.- Returns:
- the
ActionGroupthat manages the fit-to-viewport actions. - Since:
- 5.1
-
hookViewers
protected void hookViewers()
Hooks all viewers that are part of thisAbstractFXViewinto theFXCanvasthat was previously created by the injectedIFXCanvasFactory.
-
init
public void init(IViewSite site) throws PartInitException
- Specified by:
initin interfaceIViewPart- Overrides:
initin classViewPart- Throws:
PartInitException
-
setFocus
public void setFocus()
- Specified by:
setFocusin interfaceIWorkbenchPart- Specified by:
setFocusin classWorkbenchPart
-
unhookViewers
protected void unhookViewers()
Unhooks all viewers that are part of thisAbstractFXView.
-
-