Zest
1.5.100.201405261516

org.eclipse.zest.core.widgets
Class GraphContainer

java.lang.Object
  extended by org.eclipse.swt.widgets.Widget
      extended by org.eclipse.swt.widgets.Item
          extended by org.eclipse.zest.core.widgets.GraphItem
              extended by org.eclipse.zest.core.widgets.GraphNode
                  extended by org.eclipse.zest.core.widgets.GraphContainer
All Implemented Interfaces:
IContainer

public class GraphContainer
extends GraphNode
implements IContainer


Field Summary
 org.eclipse.zest.core.widgets.internal.ZestRootLayer zestLayer
           
 
Fields inherited from class org.eclipse.zest.core.widgets.GraphNode
graph, HIGHLIGHT_NONE, HIGHLIGHT_ON, highlighted, internalNode, nodeFigure, parent, size
 
Fields inherited from class org.eclipse.zest.core.widgets.GraphItem
CONNECTION, CONTAINER, GRAPH, NODE
 
Constructor Summary
GraphContainer(IContainer graph, int style)
          Creates a new GraphContainer.
GraphContainer(IContainer graph, int style, java.lang.String text)
           
GraphContainer(IContainer graph, int style, java.lang.String text, Image image)
           
 
Method Summary
 void applyLayout()
          Re-applies the current layout algorithm
 void close(boolean animate)
          Close this node.
 Graph getGraph()
          Gets the graph that this container has been added to.
 int getItemType()
          Gets the graph item type.
 IFigure getNodeFigure()
           
 java.util.List getNodes()
           
 double getScale()
          Get the scale for this container.
protected  void initFigure()
          NON API MEMBERS
 void open(boolean animate)
          Open the container.
protected  void refreshLocation()
           
 void setCustomFigure(IFigure nodeFigure)
          Custom figures cannot be set on a GraphContainer.
 void setLayoutAlgorithm(LayoutAlgorithm algorithm, boolean applyLayout)
          Sets the LayoutAlgorithm for this container and optionally applies it.
 void setScale(double scale)
          Set the scale for this container.
protected  void updateFigureForModel(IFigure currentFigure)
           
 
Methods inherited from class org.eclipse.zest.core.widgets.GraphNode
cacheLabel, createFigureForModel, dispose, fishEye, getBackgroundColor, getBorderColor, getBorderHighlightColor, getBorderWidth, getFont, getForegroundColor, getGraphModel, getHighlightColor, getLayoutEntity, 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
 
Methods inherited from class org.eclipse.zest.core.widgets.GraphItem
checkStyle
 
Methods inherited from class org.eclipse.swt.widgets.Item
checkSubclass, getImage, getText
 
Methods inherited from class org.eclipse.swt.widgets.Widget
addDisposeListener, addListener, checkWidget, getData, getData, getDisplay, getListeners, isListening, notifyListeners, removeDisposeListener, removeListener, removeListener, reskin, setData, setData
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

zestLayer

public org.eclipse.zest.core.widgets.internal.ZestRootLayer zestLayer
Constructor Detail

GraphContainer

public GraphContainer(IContainer graph,
                      int style)
Creates 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

public GraphContainer(IContainer graph,
                      int style,
                      java.lang.String text)

GraphContainer

public GraphContainer(IContainer graph,
                      int style,
                      java.lang.String text,
                      Image image)
Method Detail

setCustomFigure

public void setCustomFigure(IFigure nodeFigure)
Custom figures cannot be set on a GraphContainer.


getNodeFigure

public IFigure getNodeFigure()
Overrides:
getNodeFigure in class GraphNode

close

public void close(boolean animate)
Close this node.

Parameters:
animate -

open

public void open(boolean animate)
Open the container. This opens the graph container to show the nodes within and update the twistie


getGraph

public Graph getGraph()
Gets the graph that this container has been added to.

Specified by:
getGraph in interface IContainer

getItemType

public int getItemType()
Description copied from class: GraphItem
Gets the graph item type. The item type is one of: GRAPH, NODE or CONNECTION

Specified by:
getItemType in interface IContainer
Overrides:
getItemType in class GraphNode

setLayoutAlgorithm

public void setLayoutAlgorithm(LayoutAlgorithm algorithm,
                               boolean applyLayout)
Description copied from interface: IContainer
Sets the LayoutAlgorithm for this container and optionally applies it.

Specified by:
setLayoutAlgorithm in interface IContainer
Parameters:
algorithm - The layout algorithm to set

applyLayout

public void applyLayout()
Description copied from interface: IContainer
Re-applies the current layout algorithm

Specified by:
applyLayout in interface IContainer

getScale

public double getScale()
Get the scale for this container. This is the scale applied to the children contained within

Returns:

setScale

public void setScale(double scale)
Set the scale for this container. This is the scale applied to the children contained within.

Parameters:
scale -

initFigure

protected void initFigure()
NON API MEMBERS

Overrides:
initFigure in class GraphNode

updateFigureForModel

protected void updateFigureForModel(IFigure currentFigure)
Overrides:
updateFigureForModel in class GraphNode

refreshLocation

protected void refreshLocation()
Overrides:
refreshLocation in class GraphNode

getNodes

public java.util.List getNodes()
Specified by:
getNodes in interface IContainer

Zest
1.5.100.201405261516

Copyright (c) IBM Corp. and others 2000, 2011. All Rights Reserved.