de.cau.cs.kieler.kiml.ui.views
Class LayoutViewPart

java.lang.Object
  extended by org.eclipse.core.commands.common.EventManager
      extended by org.eclipse.ui.part.WorkbenchPart
          extended by org.eclipse.ui.part.ViewPart
              extended by de.cau.cs.kieler.kiml.ui.views.LayoutViewPart
All Implemented Interfaces:
IEditorChangeListener, IAdaptable, IExecutableExtension, ISelectionChangedListener, IPersistable, IViewPart, IWorkbenchPart, IWorkbenchPart2, IWorkbenchPart3, IWorkbenchPartOrientation

public class LayoutViewPart
extends ViewPart
implements ISelectionChangedListener, IEditorChangeListener

A view that displays layout options for selected objects.

Rating proposed yellow
(2009-12-11) msp

Field Summary
static String VIEW_ID
          the view identifier.
 
Fields inherited from interface org.eclipse.ui.IWorkbenchPart
PROP_TITLE
 
Constructor Summary
LayoutViewPart()
           
 
Method Summary
 void createPartControl(Composite parent)
          
 void dispose()
          
 void editorChanged(IEditorPart activeEditor)
          Fired when the active editor has changed.
static LayoutViewPart findView()
          Finds the active layout view, if it exists.
 String getCurrentDiagramType()
          Returns the diagram type identifier for the current selection.
 org.eclipse.gmf.runtime.diagram.ui.parts.DiagramEditor getCurrentEditor()
          Returns the currently active editor that is tracked by the layout view.
 EditPart getCurrentEditPart()
          Returns the first edit part in the current selection for which options are shown.
 LayoutProviderData[] getCurrentProviderData()
          Returns the current layout provider data.
 List<IPropertySheetEntry> getSelection()
          Returns the current selection of the layout view.
 void refresh()
          Refreshes the layout view asynchronously.
 void selectionChanged(SelectionChangedEvent event)
          
 void setCurrentProviderData(LayoutProviderData[] thecurrentProviderData)
          Sets the current layout provider data.
 void setFocus()
          
 
Methods inherited from class org.eclipse.ui.part.ViewPart
checkSite, getViewSite, init, init, saveState, setContentDescription, setInitializationData, setPartName
 
Methods inherited from class org.eclipse.ui.part.WorkbenchPart
addPartPropertyListener, addPropertyListener, firePartPropertyChanged, firePropertyChange, getAdapter, 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
 
Methods inherited from interface org.eclipse.core.runtime.IAdaptable
getAdapter
 

Field Detail

VIEW_ID

public static final String VIEW_ID
the view identifier.

See Also:
Constant Field Values
Constructor Detail

LayoutViewPart

public LayoutViewPart()
Method Detail

findView

public static LayoutViewPart findView()
Finds the active layout view, if it exists.

Returns:
the active layout view, or null if there is none

createPartControl

public void createPartControl(Composite parent)

Specified by:
createPartControl in interface IWorkbenchPart
Specified by:
createPartControl in class WorkbenchPart

setFocus

public void setFocus()

Specified by:
setFocus in interface IWorkbenchPart
Specified by:
setFocus in class WorkbenchPart

dispose

public void dispose()

Specified by:
dispose in interface IWorkbenchPart
Overrides:
dispose in class WorkbenchPart

refresh

public void refresh()
Refreshes the layout view asynchronously.


selectionChanged

public void selectionChanged(SelectionChangedEvent event)

Specified by:
selectionChanged in interface ISelectionChangedListener

editorChanged

public void editorChanged(IEditorPart activeEditor)
Fired when the active editor has changed.

Specified by:
editorChanged in interface IEditorChangeListener
Parameters:
activeEditor - the new active editor

getSelection

public List<IPropertySheetEntry> getSelection()
Returns the current selection of the layout view.

Returns:
the selected property sheet entries

getCurrentDiagramType

public String getCurrentDiagramType()
Returns the diagram type identifier for the current selection.

Returns:
the identifier of the diagram type for the currently selected object, or null if there is no such diagram type

getCurrentEditPart

public EditPart getCurrentEditPart()
Returns the first edit part in the current selection for which options are shown.

Returns:
the selected edit part, or null if there is none

getCurrentEditor

public org.eclipse.gmf.runtime.diagram.ui.parts.DiagramEditor getCurrentEditor()
Returns the currently active editor that is tracked by the layout view.

Returns:
the currently tracked editor, or null if there is none

setCurrentProviderData

public void setCurrentProviderData(LayoutProviderData[] thecurrentProviderData)
Sets the current layout provider data.

Parameters:
thecurrentProviderData - the current layout provider data

getCurrentProviderData

public LayoutProviderData[] getCurrentProviderData()
Returns the current layout provider data.

Returns:
the current layout provider data