|
||||||||||
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
de.cau.cs.kieler.kiml.gmf.GmfLayoutConfig
public class GmfLayoutConfig
A layout configuration that stores layout options in the notation model of GMF diagrams.
Field Summary | |
---|---|
static String |
DIAG_PREFIX
Prefix for diagram defaults stored in the top-level edit part. |
static String |
PREFIX
Prefix for all layout options. |
Constructor Summary | |
---|---|
GmfLayoutConfig()
Create a stand-alone layout configuration for GMF. |
|
GmfLayoutConfig(ILayoutConfig externalConfig)
Create a layout configuration for GMF with embedded external configuration. |
Method Summary | ||
---|---|---|
protected void |
addProperties(Map<IProperty<?>,Object> options)
Add all notation model values to the given map of layout options. |
|
void |
clearProperties()
Clear all stored layout options for the selected element. |
|
protected
|
doGetProperty(LayoutOptionData<T> optionData)
Retrieve the value that is stored in the notation model or the default value for a layout option. |
|
|
getDiagramDefault(LayoutOptionData<T> optionData)
Returns the default value for the selected diagram. |
|
static KOption |
getKOption(org.eclipse.gmf.runtime.diagram.ui.editparts.IGraphicalEditPart editPart,
String optionId)
Deprecated. use StringValueStyle instead |
|
void |
initialize(org.eclipse.gmf.runtime.diagram.ui.editparts.IGraphicalEditPart editPart)
Initialize the configuration for a graphical edit part. |
|
boolean |
isDefault(LayoutOptionData<?> optionData)
Determines whether the given layout option is already stored in the notation view of the selected element. |
|
static boolean |
isNoLayout(EditPart editPart)
Determines whether the given edit part should not be layouted. |
|
static void |
removeKOption(LayoutOptionStyle style,
LayoutOptionData<?> optionData)
Deprecated. use StringValueStyle instead |
|
static void |
removeOptionStyle(View view)
Deprecated. use StringValueStyle instead |
|
void |
setDiagramDefault(LayoutOptionData<?> optionData,
Object value)
Sets a default value for the selected diagram. |
|
void |
setFocus(Object element)
Set the focus of the layout configuration on a specific edit part. |
|
void |
setProperty(IProperty<?> property,
Object value)
Stores the given value in the notation view of the selected element. |
Methods inherited from class de.cau.cs.kieler.kiml.ui.layout.EclipseLayoutConfig |
---|
getAllProperties, getEditPart, getExternalConfig, getFixedSizeValue, getOption, getOption, getPortConstraintsValue, getProperty, initialize, setAspectRatio, setChildren, setPorts |
Methods inherited from class de.cau.cs.kieler.kiml.DefaultLayoutConfig |
---|
copyProperties, getContainerLayouterData, getContentLayouterData, getLayouterData, getOptionData, initialize |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final String PREFIX
public static final String DIAG_PREFIX
Constructor Detail |
---|
public GmfLayoutConfig()
public GmfLayoutConfig(ILayoutConfig externalConfig)
externalConfig
- an external configurationMethod Detail |
---|
public static KOption getKOption(org.eclipse.gmf.runtime.diagram.ui.editparts.IGraphicalEditPart editPart, String optionId)
StringValueStyle
instead
KOption
with given key that is stored for the edit part.
editPart
- the edit part for which the option shall be fetchedoptionId
- the identifier of the option
null
if there is no such optionpublic static void removeKOption(LayoutOptionStyle style, LayoutOptionData<?> optionData)
StringValueStyle
instead
style
- a layout option styleoptionData
- a layout option datapublic static void removeOptionStyle(View view)
StringValueStyle
instead
LayoutOptionStyle
from the notation view, if it exists.
view
- the notation view from which to remove the layout option stylepublic static boolean isNoLayout(EditPart editPart)
editPart
- an edit part
public void setFocus(Object element)
EclipseLayoutConfig.getAllProperties()
efficiently, since the same configuration instance can
be reused multiple times.
setFocus
in interface ILayoutConfig
setFocus
in class EclipseLayoutConfig
element
- an instance of IGraphicalEditPart
public void clearProperties()
clearProperties
in interface ILayoutConfig
clearProperties
in class DefaultLayoutConfig
public final void initialize(org.eclipse.gmf.runtime.diagram.ui.editparts.IGraphicalEditPart editPart)
editPart
- an edit partprotected <T> T doGetProperty(LayoutOptionData<T> optionData)
doGetProperty
in class EclipseLayoutConfig
T
- type of optionoptionData
- a layout option
public void setProperty(IProperty<?> property, Object value)
initialize
to be called first in order to
work properly.
setProperty
in interface IPropertyHolder
setProperty
in class DefaultLayoutConfig
property
- a layout optionvalue
- an option valuepublic boolean isDefault(LayoutOptionData<?> optionData)
initialize
to be called first in order to
work properly.
isDefault
in interface ILayoutConfig
isDefault
in class DefaultLayoutConfig
optionData
- a layout option
public <T> T getDiagramDefault(LayoutOptionData<T> optionData)
T
- type of optionoptionData
- a layout option
public void setDiagramDefault(LayoutOptionData<?> optionData, Object value)
setDiagramDefault
in interface ILayoutConfig
setDiagramDefault
in class DefaultLayoutConfig
optionData
- a layout optionvalue
- the new default valueprotected void addProperties(Map<IProperty<?>,Object> options)
addProperties
in class EclipseLayoutConfig
options
- a map of layout option values
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |