public class DefaultSubgraph
extends java.lang.Object
implements org.eclipse.gef4.layout.interfaces.SubgraphLayout
SubgraphLayout. Every subgraph added to
Zest GraphWidget should inherit from this class. The default
implementation is very simple. A node pruned to this subgraph is minimized
and all connections adjacent to it are made invisible. No additional graphic
elements are added to the graph, but subclasses may add them.| Modifier and Type | Class and Description |
|---|---|
static class |
DefaultSubgraph.DefaultSubgraphFactory
Default factory for
DefaultSubgraph. |
static class |
DefaultSubgraph.LabelSubgraphFactory |
static class |
DefaultSubgraph.PrunedSuccessorsSubgraphFactory
Factory for
PrunedSuccessorsSubgraph. |
static class |
DefaultSubgraph.TriangleSubgraphFactory |
| Modifier and Type | Field and Description |
|---|---|
protected org.eclipse.gef4.zest.core.widgets.InternalLayoutContext |
context |
protected boolean |
disposed |
protected java.util.Set<org.eclipse.gef4.layout.interfaces.NodeLayout> |
nodes |
| Modifier | Constructor and Description |
|---|---|
protected |
DefaultSubgraph(org.eclipse.gef4.layout.interfaces.LayoutContext context2) |
| Modifier and Type | Method and Description |
|---|---|
void |
addNodes(org.eclipse.gef4.layout.interfaces.NodeLayout[] nodes) |
protected void |
applyLayoutChanges() |
int |
countNodes() |
protected void |
dispose() |
java.lang.Object[] |
getItems() |
org.eclipse.gef4.geometry.planar.Point |
getLocation() |
org.eclipse.gef4.layout.interfaces.NodeLayout[] |
getNodes() |
org.eclipse.gef4.layout.interfaces.EntityLayout[] |
getPredecessingEntities() |
double |
getPreferredAspectRatio() |
java.lang.Object |
getProperty(java.lang.String name) |
org.eclipse.gef4.geometry.planar.Dimension |
getSize() |
org.eclipse.gef4.layout.interfaces.EntityLayout[] |
getSuccessingEntities() |
boolean |
isDirectionDependant() |
boolean |
isGraphEntity() |
boolean |
isMovable() |
boolean |
isResizable() |
protected void |
refreshConnectionsVisibility(org.eclipse.gef4.layout.interfaces.ConnectionLayout[] connections) |
protected void |
refreshLocation()
Makes sure that value returned by
getLocation() will be equal to
current location of this subgraph. |
protected void |
refreshSize()
Makes sure that value returned by
getSize() will be equal to
current size of this subgraph. |
void |
removeNodes(org.eclipse.gef4.layout.interfaces.NodeLayout[] nodes) |
void |
setDirection(int direction) |
void |
setLocation(double x,
double y) |
void |
setProperty(java.lang.String name,
java.lang.Object value) |
void |
setSize(double width,
double height) |
protected final org.eclipse.gef4.zest.core.widgets.InternalLayoutContext context
protected final java.util.Set<org.eclipse.gef4.layout.interfaces.NodeLayout> nodes
protected boolean disposed
protected DefaultSubgraph(org.eclipse.gef4.layout.interfaces.LayoutContext context2)
public boolean isGraphEntity()
isGraphEntity in interface org.eclipse.gef4.layout.interfaces.SubgraphLayoutpublic void setSize(double width,
double height)
setSize in interface org.eclipse.gef4.layout.interfaces.EntityLayoutpublic void setLocation(double x,
double y)
setLocation in interface org.eclipse.gef4.layout.interfaces.EntityLayoutpublic boolean isResizable()
isResizable in interface org.eclipse.gef4.layout.interfaces.EntityLayoutpublic boolean isMovable()
isMovable in interface org.eclipse.gef4.layout.interfaces.EntityLayoutpublic org.eclipse.gef4.layout.interfaces.EntityLayout[] getSuccessingEntities()
getSuccessingEntities in interface org.eclipse.gef4.layout.interfaces.EntityLayoutpublic org.eclipse.gef4.geometry.planar.Dimension getSize()
getSize in interface org.eclipse.gef4.layout.interfaces.EntityLayoutpublic double getPreferredAspectRatio()
getPreferredAspectRatio in interface org.eclipse.gef4.layout.interfaces.EntityLayoutpublic org.eclipse.gef4.layout.interfaces.EntityLayout[] getPredecessingEntities()
getPredecessingEntities in interface org.eclipse.gef4.layout.interfaces.EntityLayoutpublic org.eclipse.gef4.geometry.planar.Point getLocation()
getLocation in interface org.eclipse.gef4.layout.interfaces.EntityLayoutpublic boolean isDirectionDependant()
isDirectionDependant in interface org.eclipse.gef4.layout.interfaces.SubgraphLayoutpublic void setDirection(int direction)
setDirection in interface org.eclipse.gef4.layout.interfaces.SubgraphLayoutpublic void removeNodes(org.eclipse.gef4.layout.interfaces.NodeLayout[] nodes)
removeNodes in interface org.eclipse.gef4.layout.interfaces.SubgraphLayoutpublic org.eclipse.gef4.layout.interfaces.NodeLayout[] getNodes()
getNodes in interface org.eclipse.gef4.layout.interfaces.SubgraphLayoutpublic java.lang.Object[] getItems()
getItems in interface org.eclipse.gef4.layout.interfaces.EntityLayoutpublic int countNodes()
countNodes in interface org.eclipse.gef4.layout.interfaces.SubgraphLayoutpublic void addNodes(org.eclipse.gef4.layout.interfaces.NodeLayout[] nodes)
addNodes in interface org.eclipse.gef4.layout.interfaces.SubgraphLayoutprotected void refreshConnectionsVisibility(org.eclipse.gef4.layout.interfaces.ConnectionLayout[] connections)
protected void refreshLocation()
getLocation() will be equal to
current location of this subgraph.protected void refreshSize()
getSize() will be equal to
current size of this subgraph.protected void applyLayoutChanges()
protected void dispose()
public java.lang.Object getProperty(java.lang.String name)
getProperty in interface org.eclipse.gef4.layout.IPropertyStorepublic void setProperty(java.lang.String name,
java.lang.Object value)
setProperty in interface org.eclipse.gef4.layout.IPropertyStoreCopyright (c) 2014 itemis AG and others. All rights reserved.