Package org.eclipse.zest.core.widgets
Class GraphContainer
java.lang.Object
org.eclipse.swt.widgets.Widget
org.eclipse.swt.widgets.Item
org.eclipse.zest.core.widgets.GraphItem
org.eclipse.zest.core.widgets.GraphNode
org.eclipse.zest.core.widgets.GraphContainer
- All Implemented Interfaces:
- IContainer,- IContainer2
A Container than can be added to a Graph. Nodes can be added to this
 container. The container supports collapsing and expanding and has the same
 properties as the nodes. Containers cannot have custom figures.
- 
Field SummaryFieldsFields inherited from class org.eclipse.zest.core.widgets.GraphNodegraph, HIGHLIGHT_NONE, HIGHLIGHT_ON, highlighted, internalNode, nodeFigure, parent, sizeFields inherited from class org.eclipse.zest.core.widgets.GraphItemCONNECTION, CONTAINER, GRAPH, NODE
- 
Constructor SummaryConstructorsConstructorDescriptionGraphContainer(IContainer graph, int style) Creates a new GraphContainer.GraphContainer(IContainer graph, int style, String text) Deprecated, for removal: This API element is subject to removal in a future version.GraphContainer(IContainer graph, int style, String text, Image image) Deprecated, for removal: This API element is subject to removal in a future version.Since Zest 2.0, useGraphContainer(Graph, int),GraphNode.setText(String), andGraphNode.setImage(Image)
- 
Method SummaryModifier and TypeMethodDescriptionvoidvoidaddSubgraphFigure(IFigure figure) voidRe-applies the current layout algorithmvoidclose(boolean animate) Close this node.Returns list of connections laying inside this container.getGraph()Gets the graph that this container has been added to.protected RectanglegetItem()intGets the graph item type.final LayoutContextReturns the figure of the whole node.getNodes()doublegetScale()Get the scale for this container.protected voidNON API MEMBERSvoidopen(boolean animate) Open the container.protected voidvoidsetCustomFigure(IFigure nodeFigure) Custom figures cannot be set on a GraphContainer.voidsetLayoutAlgorithm(LayoutAlgorithm algorithm, boolean applyLayout) Sets the LayoutAlgorithm for this container and optionally applies it.voidsetScale(double scale) Set the scale for this container.protected voidupdateFigureForModel(IFigure currentFigure) Methods inherited from class org.eclipse.zest.core.widgets.GraphNodecacheLabel, createFigureForModel, dispose, fishEye, getBackgroundColor, getBorderColor, getBorderHighlightColor, getBorderWidth, getFont, getForegroundColor, getGraphModel, getHideNodeHelper, getHighlightColor, getLayout, getLayoutEntity, getLocation, getModelFigure, getNodeStyle, getSize, getSourceConnections, getStyle, getTargetConnections, getTooltip, highlight, initModel, isDisposed, isHighlighted, isSelected, isSizeFixed, isVisible, setBackgroundColor, setBorderColor, setBorderHighlightColor, setBorderWidth, setCacheLabel, setFont, setForegroundColor, setHideNodeHelper, setHighlightColor, setImage, setLocation, setModelFigure, setNodeStyle, setSize, setText, setTooltip, setVisible, toString, unhighlightMethods inherited from class org.eclipse.zest.core.widgets.GraphItemcheckStyleMethods inherited from class org.eclipse.swt.widgets.ItemcheckSubclass, getImage, getTextMethods inherited from class org.eclipse.swt.widgets.WidgetaddDisposeListener, addListener, addTypedListener, checkWidget, getData, getData, getDisplay, getListeners, getTypedListeners, isAutoDirection, isListening, notifyListeners, removeDisposeListener, removeListener, removeListener, removeListener, removeTypedListener, reskin, setData, setData
- 
Field Details- 
zestLayerpublic org.eclipse.zest.core.widgets.internal.ZestRootLayer zestLayer
 
