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>connectedNodesContains the connected nodes (NodeCacheEntrys)intlastTouchUsed for storing the information about the last run-number of the last movement.NodenodeReference to the node in the graph.intnodeIndexSaves the index of the node in the graph-array.intpatternIndex1..x Number of pattern.NodepatternNodeReference to a node in the pattern graph.ArrayList<NodeCacheEntry>patternNodesVector withpatterNodesObjects, which store the information about all connected patterns.StringpatternTypeName of pattern, "" if no pattern assignedbooleanpatternTypeEmptyVector2dpositionCache for Node PositionsbooleanselectedThis field should be set to true, if the user has selected this node in the GUI.Vector2dsizeVector contains the size of the node (width, height)intsubgraphIndex -
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 withpatterNodesObjects, 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()
-