|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectde.cau.cs.kieler.kiml.ui.layout.DiagramLayoutManager
de.cau.cs.kieler.kiml.ui.layout.GmfDiagramLayoutManager
public class GmfDiagramLayoutManager
Diagram layout manager that is able to generically layout diagrams generated
by GMF. The internal KGraph graph structure is built from the structure of
edit parts in the diagram. The new layout is applied to the diagram using
GmfLayoutEditPolicy
, which creates a GmfLayoutCommand
to
directly manipulate data in the GMF notation model, where layout information
is stored persistently.
Field Summary |
---|
Fields inherited from class de.cau.cs.kieler.kiml.ui.layout.DiagramLayoutManager |
---|
MAX_PROGRESS_LEVELS |
Constructor Summary | |
---|---|
GmfDiagramLayoutManager()
|
Method Summary | |
---|---|
protected void |
applyLayout()
Applies the transferred layout to the original diagram. |
protected KNode |
buildLayoutGraph(IEditorPart editorPart,
EditPart editPart,
boolean layoutAncestors)
Builds a KGraph instance for the given editor or edit part. |
protected CachedLayout |
getCachedLayout()
Returns the cached layout for the last layout run. |
protected KNode |
getLayoutGraph()
Returns the last built layout graph. |
protected boolean |
supports(EditPart editPart)
Determines whether this layout manager is able to perform layout for the given edit part. |
protected boolean |
supports(IEditorPart editorPart)
Determines whether this layout manager is able to perform layout for the given editor. |
protected void |
transferLayout(boolean cacheLayout)
Transfers all layout data from the last created KGraph instance to the original diagram. |
Methods inherited from class de.cau.cs.kieler.kiml.ui.layout.DiagramLayoutManager |
---|
cacheLayout, calcAnimationTime, doLayout, layout, layout, registerManager |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public GmfDiagramLayoutManager()
Method Detail |
---|
protected boolean supports(IEditorPart editorPart)
supports
in class DiagramLayoutManager
editorPart
- an editor part
protected boolean supports(EditPart editPart)
supports
in class DiagramLayoutManager
editPart
- an edit part
protected KNode buildLayoutGraph(IEditorPart editorPart, EditPart editPart, boolean layoutAncestors)
buildLayoutGraph
in class DiagramLayoutManager
editorPart
- the editor for which layout is performed, or null
if
the diagram is not part of an editoreditPart
- the parent edit part for which layout is performed, or null
if the whole diagram shall be layoutedlayoutAncestors
- if true, layout is not only performed for the selected edit
part, but also for its ancestors
protected void transferLayout(boolean cacheLayout)
transferLayout
in class DiagramLayoutManager
cacheLayout
- if true, the layout result is cached for the underlying modelprotected void applyLayout()
applyLayout
in class DiagramLayoutManager
protected KNode getLayoutGraph()
getLayoutGraph
in class DiagramLayoutManager
protected CachedLayout getCachedLayout()
getCachedLayout
in class DiagramLayoutManager
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |