|
Zest 1.5.0.201305060205 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.ObjectStructuredViewer
org.eclipse.zest.core.viewers.AbstractZoomableViewer
org.eclipse.zest.core.viewers.internal.AbstractStructuredGraphViewer
org.eclipse.zest.core.viewers.GraphViewer
public class GraphViewer
Field Summary | |
---|---|
protected Graph |
graph
|
Constructor Summary | |
---|---|
GraphViewer(Composite composite,
int style)
Initializes the viewer. |
Method Summary | |
---|---|
void |
addSelectionChangedListener(ISelectionChangedListener listener)
|
void |
applyLayout()
Applys the current layout to the viewer |
GraphItem |
findGraphItem(java.lang.Object element)
Finds the graph widget item for a given user model item. |
java.lang.Object[] |
getConnectionElements()
|
Control |
getControl()
|
protected org.eclipse.zest.core.viewers.internal.IStylingGraphModelFactory |
getFactory()
Returns the factory used to create the model. |
Graph |
getGraphControl()
|
protected LayoutAlgorithm |
getLayoutAlgorithm()
Gets the current layout algorithm. |
java.lang.Object[] |
getNodeElements()
|
int |
getStyle()
Gets the styles for this structuredViewer |
protected org.eclipse.zest.core.viewers.internal.ZoomManager |
getZoomManager()
Returns a ZoomManager that zooming can be done on. |
protected void |
hookControl(Control control)
|
void |
removeSelectionChangedListener(ISelectionChangedListener listener)
|
void |
reveal(java.lang.Object element)
|
void |
setConnectionStyle(int connectionStyle)
Sets the default style for connections in this graph. |
void |
setContentProvider(IContentProvider contentProvider)
|
void |
setControl(Graph graphModel)
|
void |
setLayoutAlgorithm(LayoutAlgorithm algorithm)
Equivalent to setLayoutAlgorithm(algorithm, false). |
void |
setLayoutAlgorithm(LayoutAlgorithm algorithm,
boolean runLayout)
Sets the layout algorithm to use for this viewer. |
void |
setNodeStyle(int nodeStyle)
Sets the default style for nodes in this graph. |
protected void |
setSelectionToWidget(java.util.List l,
boolean reveal)
|
void |
unReveal(java.lang.Object element)
|
Methods inherited from class org.eclipse.zest.core.viewers.internal.AbstractStructuredGraphViewer |
---|
addConstraintAdapter, addNode, addRelationship, addRelationship, doFindInputItem, doFindItem, doUpdateItem, filterVisuals, findItems, getConnectionsArray, getConnectionStyle, getConstraintAdapters, getGraphStyle, getNodesArray, getNodeStyle, getRawChildren, getSelectionFromWidget, getWidgetSelection, inputChanged, internalRefresh, removeNode, removeRelationship |
Methods inherited from class org.eclipse.zest.core.viewers.AbstractZoomableViewer |
---|
zoomTo |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected Graph graph
Constructor Detail |
---|
public GraphViewer(Composite composite, int style)
composite
- style
- the style for the viewer and for the layout algorithmZestStyles#LAYOUT_GRID
,
ZestStyles#LAYOUT_TREE
,
ZestStyles#LAYOUT_RADIAL
,
ZestStyles#LAYOUT_SPRING
,
ZestStyles#NO_OVERLAPPING_NODES
,
ZestStyles#NODES_HIGHLIGHT_ADJACENT
,
SWT.V_SCROLL
,
SWT.H_SCROLL
Method Detail |
---|
public void setControl(Graph graphModel)
protected void hookControl(Control control)
public int getStyle()
public Graph getGraphControl()
getGraphControl
in class org.eclipse.zest.core.viewers.internal.AbstractStructuredGraphViewer
public void setLayoutAlgorithm(LayoutAlgorithm algorithm, boolean runLayout)
setLayoutAlgorithm
in class org.eclipse.zest.core.viewers.internal.AbstractStructuredGraphViewer
algorithm
- the algorithm to layout the nodesrunLayout
- if the layout should be runpublic void setLayoutAlgorithm(LayoutAlgorithm algorithm)
org.eclipse.zest.core.viewers.internal.AbstractStructuredGraphViewer
setLayoutAlgorithm
in class org.eclipse.zest.core.viewers.internal.AbstractStructuredGraphViewer
public void setNodeStyle(int nodeStyle)
org.eclipse.zest.core.viewers.internal.AbstractStructuredGraphViewer
setNodeStyle
in class org.eclipse.zest.core.viewers.internal.AbstractStructuredGraphViewer
nodeStyle
- the style for the nodes.#ZestStyles
public void setContentProvider(IContentProvider contentProvider)
public GraphItem findGraphItem(java.lang.Object element)
The
- user model node.
public void applyLayout()
applyLayout
in class org.eclipse.zest.core.viewers.internal.AbstractStructuredGraphViewer
protected void setSelectionToWidget(java.util.List l, boolean reveal)
setSelectionToWidget
in class org.eclipse.zest.core.viewers.internal.AbstractStructuredGraphViewer
public Control getControl()
public java.lang.Object[] getNodeElements()
getNodeElements
in class org.eclipse.zest.core.viewers.internal.AbstractStructuredGraphViewer
public java.lang.Object[] getConnectionElements()
getConnectionElements
in class org.eclipse.zest.core.viewers.internal.AbstractStructuredGraphViewer
public void reveal(java.lang.Object element)
reveal
in class org.eclipse.zest.core.viewers.internal.AbstractStructuredGraphViewer
public void setConnectionStyle(int connectionStyle)
org.eclipse.zest.core.viewers.internal.AbstractStructuredGraphViewer
setConnectionStyle
in class org.eclipse.zest.core.viewers.internal.AbstractStructuredGraphViewer
connectionStyle
- the style for the connections.#ZestStyles
public void unReveal(java.lang.Object element)
unReveal
in class org.eclipse.zest.core.viewers.internal.AbstractStructuredGraphViewer
public void addSelectionChangedListener(ISelectionChangedListener listener)
public void removeSelectionChangedListener(ISelectionChangedListener listener)
protected org.eclipse.zest.core.viewers.internal.ZoomManager getZoomManager()
AbstractZoomableViewer
getZoomManager
in class AbstractZoomableViewer
protected org.eclipse.zest.core.viewers.internal.IStylingGraphModelFactory getFactory()
org.eclipse.zest.core.viewers.internal.AbstractStructuredGraphViewer
getFactory
in class org.eclipse.zest.core.viewers.internal.AbstractStructuredGraphViewer
protected LayoutAlgorithm getLayoutAlgorithm()
org.eclipse.zest.core.viewers.internal.AbstractStructuredGraphViewer
getLayoutAlgorithm
in class org.eclipse.zest.core.viewers.internal.AbstractStructuredGraphViewer
|
Zest 1.5.0.201305060205 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |