Class PrintAlgorithm
java.lang.Object
org.graffiti.plugin.algorithm.AbstractAlgorithm
de.ipk_gatersleben.ag_nw.graffiti.plugins.misc.print.printer.PrintAlgorithm
- All Implemented Interfaces:
UndoableEdit,Algorithm
public class PrintAlgorithm extends AbstractAlgorithm
The print algorithm.
- Version:
- $Revision$
- Author:
- Burkhard Sell
-
Constructor Summary
Constructors Constructor Description PrintAlgorithm() -
Method Summary
Modifier and Type Method Description voidattach(Graph g, Selection s)Unused for this plugin.voidcheck()Checks whether all preconditions of the current graph are satisfied.voidexecute()This method is invoked by the plugin environment to start the action this plugin is for.KeyStrokegetAcceleratorKeyStroke()Default: no accelerator for the menu item, created for this algorithm.StringgetCategory()Returns the category an algorithm should assigned to.StringgetName()Returns the name (ID) of the algorithm.Set<Category>getSetCategory()Returns a set of categories to classify this algorithm .booleanisLayoutAlgorithm()A LayoutAlgorithm should return true.voidreset()Resets the algorithm state.voidsetActiveSession(Session session)Sets the active session.Methods inherited from class org.graffiti.plugin.algorithm.AbstractAlgorithm
addEdit, canRedo, canUndo, die, doesUndo, getActionEvent, getDescription, getMenuCategory, getParameters, getPresentationName, getRedoPresentationName, getUndoPresentationName, isAlwaysExecutable, isSignificant, markExecutionDone, markRedoDone, markUndoDone, mayWorkOnMultipleGraphs, redo, replaceEdit, setActionEvent, setParameters, showMenuIcon, undo
-
Constructor Details
-
PrintAlgorithm
public PrintAlgorithm()
-
-
Method Details
-
getCategory
Description copied from interface:AlgorithmReturns the category an algorithm should assigned to. Return NULL if the algorithm should be sorted directly in the plugin menu.- Specified by:
getCategoryin interfaceAlgorithm- Overrides:
getCategoryin classAbstractAlgorithm- Returns:
- The category an algorithm should assigned to.
-
getName
Description copied from interface:AlgorithmReturns the name (ID) of the algorithm.- Returns:
- DOCUMENT ME!
-
getSetCategory
Description copied from interface:AlgorithmReturns 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 - Specified by:
getSetCategoryin interfaceAlgorithm- Overrides:
getSetCategoryin classAbstractAlgorithm- Returns:
- Set of Category Enums that classify this algorithm.
-
attach
Unused for this plugin.- Specified by:
attachin interfaceAlgorithm- Overrides:
attachin classAbstractAlgorithm- Parameters:
g- the graph to attach.s- the selection to attach.- See Also:
org.graffiti.plugin.algorithm.Algorithm#attach(org.graffiti.graph.Graph)
-
check
Description copied from interface:AlgorithmChecks whether all preconditions of the current graph are satisfied.- Specified by:
checkin interfaceAlgorithm- Overrides:
checkin classAbstractAlgorithm- Throws:
PreconditionException- if the preconditions of the current graph are not satisfied.
-
getAcceleratorKeyStroke
Description copied from class:AbstractAlgorithmDefault: no accelerator for the menu item, created for this algorithm.- Specified by:
getAcceleratorKeyStrokein interfaceAlgorithm- Overrides:
getAcceleratorKeyStrokein classAbstractAlgorithm- Returns:
- NULL (default) if no accelerator should be assigned for this algorithm.
-
execute
public void execute()This method is invoked by the plugin environment to start the action this plugin is for.This method starts the printprocess
*This method needs the activeSession set by the
setActiveSession(Session)Method. Make shure, thatsetActiveSession(Session)is called BEFOREexecute()method!!!- Throws:
IllegalStateException- if activeSession is null- See Also:
Algorithm.execute(),setActiveSession(Session)
-
reset
public void reset()Resets the algorithm state.Active session will be invalidated.
ATTENTION: After calling this method
setActiveSession(Session)have to be called again BEFORE callingexecute()- Specified by:
resetin interfaceAlgorithm- Overrides:
resetin classAbstractAlgorithm- See Also:
Algorithm.reset(),setActiveSession(Session)
-
setActiveSession
Sets the active session.This session is uses by
execute()Method. Make shure, that this method is called BEFOREexecute()!!!- See Also:
org.graffiti.plugin.algorithm.Algorithm#setActiveSession(org.graffiti.session.Session),execute()
-
isLayoutAlgorithm
public boolean isLayoutAlgorithm()Description copied from interface:AlgorithmA LayoutAlgorithm should return true. All other types of algorithms should return false.- Specified by:
isLayoutAlgorithmin interfaceAlgorithm- Overrides:
isLayoutAlgorithmin classAbstractAlgorithm- Returns:
-