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(ILayoutConfig config, ILayoutInspector inspector)
          Creates a layout property source for the given layout configuration.
 
Method Summary
 Object getEditableValue()
          
static String getLayoutHint(int choiceIndex)
          Return the layout hint at the given index of the layout hint choices array.
static String getLayoutHint(String displayedName)
          Returns an identifier for a displayed layout hint name.
static String[] getLayoutHintChoices()
          Return an array of choices for the layout hint option.
 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(ILayoutConfig config,
                            ILayoutInspector inspector)
Creates a layout property source for the given layout configuration.

Parameters:
config - a layout configuration
inspector - a layout inspector
Method Detail

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

getLayoutHintChoices

public static String[] getLayoutHintChoices()
Return an array of choices for the layout hint option.

Returns:
the layout hint choices

getLayoutHint

public static String getLayoutHint(int choiceIndex)
Return the layout hint at the given index of the layout hint choices array.

Parameters:
choiceIndex - an index for getLayoutHintChoices()
Returns:
the corresponding layout hint

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