- 
- 
Constructor Details- 
GraphContainerCreates a new GraphContainer. A GraphContainer may contain nodes, and has many of the same properties as a graph node.- Parameters:
- graph- The graph that the container is being added to
- style-
 
- 
GraphContainer@Deprecated(since="1.12", forRemoval=true) public GraphContainer(IContainer graph, int style, String text) Deprecated, for removal: This API element is subject to removal in a future version.Since Zest 2.0, useGraphContainer(Graph, int),GraphNode.setText(String)
- 
GraphContainer@Deprecated(since="1.12", forRemoval=true) public GraphContainer(IContainer graph, int style, String text, Image image) Deprecated, for removal: This API element is subject to removal in a future version.Since Zest 2.0, useGraphContainer(Graph, int),GraphNode.setText(String), andGraphNode.setImage(Image)
 
- 
- 
Method Details- 
setCustomFigureCustom figures cannot be set on a GraphContainer.
- 
getNodeFigureDescription copied from class:GraphNodeReturns the figure of the whole node.- Overrides:
- getNodeFigurein class- GraphNode
- Returns:
- nodeFigure
 
- 
closepublic void close(boolean animate) Close this node.- Parameters:
- animate-
 
- 
openpublic void open(boolean animate) Open the container. This opens the graph container to show the nodes within and update the twistie
- 
getGraphGets the graph that this container has been added to.- Specified by:
- getGraphin interface- IContainer
 
- 
getItem- Specified by:
- getItemin interface- IContainer2
 
- 
getItemTypepublic int getItemType()Description copied from class:GraphItemGets the graph item type. The item type is one of: GRAPH, NODE or CONNECTION- Specified by:
- getItemTypein interface- IContainer
- Overrides:
- getItemTypein class- GraphNode
 
- 
setLayoutAlgorithmDescription copied from interface:IContainerSets the LayoutAlgorithm for this container and optionally applies it.- Specified by:
- setLayoutAlgorithmin interface- IContainer
- Parameters:
- algorithm- The layout algorithm to set
- applyLayout-
 
- 
getLayoutAlgorithm- Since:
- 1.10
 
- 
getLayoutContext- Specified by:
- getLayoutContextin interface- IContainer2
- @noreference
- This method is not intended to be referenced by clients.
 
- 
getLayoutBounds- Specified by:
- getLayoutBoundsin interface- IContainer2
- Since:
- 1.12
 
- 
applyLayoutpublic void applyLayout()Description copied from interface:IContainerRe-applies the current layout algorithm- Specified by:
- applyLayoutin interface- IContainer
 
- 
getScalepublic double getScale()Get the scale for this container. This is the scale applied to the children contained within
- 
setScalepublic void setScale(double scale) Set the scale for this container. This is the scale applied to the children contained within.- Parameters:
- scale-
 
- 
getHideContainerBounds- Overrides:
- getHideContainerBoundsin class- GraphNode
 
- 
initFigureprotected void initFigure()NON API MEMBERS- Overrides:
- initFigurein class- GraphNode
 
- 
updateFigureForModel- Overrides:
- updateFigureForModelin class- GraphNode
 
- 
refreshLocationprotected void refreshLocation()- Overrides:
- refreshLocationin class- GraphNode
 
- 
addSubgraphFigure- Specified by:
- addSubgraphFigurein interface- IContainer2
- Parameters:
- figure-
- @noreference
- This method is not intended to be referenced by clients.
 
- 
addNode- Specified by:
- addNodein interface- IContainer2
- Parameters:
- node-
- @noreference
- This method is not intended to be referenced by clients.
 
- 
getNodes- Specified by:
- getNodesin interface- IContainer
 
- 
getConnectionsDescription copied from interface:IContainer2Returns list of connections laying inside this container. Only connections which both source and target nodes lay directly in this container are returned.- Specified by:
- getConnectionsin interface- IContainer2
- Since:
- 1.12
 
 
- 
GraphContainer(Graph, int),GraphNode.setText(String)