public abstract class AbstractFXView extends ViewPart
PROP_TITLE
Constructor and Description |
---|
AbstractFXView(com.google.inject.Injector injector)
Constructs a new
AbstractFXView that uses the given
Injector to inject its members. |
Modifier and Type | Method and Description |
---|---|
protected void |
activate()
Activates this
AbstractFXView by activating the FXDomain
that was previously injected. |
protected javafx.embed.swt.FXCanvas |
createCanvas(Composite parent)
Creates an
FXCanvas to allow the interoperability between SWT and
JavaFX using the IFXCanvasFactory that was previously injected. |
void |
createPartControl(Composite parent) |
protected void |
deactivate()
Deactivates this
AbstractFXView by deactivating its
FXDomain that was previously injected. |
void |
dispose() |
java.lang.Object |
getAdapter(java.lang.Class key) |
protected javafx.embed.swt.FXCanvas |
getCanvas()
Returns the
FXCanvas that was previously created by the injected
IFXCanvasFactory . |
protected FXViewer |
getContentViewer()
|
protected FXDomain |
getDomain()
Returns the
FXDomain that was previously injected. |
protected void |
hookViewers()
Hooks all viewers that are part of this
AbstractFXView into the
FXCanvas that was previously created by the injected
IFXCanvasFactory . |
void |
init(IViewSite site) |
protected void |
registerWorkbenchSelectionForwarder(FXViewer contentViewer)
Registers listeners to synchronize selection with workbench.
|
void |
setFocus() |
protected void |
unhookViewers()
Unhooks all viewers that are part of this
AbstractFXView by
unregistering the selection listeners. |
checkSite, getViewSite, init, saveState, setContentDescription, setInitializationData, setPartName
addPartPropertyListener, addPropertyListener, firePartPropertyChanged, firePropertyChange, getConfigurationElement, getContentDescription, getDefaultImage, getOrientation, getPartName, getPartProperties, getPartProperty, getSite, getTitle, getTitleImage, getTitleToolTip, removePartPropertyListener, removePropertyListener, setPartProperty, setSite, setTitle, setTitleImage, setTitleToolTip, showBusy
addListenerObject, clearListeners, getListeners, isListenerAttached, removeListenerObject
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
addPropertyListener, getSite, getTitle, getTitleImage, getTitleToolTip, removePropertyListener
public AbstractFXView(com.google.inject.Injector injector)
AbstractFXView
that uses the given
Injector
to inject its members.injector
- The Injector
that is used to inject the members of
this AbstractFXView
.protected void activate()
AbstractFXView
by activating the FXDomain
that was previously injected.protected javafx.embed.swt.FXCanvas createCanvas(Composite parent)
FXCanvas
to allow the interoperability between SWT and
JavaFX using the IFXCanvasFactory
that was previously injected.parent
- The Composite
that serves as the parent for the
created FXCanvas
.FXCanvas
that is created by the previously injected
IFXCanvasFactory
.public void createPartControl(Composite parent)
createPartControl
in interface IWorkbenchPart
createPartControl
in class WorkbenchPart
protected void deactivate()
AbstractFXView
by deactivating its
FXDomain
that was previously injected.public void dispose()
dispose
in interface IWorkbenchPart
dispose
in class WorkbenchPart
public java.lang.Object getAdapter(java.lang.Class key)
getAdapter
in interface IAdaptable
getAdapter
in class WorkbenchPart
protected javafx.embed.swt.FXCanvas getCanvas()
FXCanvas
that was previously created by the injected
IFXCanvasFactory
.FXCanvas
that was previously created by the injected
IFXCanvasFactory
.protected FXDomain getDomain()
FXDomain
that was previously injected.FXDomain
that was previously injected.protected FXViewer getContentViewer()
protected void hookViewers()
AbstractFXView
into the
FXCanvas
that was previously created by the injected
IFXCanvasFactory
. Also registers listeners for the propagation of
a selection from the Eclipse Workbench to this AbstractFXView
and
vice versa.public void init(IViewSite site) throws PartInitException
init
in interface IViewPart
init
in class ViewPart
PartInitException
protected void registerWorkbenchSelectionForwarder(FXViewer contentViewer)
contentViewer
- Viewer of which the selection is synchronized with the
workbench.public void setFocus()
setFocus
in interface IWorkbenchPart
setFocus
in class WorkbenchPart
protected void unhookViewers()
AbstractFXView
by
unregistering the selection listeners.Copyright (c) 2014 itemis AG and others. All rights reserved.