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 IPropertySheetPage |
createPropertySheetPage()
Creates an
IPropertySheetPage using the injected
IPropertySheetPageFactory , if present. |
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()
|
FXDomain |
getDomain()
Returns the
FXDomain that was previously injected. |
ISelectionProvider |
getSelectionProvider()
Returns the
ISelectionProvider used by this
AbstractFXView . |
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) |
void |
setFocus() |
protected void |
unhookViewers()
Unhooks all viewers that are part of this
AbstractFXView . |
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 IPropertySheetPage createPropertySheetPage()
IPropertySheetPage
using the injected
IPropertySheetPageFactory
, if present.IPropertySheetPage
, or null
in case no
factory was injected.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 FXViewer getContentViewer()
public FXDomain getDomain()
FXDomain
that was previously injected.FXDomain
that was previously injected.public ISelectionProvider getSelectionProvider()
ISelectionProvider
used by this
AbstractFXView
. May be null
in case no injection
provider is used.ISelectionProvider
protected void hookViewers()
AbstractFXView
into the
FXCanvas
that was previously created by the injected
IFXCanvasFactory
.public void init(IViewSite site) throws PartInitException
init
in interface IViewPart
init
in class ViewPart
PartInitException
public void setFocus()
setFocus
in interface IWorkbenchPart
setFocus
in class WorkbenchPart
protected void unhookViewers()
AbstractFXView
.Copyright (c) 2014 itemis AG and others. All rights reserved.