Class NodeCacheEntry
java.lang.Object
de.ipk_gatersleben.ag_nw.graffiti.plugins.layouters.pattern_springembedder.NodeCacheEntry
public class NodeCacheEntry extends Object
Saves the information about pattern type and number for all nodes of a graph
- Author:
- klukas
-
Field Summary
Fields Modifier and Type Field Description ArrayList<NodeCacheEntry>
connectedNodes
Contains the connected nodes (NodeCacheEntrys)int
lastTouch
Used for storing the information about the last run-number of the last movement.Node
node
Reference to the node in the graph.int
nodeIndex
Saves the index of the node in the graph-array.int
patternIndex
1..x Number of pattern.Node
patternNode
Reference to a node in the pattern graph.ArrayList<NodeCacheEntry>
patternNodes
Vector withpatterNodes
Objects, which store the information about all connected patterns.String
patternType
Name of pattern, "" if no pattern assignedboolean
patternTypeEmpty
Vector2d
position
Cache for Node Positionsboolean
selected
This field should be set to true, if the user has selected this node in the GUI.Vector2d
size
Vector contains the size of the node (width, height)int
subgraphIndex
-
Constructor Summary
Constructors Constructor Description NodeCacheEntry()
-
Method Summary
-
Field Details
-
position
Cache for Node Positions -
lastTouch
public int lastTouchUsed for storing the information about the last run-number of the last movement. The springembedder algorithm runs a number of times, each time a counter is increased by 1. As soon as a node has been updated, it lastTouch value is set to the current counter number. Patterns are calculated as one group. Because of the lastTouch value it can be checked, if a node has been already moved in the current springembedder run. This way the patterns are threated more equalily to the normal nodes, as they are not updated more frequently. This number has to be initialized to -1. -
size
Vector contains the size of the node (width, height) -
patternType
Name of pattern, "" if no pattern assigned -
patternTypeEmpty
public boolean patternTypeEmpty -
patternNodes
Vector withpatterNodes
Objects, which store the information about all connected patterns. -
connectedNodes
Contains the connected nodes (NodeCacheEntrys) -
patternIndex
public int patternIndex1..x Number of pattern. Similar patterns in the graph are numbered. One node might have the patternType 1 and patternIndex 1, the next node, that is not connected to this pattern might have the number patternType 1 and patternIndex 2. patternIndex == -1 if no pattern is assigned -
subgraphIndex
public int subgraphIndex -
nodeIndex
public int nodeIndexSaves the index of the node in the graph-array. -
patternNode
Reference to a node in the pattern graph. -
node
Reference to the node in the graph. -
selected
public boolean selectedThis field should be set to true, if the user has selected this node in the GUI.
-
-
Constructor Details
-
NodeCacheEntry
public NodeCacheEntry()
-