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 newAbstractFXViewthat uses the givenInjectorto inject its members. -
Method Summary
Modifier and TypeMethodDescriptionprotected voidactivate()Activates thisAbstractFXViewby activating theIDomainthat was previously injected.protected voidCreate actions for this view and registers at the action bars of the view's site.voidcreatePartControl(Composite parent) protected voidDeactivates thisAbstractFXViewby deactivating itsIDomainthat was previously injected.voiddispose()protected voidDispose the actions created by this view.getAdapter(Class key) protected javafx.embed.swt.FXCanvasReturns theFXCanvasthat was previously created by the injectedIFXCanvasFactory.Returns theIDomainthat was previously injected.protected org.eclipse.gef.mvc.fx.ui.actions.FitToViewportActionGroupReturns theActionGroupthat manages the fit-to-viewport actions.protected voidHooks all viewers that are part of thisAbstractFXViewinto theFXCanvasthat was previously created by the injectedIFXCanvasFactory.voidvoidsetFocus()protected voidUnhooks all viewers that are part of thisAbstractFXView.Methods inherited from class org.eclipse.ui.part.ViewPart
checkSite, getViewSite, init, saveState, setContentDescription, setInitializationData, setPartNameMethods 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, showBusyMethods inherited from class org.eclipse.core.commands.common.EventManager
addListenerObject, clearListeners, getListeners, isListenerAttached, removeListenerObjectMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.eclipse.ui.IWorkbenchPart
addPropertyListener, getSite, getTitle, getTitleImage, getTitleToolTip, removePropertyListener
-
Constructor Details
-
AbstractFXView
Constructs a newAbstractFXViewthat uses the givenInjectorto inject its members.- Parameters:
injector- TheInjectorthat is used to inject the members of thisAbstractFXView.
-
-
Method Details
-
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
- 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
- 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
-
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
- 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.
-