java.lang.Object
com.marginallyclever.nodegraphcore.Node
com.marginallyclever.nodegraphcore.Subgraph
- All Implemented Interfaces:
 PrintWithGraphics,SupergraphInput,SupergraphOutput
public class Subgraph extends Node implements SupergraphInput, SupergraphOutput, PrintWithGraphics
- 
Field Summary
Fields inherited from class com.marginallyclever.nodegraphcore.Node
TITLE_HEIGHT - 
Constructor Summary
 - 
Method Summary
Modifier and Type Method Description Nodecreate()Return one new instance of this type ofNode.NodeGraphgetGraph()voidprint(java.awt.Graphics g)Called when the implementing class should paint.voidsetGraph(NodeGraph graph)Stores a deep copy of the given graph and exposes theSupergraphInputs andSupergraphOutputs to the supergraph.voidupdate()Override this method to provide the custom behavior of this node.Methods inherited from class com.marginallyclever.nodegraphcore.Node
addVariable, cleanAllInputs, cleanAllOutputs, getInPosition, getLabel, getName, getNumVariables, getOutPosition, getRectangle, getUniqueID, getUniqueIDSource, getUniqueName, getVariable, getVariables, isDirty, moveRelative, removeVariable, setLabel, setPosition, setRectangle, setUniqueID, setUniqueIDSource, toString, updateBounds, updateIfNotDirtyMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait 
- 
Constructor Details
- 
Subgraph
public Subgraph()Constructor for subclasses to call. - 
Subgraph
Constructor for subclasses to call.- Parameters:
 graph- the contents of this subgraph.
 
 - 
 - 
Method Details
- 
setGraph
Stores a deep copy of the given graph and exposes theSupergraphInputs andSupergraphOutputs to the supergraph.- Parameters:
 graph- theNodeGraphto store.
 - 
getGraph
 - 
create
Description copied from class:NodeReturn one new instance of this type ofNode. Override this method in derived classes. - 
update
public void update()Description copied from class:NodeOverride this method to provide the custom behavior of this node. Runs regardless of dirty inputs or outputs. - 
print
public void print(java.awt.Graphics g)Description copied from interface:PrintWithGraphicsCalled when the implementing class should paint.- Specified by:
 printin interfacePrintWithGraphics- Parameters:
 g- theGraphicscontext.
 
 -