|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectde.cau.cs.kieler.kiml.DefaultLayoutConfig
de.cau.cs.kieler.kiml.ui.layout.EclipseLayoutConfig
public class EclipseLayoutConfig
A layout configuration for extension point configurations and user preferences.
Constructor Summary | |
---|---|
EclipseLayoutConfig()
Create a stand-alone Eclipse layout configuration. |
|
EclipseLayoutConfig(ILayoutConfig theexternalConfig)
Create an Eclipse layout configuration embedding an external configuration. |
Method Summary | ||
---|---|---|
protected void |
addProperties(Map<IProperty<?>,Object> options)
Add all options that have pre-configured or user defined default values to the given map. |
|
protected
|
doGetProperty(LayoutOptionData<T> optionData)
Retrieve the pre-configured or user defined default value for a layout option. |
|
Map<IProperty<?>,Object> |
getAllProperties()
Returns a map of all options that have pre-configured or user defined default values. |
|
EditPart |
getEditPart()
Returns the edit part for the selected element. |
|
ILayoutConfig |
getExternalConfig()
Returns the external layout configuration embedded in this configuration, if present. |
|
static Object |
getOption(EditPart editPart,
EObject modelElement,
String optionId)
Retrieves a layout option for the given edit part and model element by querying the option for the edit part's class name and its domain model name. |
|
static Object |
getOption(EditPart editPart,
String optionId)
Retrieves a layout option from the given edit part by using the layout inspector associated with the edit part type. |
|
|
getProperty(IProperty<T> property)
Retrieve the pre-configured or user defined default value for a layout option. |
|
void |
initialize(LayoutOptionData.Target targetType,
EditPart editPart,
String theLayoutHint)
Initialize the configuration with a layout hint and an edit part for the content or the container of the selected element. |
|
void |
setFocus(Object element)
Set the edit part or domain model element as focus for this layout configuration. |
Methods inherited from class de.cau.cs.kieler.kiml.DefaultLayoutConfig |
---|
clearProperties, copyProperties, getContainerLayouterData, getContentLayouterData, getLayouterData, getOptionData, initialize, isDefault, setDiagramDefault, setProperty |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public EclipseLayoutConfig()
public EclipseLayoutConfig(ILayoutConfig theexternalConfig)
theexternalConfig
- an external layout configurationMethod Detail |
---|
public static Object getOption(EditPart editPart, String optionId)
editPart
- an edit partoptionId
- layout option identifier
null
public static Object getOption(EditPart editPart, EObject modelElement, String optionId)
editPart
- an edit partmodelElement
- the corresponding model elementoptionId
- layout option identifier
null
public void setFocus(Object element)
getAllProperties()
efficiently, since the same configuration instance can
be reused multiple times.
setFocus
in interface ILayoutConfig
setFocus
in class DefaultLayoutConfig
element
- an EditPart
or EObject
public final void initialize(LayoutOptionData.Target targetType, EditPart editPart, String theLayoutHint)
targetType
- type of the selected element (parent, node, edge, port, etc.)editPart
- the edit parttheLayoutHint
- a layout hint, or null
public final <T> T getProperty(IProperty<T> property)
initialize
and setFocus
to be called first in order to give correct results.
getProperty
in interface IPropertyHolder
getProperty
in class DefaultLayoutConfig
T
- type of optionproperty
- a layout option
protected <T> T doGetProperty(LayoutOptionData<T> optionData)
T
- type of optionoptionData
- a layout option
public final Map<IProperty<?>,Object> getAllProperties()
getAllProperties
in interface IPropertyHolder
getAllProperties
in class DefaultLayoutConfig
protected void addProperties(Map<IProperty<?>,Object> options)
options
- a map of layout option valuespublic final EditPart getEditPart()
null
if none is selectedpublic final ILayoutConfig getExternalConfig()
null
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |