kcl.waterloo.graphics
Interface GJLayerInterface<T>
-
- Type Parameters:
T-
- All Known Subinterfaces:
- GJGraphInterface
- All Known Implementing Classes:
- GJAbstractGraph, GJAbstractGraph0, GJAbstractGraph1, GJGraph
public interface GJLayerInterface<T>Provides an interface to support multi-layered graphs
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method and Description Tadd(T graph)Adds a graph as a child of this graph.TgetAncestorGraph()Returns the graph that forms the view in this graph's ancestry.TgetCurrentLayer()Returns the currently selected layerintgetCurrentLayerIndex()Returns the index of the current layer.TgetLayer(int n)Returns the layer at the specified indexjava.util.ArrayList<T>getLayers()Returns a list of the layers for this graph.intindexOf()Returns the index of this graph as a layer in the view.voidsetCurrentLayer(T layer)Sets the current layer for this graph.voidsetCurrentLayerIndex(int n)Sets the current layer by index.
-
-
-
Method Detail
-
getAncestorGraph
T getAncestorGraph()
Returns the graph that forms the view in this graph's ancestry.- Returns:
- the graph
-
getLayers
java.util.ArrayList<T> getLayers()
Returns a list of the layers for this graph. The list includes this graph at element 0.- Returns:
- an ArrayList
-
add
T add(T graph)
Adds a graph as a child of this graph. Provides support for nested graphs.- Parameters:
graph-- Returns:
- the added graph
-
getLayer
T getLayer(int n)
Returns the layer at the specified index- Parameters:
n- the layer number - zero is this layer- Returns:
- the layer
-
getCurrentLayer
T getCurrentLayer()
Returns the currently selected layer- Returns:
- a GJGraphInterface instance
-
setCurrentLayer
void setCurrentLayer(T layer)
Sets the current layer for this graph.- Parameters:
layer-
-
getCurrentLayerIndex
int getCurrentLayerIndex()
Returns the index of the current layer.- Returns:
- the index
-
setCurrentLayerIndex
void setCurrentLayerIndex(int n)
Sets the current layer by index.- Parameters:
n-
-
indexOf
int indexOf()
Returns the index of this graph as a layer in the view.- Returns:
- the index
-
-
DMelt 3.0 © DataMelt by jWork.ORG