Class PatternSpringembedder
java.lang.Object
org.graffiti.plugin.algorithm.ThreadSafeAlgorithm
de.ipk_gatersleben.ag_nw.graffiti.plugins.layouters.pattern_springembedder_no_cache.PatternSpringembedder
- All Implemented Interfaces:
Algorithm
public class PatternSpringembedder extends ThreadSafeAlgorithm
Spring Embedder Algorithm. Example #3.
- Author:
- Christian Klukas
-
Constructor Summary
Constructors Constructor Description PatternSpringembedder()
-
Method Summary
Modifier and Type Method Description void
attach(Graph g)
void
attach(Graph g, Selection selection)
Attaches the given graph to this algorithm.void
check()
Error Checkingvoid
execute()
Layout Algorithmvoid
executeThreadSafe(ThreadSafeOptions options)
ActionEvent
getActionEvent()
String
getCategory()
Returns the category an algorithm should assigned to.String
getDescription()
String
getMenuCategory()
Returns a path to a menu category.String
getName()
Sets Menu Command TitleParameter[]
getParameters()
DOCUMENT ME!Set<Category>
getSetCategory()
Returns a set of categories to classify this algorithm .boolean
isLayoutAlgorithm()
A LayoutAlgorithm should return true.void
readPatternConnections(ThreadSafeOptions options)
DOCUMENT ME!void
reset()
Resets the internal state of the algorithm.void
resetDataCache(ThreadSafeOptions options)
DOCUMENT ME!void
setActionEvent(ActionEvent a)
boolean
setControlInterface(ThreadSafeOptions options, JComponent jc)
DOCUMENT ME!void
setParameters(Parameter[] params)
DOCUMENT ME!String
toString()
DOCUMENT ME!Methods inherited from class org.graffiti.plugin.algorithm.ThreadSafeAlgorithm
getAcceleratorKeyStroke, mayWorkOnMultipleGraphs, showMenuIcon
-
Constructor Details
-
PatternSpringembedder
public PatternSpringembedder()
-
-
Method Details
-
getName
Sets Menu Command Title- Returns:
- Menu command title
-
getActionEvent
-
setActionEvent
-
toString
DOCUMENT ME! -
check
public void check()Error Checking- Throws:
PreconditionException
- DOCUMENT ME!
-
execute
public void execute()Layout Algorithm -
getParameters
DOCUMENT ME!- Returns:
- DOCUMENT ME!
-
readPatternConnections
DOCUMENT ME!- Parameters:
options
- DOCUMENT ME!
-
setParameters
DOCUMENT ME!- Parameters:
params
- DOCUMENT ME!
-
setControlInterface
Description copied from class:ThreadSafeAlgorithm
DOCUMENT ME!- Specified by:
setControlInterface
in classThreadSafeAlgorithm
- Returns:
- true, if an GUI was set, false if no interface is needed
-
resetDataCache
DOCUMENT ME!- Specified by:
resetDataCache
in classThreadSafeAlgorithm
- Parameters:
options
- DOCUMENT ME!
-
executeThreadSafe
- Specified by:
executeThreadSafe
in classThreadSafeAlgorithm
-
attach
-
reset
public void reset()Description copied from interface:Algorithm
Resets the internal state of the algorithm. -
attach
Description copied from interface:Algorithm
Attaches the given graph to this algorithm. A ttaches the given Selection information to the algorithm.- Parameters:
g
- the graph to attach.selection
- the selection to attach.
-
getCategory
Description copied from interface:Algorithm
Returns the category an algorithm should assigned to. Return NULL if the algorithm should be sorted directly in the plugin menu.- Returns:
- The category an algorithm should assigned to.
-
getSetCategory
Description copied from interface:Algorithm
Returns a set of categories to classify this algorithm . e.g. return new HashSet(Arrays.asList( Category.GRAPH, Category.NODE )); is an algorithm, working on graphs and more specific on nodes - Returns:
- Set of Category Enums that classify this algorithm.
-
getMenuCategory
Description copied from interface:Algorithm
Returns a path to a menu category. This is s '.' separated string which reflects the position of this Algorithm in the Menu Hierarchy e.g. "Network.Layout" would put this algorithm in the menu 'Network' and its submenu 'Layout' If this menu is not existent it will be created If this method returns 'null' the algorithm will not appear in the menu- Returns:
-
isLayoutAlgorithm
public boolean isLayoutAlgorithm()Description copied from interface:Algorithm
A LayoutAlgorithm should return true. All other types of algorithms should return false.- Returns:
-
getDescription
-