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

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

public class LayoutPropertySource
extends Object
implements IPropertySource

A property source for layout options for GMF diagrams.

Rating proposed yellow
(2009-12-11) msp

Constructor Summary
LayoutPropertySource(IMutableLayoutConfig config, LayoutContext context, TransactionalEditingDomain theeditingDomain)
          Creates a layout property source for the given layout configuration.
 
Method Summary
 LayoutContext getContext()
          Return the layout context used for this property source.
 Object getEditableValue()
          
static String getLayoutHint(String displayedName)
          Returns an identifier for a displayed layout hint name.
 IPropertyDescriptor[] getPropertyDescriptors()
          
 Object getPropertyValue(Object id)
          
 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

LayoutPropertySource

public LayoutPropertySource(IMutableLayoutConfig config,
                            LayoutContext context,
                            TransactionalEditingDomain theeditingDomain)
Creates a layout property source for the given layout configuration.

Parameters:
config - a mutable layout configuration
context - a layout context describing which element has been selected
theeditingDomain - the editing domain
Method Detail

getContext

public LayoutContext getContext()
Return the layout context used for this property source.

Returns:
the layout context

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