|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object edu.jhu.ece.iacl.jist.pipeline.PipeModule
public abstract class PipeModule
A Pipe Module is the generic class for graph objects. All modules can have input and output ports to provide connections to other modules.
Nested Class Summary | |
---|---|
static interface |
PipeModule.PipeListener
Listener class to monitor for updates to pipe modules. |
Field Summary | |
---|---|
protected java.awt.geom.Rectangle2D |
bounds
Size of module in graph. |
protected PipeModuleCell |
cell
Module cell to render on graph. |
protected ExecutionContext |
currentContext
Execution context that represents this module. |
protected java.util.Hashtable<java.lang.String,ParamModel> |
inputHash
Input hash representing map from child parameter name to parameter. |
protected ParamCollection |
inputParams
Input parameters, some of which may not be visible. |
protected java.util.Vector<PipePort> |
inputPorts
Input and output ports for module. |
protected java.lang.String |
label
Label to display for this parameter. |
protected java.util.Vector<PipeModule.PipeListener> |
listeners
Listeners that listen for changes to this module, including input/output ports. |
protected java.lang.String |
name
Unique name to identify this parameter. |
protected java.util.Hashtable<java.lang.String,ParamModel> |
outputHash
Output hash representing map from child parameter name to parameter. |
protected ParamCollection |
outputParams
Output parameters, some of which may not be visible. |
protected java.util.Vector<PipePort> |
outputPorts
Input and output ports for module. |
Constructor Summary | |
---|---|
PipeModule()
Default constructor. |
Method Summary | |
---|---|
void |
addListener(PipeModule.PipeListener listener)
Add listener for this module. |
void |
connectAction(PipePort owner)
Listen for connection event to occur on a port. |
abstract PipeModuleCell |
createModuleCell()
Create default graph cell representing this module. |
void |
disconnect()
Disconnect all incoming and outgoing ports for this module. |
void |
disconnectAction(PipePort owner,
PipePort child,
PipeConnector wire)
Listen for disconnect event to occur on a port. |
static void |
forward(PipePort src,
PipePort dest)
Forward information from the source port to destination port. |
java.util.Vector<PipeModule> |
getAncestors()
Get all modules that may effect the input parameters to this module. |
protected void |
getAncestors(java.util.Vector<PipeModule> list)
Get all ancestor modules and append them to the list. |
java.awt.geom.Rectangle2D |
getBounds()
Rectangular bounds for graphical representation. |
java.util.Vector<PipeModule> |
getChildren()
Get Pipe Modules that receive data from this module. |
ExecutionContext |
getCurrentContext()
Get current context used to execute this module. |
java.util.Vector<PipeModule> |
getDescendants()
Get all modules that are effected by information outputted by this module. |
protected void |
getDescendants(java.util.Vector<PipeModule> list)
Get all descendant modules and append them to the list. |
java.util.Hashtable<java.lang.String,ParamModel> |
getInputHash()
Get input hash representing map from child parameter name to parameter. |
ParamCollection |
getInputParams()
Get input parameters for this module. |
java.util.Vector<PipePort> |
getInputPorts()
Get output parameters for this module. |
java.lang.String |
getLabel()
Get display label for this module. |
java.util.Vector<PipeModule.PipeListener> |
getListeners()
Get all listeners for this module. |
PipeModuleCell |
getModuleCell()
Get graph cell representing this module. |
java.lang.String |
getName()
Get unique name that identifies this parameter. |
java.util.Hashtable<java.lang.String,ParamModel> |
getOutputHash()
Get output hash representing map from child parameter name to parameter. |
ParamCollection |
getOutputParams()
Get input ports. |
java.util.Vector<PipePort> |
getOutputPorts()
Get output ports. |
java.util.Vector<PipeModule> |
getParents()
Get modules that provide information to this module. |
abstract PipeModuleCell |
init(PipeJGraph graph)
Initialize all transient data that could not be deserialized. |
boolean |
isAncestorOf(PipeModule child)
Returns true if this is an ancestor of the specified module. |
boolean |
isDescendantOf(PipeModule parent)
Returns true if this is a descendant of the specified module. |
boolean |
isRoot()
Returns true if this module has no incoming connections. |
boolean |
push()
Forward information from output ports to all child input ports. |
void |
removeAllListeners()
Remove all listeners for this module. |
void |
removeListener(PipeModule.PipeListener listener)
Remove listener for this module. |
void |
setBounds(java.awt.geom.Rectangle2D bounds)
Set dimensions for graph cell. |
void |
setCurrentContext(ExecutionContext context)
Set current context used to execute this module. |
void |
setLabel(java.lang.String label)
Set display label for this module. |
void |
setModuleCell(PipeModuleCell cell)
Set graph cell representing this module. |
void |
setName(java.lang.String name)
Set unique name that identifies this parameter. |
void |
update(ParamModel model,
ParamInputView view)
Refresh the graph frame and indicate that the layout has changed. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected java.lang.String label
protected java.lang.String name
protected java.awt.geom.Rectangle2D bounds
protected java.util.Vector<PipePort> inputPorts
protected java.util.Vector<PipePort> outputPorts
protected ParamCollection inputParams
protected ParamCollection outputParams
protected transient PipeModuleCell cell
protected transient java.util.Vector<PipeModule.PipeListener> listeners
protected transient ExecutionContext currentContext
protected transient java.util.Hashtable<java.lang.String,ParamModel> inputHash
protected transient java.util.Hashtable<java.lang.String,ParamModel> outputHash
Constructor Detail |
---|
public PipeModule()
Method Detail |
---|
public static void forward(PipePort src, PipePort dest)
src
- source portdest
- destination portpublic void addListener(PipeModule.PipeListener listener)
listener
- module listenerpublic void connectAction(PipePort owner)
connectAction
in interface PipePort.PortListener
owner
- the ownerpublic abstract PipeModuleCell createModuleCell()
public void disconnect()
public void disconnectAction(PipePort owner, PipePort child, PipeConnector wire)
disconnectAction
in interface PipePort.PortListener
owner
- the ownerchild
- the childwire
- the wirepublic java.util.Vector<PipeModule> getAncestors()
protected void getAncestors(java.util.Vector<PipeModule> list)
list
- list to append ancestorspublic java.awt.geom.Rectangle2D getBounds()
public java.util.Vector<PipeModule> getChildren()
public ExecutionContext getCurrentContext()
public java.util.Vector<PipeModule> getDescendants()
protected void getDescendants(java.util.Vector<PipeModule> list)
list
- list to append parameterspublic java.util.Hashtable<java.lang.String,ParamModel> getInputHash()
public ParamCollection getInputParams()
public java.util.Vector<PipePort> getInputPorts()
public java.lang.String getLabel()
public java.util.Vector<PipeModule.PipeListener> getListeners()
public PipeModuleCell getModuleCell()
public java.lang.String getName()
public java.util.Hashtable<java.lang.String,ParamModel> getOutputHash()
public ParamCollection getOutputParams()
public java.util.Vector<PipePort> getOutputPorts()
public java.util.Vector<PipeModule> getParents()
public abstract PipeModuleCell init(PipeJGraph graph)
graph
- the graph
public boolean isAncestorOf(PipeModule child)
child
- the child
public boolean isDescendantOf(PipeModule parent)
parent
- module
public boolean isRoot()
public boolean push()
public void removeAllListeners()
public void removeListener(PipeModule.PipeListener listener)
listener
- module listenerpublic void setBounds(java.awt.geom.Rectangle2D bounds)
bounds
- cell dimensionspublic void setCurrentContext(ExecutionContext context)
context
- the contextpublic void setLabel(java.lang.String label)
label
- namepublic void setModuleCell(PipeModuleCell cell)
cell
- graph cellpublic void setName(java.lang.String name)
name
- unique namepublic void update(ParamModel model, ParamInputView view)
update
in interface ParamViewObserver
model
- the modelview
- the view
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |