|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectde.cau.cs.kieler.kiml.gmf.GmfLayoutInspector
public class GmfLayoutInspector
Constructor Summary | |
---|---|
GmfLayoutInspector(org.eclipse.gmf.runtime.diagram.ui.editparts.IGraphicalEditPart editPart)
Creates a layout inspector for a GMF graphical edit part. |
Method Summary | |
---|---|
LayoutProviderData |
getContainerLayouterData()
Returns the layout provider descriptor for the container of the associated edit part. |
EditPart |
getContainerPart()
Returns the edit part that contains the associated edit part. |
Object |
getDefault(LayoutOptionData optionData)
Returns the default value for the associated diagram. |
static org.eclipse.gmf.runtime.diagram.ui.editparts.DiagramEditPart |
getDiagramEditPart(EditPart editPart)
Finds the diagram edit part of an edit part. |
IFigure |
getDrawingLayer()
Returns a layer figure for the associated diagram that can be used to draw additional information. |
TransactionalEditingDomain |
getEditingDomain()
Returns a transactional editing domain in which to perform model changes. |
LayoutProviderData |
getFocusLayouterData()
Returns the layout provider descriptor for the associated edit part. |
EObject |
getFocusModel()
Returns the domain model element that is associated with this inspector. |
EditPart |
getFocusPart()
Returns the edit part that is associated with this layout inspector. |
KOption |
getKOption(LayoutOptionData optionData,
boolean create)
Returns the currently stored KOption value for the given layout option. |
List<LayoutOptionData> |
getOptionData()
Returns a list of layout option descriptors that are available for the associated edit part. |
boolean |
hasChildren()
Returns true if the associated edit part has children that can be layouted. |
void |
initOptions()
Initialize available layout options for the associated edit part. |
void |
removeAllKOptions()
Removes all stored layout options from the associated edit part and its children. |
void |
removeKOption(LayoutOptionData optionData)
Removes any stored value for the given layout option. |
void |
setDefault(LayoutOptionData optionData,
Object value)
Sets the given option as default value for all elements of the associated diagram. |
static void |
setLayoutOptions(org.eclipse.gmf.runtime.diagram.ui.editparts.IGraphicalEditPart editPart,
KLayoutData layoutData,
boolean setUserOptions)
Sets all predefined and user defined layout options for the given edit part. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public GmfLayoutInspector(org.eclipse.gmf.runtime.diagram.ui.editparts.IGraphicalEditPart editPart)
editPart
- a graphical edit partMethod Detail |
---|
public static org.eclipse.gmf.runtime.diagram.ui.editparts.DiagramEditPart getDiagramEditPart(EditPart editPart)
editPart
- an edit part
null
if there is no containing diagram
edit partpublic static void setLayoutOptions(org.eclipse.gmf.runtime.diagram.ui.editparts.IGraphicalEditPart editPart, KLayoutData layoutData, boolean setUserOptions)
editPart
- edit part for which options are setlayoutData
- layout data where options are writtensetUserOptions
- if true, the user defined options are also setpublic void initOptions()
initOptions
in interface ILayoutInspector
public List<LayoutOptionData> getOptionData()
ILayoutInspector.initOptions()
must be called before this method is used.
getOptionData
in interface ILayoutInspector
public KOption getKOption(LayoutOptionData optionData, boolean create)
KOption
value for the given layout option.
ILayoutInspector.initOptions()
must be called before this method is used.
getKOption
in interface ILayoutInspector
optionData
- layout option datacreate
- if true and the KOption
is not available, a new instance is created and
returned
null
if there is no such value and create
is
falsepublic void removeKOption(LayoutOptionData optionData)
ILayoutInspector.initOptions()
must be called
before this method is used.
removeKOption
in interface ILayoutInspector
optionData
- layout option datapublic void removeAllKOptions()
removeAllKOptions
in interface ILayoutInspector
public EditPart getFocusPart()
getFocusPart
in interface ILayoutInspector
public EObject getFocusModel()
getFocusModel
in interface ILayoutInspector
public LayoutProviderData getFocusLayouterData()
ILayoutInspector.initOptions()
must be called before this method is used.
getFocusLayouterData
in interface ILayoutInspector
public EditPart getContainerPart()
ILayoutInspector.initOptions()
must be called before this method is used.
getContainerPart
in interface ILayoutInspector
public LayoutProviderData getContainerLayouterData()
ILayoutInspector.initOptions()
must be called before this method is used.
getContainerLayouterData
in interface ILayoutInspector
public boolean hasChildren()
true
if the associated edit part has children that can be layouted.
hasChildren
in interface ILayoutInspector
public TransactionalEditingDomain getEditingDomain()
getEditingDomain
in interface ILayoutInspector
public void setDefault(LayoutOptionData optionData, Object value)
setDefault
in interface ILayoutInspector
optionData
- layout option datavalue
- new default valuepublic Object getDefault(LayoutOptionData optionData)
getDefault
in interface ILayoutInspector
optionData
- layout option data
null
if no default value is set for
the diagrampublic IFigure getDrawingLayer()
getDrawingLayer
in interface ILayoutInspector
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |