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

java.lang.Object
  extended by de.cau.cs.kieler.kiml.ui.views.GmfLayoutPropertySource
All Implemented Interfaces:
IPropertySource

public class GmfLayoutPropertySource
extends Object
implements IPropertySource

A property source for layout options for GMF diagrams.

Rating proposed yellow
(2009-12-11) msp

Constructor Summary
GmfLayoutPropertySource(org.eclipse.gmf.runtime.diagram.ui.editparts.IGraphicalEditPart sourceEditPart)
          Creates a layout property source for the given graphical edit part.
 
Method Summary
 Object getEditableValue()
          
static String getLayoutHint(String displayedName)
          Returns an identifier for a displayed layout hint name.
 IPropertyDescriptor[] getPropertyDescriptors()
          
 Object getPropertyValue(Object id)
          
static org.eclipse.gmf.runtime.diagram.ui.editparts.IGraphicalEditPart getShownEditPart(org.eclipse.gmf.runtime.diagram.ui.editparts.IGraphicalEditPart sourceEditPart)
          Returns the edit part for which layout options would be shown by this property source.
 boolean isPropertySet(Object id)
          
 void resetPropertyValue(Object id)
          
 void setPropertyValue(Object id, Object thevalue)
          
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

GmfLayoutPropertySource

public GmfLayoutPropertySource(org.eclipse.gmf.runtime.diagram.ui.editparts.IGraphicalEditPart sourceEditPart)
Creates a layout property source for the given graphical edit part.

Parameters:
sourceEditPart - a graphical edit part from a GMF diagram
Method Detail

getShownEditPart

public static final org.eclipse.gmf.runtime.diagram.ui.editparts.IGraphicalEditPart getShownEditPart(org.eclipse.gmf.runtime.diagram.ui.editparts.IGraphicalEditPart sourceEditPart)
Returns the edit part for which layout options would be shown by this property source.

Parameters:
sourceEditPart - the source edit part
Returns:
the shown edit part, or null if there is none

getPropertyDescriptors

public IPropertyDescriptor[] getPropertyDescriptors()

Specified by:
getPropertyDescriptors in interface IPropertySource

getPropertyValue

public Object getPropertyValue(Object id)

Specified by:
getPropertyValue in interface IPropertySource

setPropertyValue

public void setPropertyValue(Object id,
                             Object thevalue)

Specified by:
setPropertyValue in interface IPropertySource

getEditableValue

public Object getEditableValue()

Specified by:
getEditableValue in interface IPropertySource

isPropertySet

public boolean isPropertySet(Object id)

Specified by:
isPropertySet in interface IPropertySource

resetPropertyValue

public void resetPropertyValue(Object id)

Specified by:
resetPropertyValue in interface IPropertySource

getLayoutHint

public static String getLayoutHint(String displayedName)
Returns an identifier for a displayed layout hint name.

Parameters:
displayedName - a displayed name of a layout provider or a layout type
Returns:
the corresponding identifier, or the empty string if no match is found