public class GraphContainer extends GraphNode implements IContainer
graphWidget, HIGHLIGHT_NONE, HIGHLIGHT_ON, highlighted, internalNode, nodeFigure, parent, size
CONNECTION, CONTAINER, GRAPH, NODE
Constructor and Description |
---|
GraphContainer(GraphContainer container,
int style)
Deprecated.
Since Zest 2.0, use
GraphContainer(GraphWidget, int)
. |
GraphContainer(GraphWidget graph,
int style)
Creates a new GraphContainer.
|
GraphContainer(GraphWidget graph,
int style,
java.lang.String text,
Image image)
Deprecated.
Since Zest 2.0, use
GraphContainer(GraphWidget, int)
, GraphNode.setText(String) , and GraphNode.setImage(Image) |
Modifier and Type | Method and Description |
---|---|
void |
addNode(GraphNode node) |
void |
addSubgraphFigure(org.eclipse.draw2d.IFigure figure) |
void |
applyLayout() |
void |
close(boolean animate)
Close this node.
|
java.util.List<GraphConnection> |
getConnections()
Returns list of connections laying inside this container.
|
GraphWidget |
getGraph()
Gets the graph that this container has been added to.
|
Widget |
getItem() |
int |
getItemType()
Gets the graph item type.
|
org.eclipse.gef4.layout.LayoutAlgorithm |
getLayoutAlgorithm() |
org.eclipse.gef4.geometry.planar.Rectangle |
getLayoutBounds() |
org.eclipse.gef4.zest.core.widgets.InternalLayoutContext |
getLayoutContext() |
java.util.List<GraphNode> |
getNodes() |
double |
getScale()
Get the scale for this container.
|
protected void |
initFigure()
NON API MEMBERS
|
void |
open(boolean animate)
Open the container.
|
void |
setCustomFigure(org.eclipse.draw2d.IFigure nodeFigure)
Custom figures cannot be set on a GraphContainer.
|
void |
setLayoutAlgorithm(org.eclipse.gef4.layout.LayoutAlgorithm algorithm,
boolean applyLayout) |
void |
setScale(double scale)
Set the scale for this container.
|
protected void |
updateFigureForModel(org.eclipse.draw2d.IFigure currentFigure) |
cacheLabel, createFigureForModel, dispose, fishEye, getBackgroundColor, getBorderColor, getBorderHighlightColor, getBorderWidth, getFigure, getFont, getForegroundColor, getGraphWidget, getHighlightColor, getLayout, getLocation, getNodeStyle, getSize, getSourceConnections, getStyle, getTargetConnections, getTooltip, highlight, initModel, isDisposed, isSelected, isSizeFixed, isVisible, setBackgroundColor, setBorderColor, setBorderHighlightColor, setBorderWidth, setCacheLabel, setFont, setForegroundColor, setHighlightColor, setImage, setLocation, setNodeStyle, setSize, setText, setTooltip, setVisible, toString, unhighlight
checkStyle
checkSubclass, getImage, getText
addDisposeListener, addListener, checkWidget, getData, getData, getDisplay, getListeners, isListening, notifyListeners, removeDisposeListener, removeListener, removeListener, reskin, setData, setData
public GraphContainer(GraphWidget graph, int style)
graph
- The graph that the container is being added tostyle
- public GraphContainer(GraphWidget graph, int style, java.lang.String text, Image image)
GraphContainer(GraphWidget, int)
, GraphNode.setText(String)
, and GraphNode.setImage(Image)
public GraphContainer(GraphContainer container, int style)
GraphContainer(GraphWidget, int)
.public void setCustomFigure(org.eclipse.draw2d.IFigure nodeFigure)
public void close(boolean animate)
animate
- public void open(boolean animate)
public GraphWidget getGraph()
getGraph
in interface IContainer
public Widget getItem()
getItem
in interface IContainer
public int getItemType()
GraphItem
getItemType
in interface IContainer
getItemType
in class GraphNode
public void setLayoutAlgorithm(org.eclipse.gef4.layout.LayoutAlgorithm algorithm, boolean applyLayout)
setLayoutAlgorithm
in interface IContainer
public org.eclipse.gef4.zest.core.widgets.InternalLayoutContext getLayoutContext()
getLayoutContext
in interface IContainer
public org.eclipse.gef4.geometry.planar.Rectangle getLayoutBounds()
getLayoutBounds
in interface IContainer
public void applyLayout()
applyLayout
in interface IContainer
public double getScale()
public void setScale(double scale)
scale
- protected void initFigure()
initFigure
in class GraphNode
protected void updateFigureForModel(org.eclipse.draw2d.IFigure currentFigure)
updateFigureForModel
in class GraphNode
public void addSubgraphFigure(org.eclipse.draw2d.IFigure figure)
addSubgraphFigure
in interface IContainer
public void addNode(GraphNode node)
addNode
in interface IContainer
public java.util.List<GraphNode> getNodes()
getNodes
in interface IContainer
public java.util.List<GraphConnection> getConnections()
IContainer
getConnections
in interface IContainer
public org.eclipse.gef4.layout.LayoutAlgorithm getLayoutAlgorithm()
Copyright (c) 2014 itemis AG and others. All rights reserved.