public abstract class FigureSubgraph extends DefaultSubgraph
Modifier and Type | Class and Description |
---|---|
protected class |
FigureSubgraph.SubgraphFigrueListener
Listens to changes in this subgraph's figure and fires proper event in
its layout context.
|
DefaultSubgraph.DefaultSubgraphFactory, DefaultSubgraph.LabelSubgraphFactory, DefaultSubgraph.PrunedSuccessorsSubgraphFactory, DefaultSubgraph.TriangleSubgraphFactory
Modifier and Type | Field and Description |
---|---|
protected org.eclipse.draw2d.IFigure |
figure |
context, disposed, nodes
Modifier | Constructor and Description |
---|---|
protected |
FigureSubgraph(org.eclipse.gef4.layout.interfaces.NodeLayout[] nodes,
org.eclipse.gef4.layout.interfaces.LayoutContext context) |
Modifier and Type | Method and Description |
---|---|
void |
addNodes(org.eclipse.gef4.layout.interfaces.NodeLayout[] nodes)
All nodes added to this subgraph are moved to the center of the figure
(so that collapsing and expanding animation looks cool).
|
protected void |
applyLayoutChanges() |
protected abstract void |
createFigure()
Creates a figure for this subgraph and stores it in
figure . |
protected void |
dispose() |
org.eclipse.draw2d.IFigure |
getFigure() |
org.eclipse.gef4.geometry.planar.Point |
getLocation() |
org.eclipse.gef4.layout.interfaces.EntityLayout[] |
getPredecessingEntities() |
org.eclipse.gef4.geometry.planar.Dimension |
getSize() |
org.eclipse.gef4.layout.interfaces.EntityLayout[] |
getSuccessingEntities() |
boolean |
isGraphEntity() |
boolean |
isMovable() |
protected void |
refreshLocation()
Makes sure that value returned by
DefaultSubgraph.getLocation() will be equal to
current location of this subgraph. |
void |
removeNodes(org.eclipse.gef4.layout.interfaces.NodeLayout[] nodes) |
void |
setLocation(double x,
double y) |
protected abstract void |
updateFigure()
Updates the figure stored in
figure depending on current nodes
contained in this subgraph. |
countNodes, getItems, getNodes, getPreferredAspectRatio, getProperty, isDirectionDependant, isResizable, refreshConnectionsVisibility, refreshSize, setDirection, setProperty, setSize
protected FigureSubgraph(org.eclipse.gef4.layout.interfaces.NodeLayout[] nodes, org.eclipse.gef4.layout.interfaces.LayoutContext context)
protected abstract void createFigure()
figure
.
This method may not be called right after creation of the subgraph but
later when the figure is actually needed (lazy initialization).protected abstract void updateFigure()
figure
depending on current nodes
contained in this subgraph. If this method creates a new instance of
IFigure, it should remember to add a FigureSubgraph.SubgraphFigrueListener
to
it.public org.eclipse.draw2d.IFigure getFigure()
public void addNodes(org.eclipse.gef4.layout.interfaces.NodeLayout[] nodes)
addNodes
in interface org.eclipse.gef4.layout.interfaces.SubgraphLayout
addNodes
in class DefaultSubgraph
public void removeNodes(org.eclipse.gef4.layout.interfaces.NodeLayout[] nodes)
removeNodes
in interface org.eclipse.gef4.layout.interfaces.SubgraphLayout
removeNodes
in class DefaultSubgraph
public org.eclipse.gef4.layout.interfaces.EntityLayout[] getSuccessingEntities()
getSuccessingEntities
in interface org.eclipse.gef4.layout.interfaces.EntityLayout
getSuccessingEntities
in class DefaultSubgraph
public org.eclipse.gef4.layout.interfaces.EntityLayout[] getPredecessingEntities()
getPredecessingEntities
in interface org.eclipse.gef4.layout.interfaces.EntityLayout
getPredecessingEntities
in class DefaultSubgraph
public org.eclipse.gef4.geometry.planar.Dimension getSize()
getSize
in interface org.eclipse.gef4.layout.interfaces.EntityLayout
getSize
in class DefaultSubgraph
public org.eclipse.gef4.geometry.planar.Point getLocation()
getLocation
in interface org.eclipse.gef4.layout.interfaces.EntityLayout
getLocation
in class DefaultSubgraph
public void setLocation(double x, double y)
setLocation
in interface org.eclipse.gef4.layout.interfaces.EntityLayout
setLocation
in class DefaultSubgraph
protected void refreshLocation()
DefaultSubgraph
DefaultSubgraph.getLocation()
will be equal to
current location of this subgraph.refreshLocation
in class DefaultSubgraph
public boolean isGraphEntity()
isGraphEntity
in interface org.eclipse.gef4.layout.interfaces.SubgraphLayout
isGraphEntity
in class DefaultSubgraph
public boolean isMovable()
isMovable
in interface org.eclipse.gef4.layout.interfaces.EntityLayout
isMovable
in class DefaultSubgraph
protected void dispose()
dispose
in class DefaultSubgraph
protected void applyLayoutChanges()
applyLayoutChanges
in class DefaultSubgraph
Copyright (c) 2014 itemis AG and others. All rights reserved.