Class GraphSelectionListenerView
- java.lang.Object
-
- org.eclipse.core.commands.common.EventManager
-
- org.eclipse.ui.part.WorkbenchPart
-
- org.eclipse.ui.part.ViewPart
-
- com.ensoftcorp.open.commons.utilities.selection.GraphSelectionListenerView
-
- All Implemented Interfaces:
org.eclipse.core.runtime.IAdaptable
,org.eclipse.core.runtime.IExecutableExtension
,org.eclipse.ui.IPersistable
,org.eclipse.ui.IViewPart
,org.eclipse.ui.IWorkbenchPart
,org.eclipse.ui.IWorkbenchPart2
,org.eclipse.ui.IWorkbenchPart3
,org.eclipse.ui.part.IWorkbenchPartOrientation
- Direct Known Subclasses:
ExpiringGraphSelectionProviderView
,GraphSelectionProviderView
public abstract class GraphSelectionListenerView extends org.eclipse.ui.part.ViewPart
-
-
Constructor Summary
Constructors Constructor Description GraphSelectionListenerView()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description void
disableGraphSelectionListener()
Disables graph selection listenervoid
dispose()
void
enableGraphSelectionListener()
Enables graph selection listenercom.ensoftcorp.atlas.core.query.Q
getSelection()
Returns the current selection or null if the index does not existabstract void
indexBecameAccessible()
This method can be overridden to handle index changed events Note: This event is synchronized with the view's UI thread.abstract void
indexBecameUnaccessible()
This method can be overridden to handle index changed events.boolean
indexExists()
Returns true if an index currently existsboolean
isGraphSelectionListenerEnabled()
Returns true if the graph selection listener is enabled, false otherwisevoid
registerGraphHandlers()
This method should be invoked at the end of the ViewPart's createPartControl(Composite parent) method.abstract void
selectionChanged(com.ensoftcorp.atlas.core.db.graph.Graph selection)
This method can be overridden to handle selection changed events Note: This event is synchronized with the view's UI thread.void
toggleGraphSelectionListener()
Toggles the graph selection listener state from enabled to disabled or vice versa.-
Methods inherited from class org.eclipse.ui.part.ViewPart
getViewSite, init, init, saveState, setInitializationData
-
Methods inherited from class org.eclipse.ui.part.WorkbenchPart
addPartPropertyListener, addPropertyListener, createPartControl, getAdapter, getContentDescription, getOrientation, getPartName, getPartProperties, getPartProperty, getSite, getTitle, getTitleImage, getTitleToolTip, removePartPropertyListener, removePropertyListener, setFocus, setPartProperty, showBusy
-
-
-
-
Method Detail
-
registerGraphHandlers
public void registerGraphHandlers()
This method should be invoked at the end of the ViewPart's createPartControl(Composite parent) method. Listener's will automatically be cleaned up when the view is disposed.
-
isGraphSelectionListenerEnabled
public boolean isGraphSelectionListenerEnabled()
Returns true if the graph selection listener is enabled, false otherwise- Returns:
-
enableGraphSelectionListener
public void enableGraphSelectionListener()
Enables graph selection listener
-
disableGraphSelectionListener
public void disableGraphSelectionListener()
Disables graph selection listener
-
toggleGraphSelectionListener
public void toggleGraphSelectionListener()
Toggles the graph selection listener state from enabled to disabled or vice versa.
-
selectionChanged
public abstract void selectionChanged(com.ensoftcorp.atlas.core.db.graph.Graph selection)
This method can be overridden to handle selection changed events Note: This event is synchronized with the view's UI thread.
-
indexBecameUnaccessible
public abstract void indexBecameUnaccessible()
This method can be overridden to handle index changed events. Note: This event is synchronized with the view's UI thread.
-
indexBecameAccessible
public abstract void indexBecameAccessible()
This method can be overridden to handle index changed events Note: This event is synchronized with the view's UI thread.
-
indexExists
public boolean indexExists()
Returns true if an index currently exists- Returns:
-
getSelection
public com.ensoftcorp.atlas.core.query.Q getSelection()
Returns the current selection or null if the index does not exist- Returns:
-
dispose
public void dispose()
- Specified by:
dispose
in interfaceorg.eclipse.ui.IWorkbenchPart
- Overrides:
dispose
in classorg.eclipse.ui.part.WorkbenchPart
-
-