edu.jhu.ece.iacl.jist.pipeline.src
Class PipeSelectionSource

java.lang.Object
  extended by edu.jhu.ece.iacl.jist.pipeline.PipeModule
      extended by edu.jhu.ece.iacl.jist.pipeline.PipeSource
          extended by edu.jhu.ece.iacl.jist.pipeline.src.PipeSelectionSource
All Implemented Interfaces:
PipePort.PortListener, ParamViewObserver

public class PipeSelectionSource
extends PipeSource

Source to select multiple options.

Author:
Blake Lucas

Nested Class Summary
 
Nested classes/interfaces inherited from class edu.jhu.ece.iacl.jist.pipeline.PipeModule
PipeModule.PipeListener
 
Field Summary
protected  int index
          The index.
protected  ParamMultiOption multiOption
          The multi option.
protected  ParamOption option
          The option.
protected  java.util.List<java.lang.String> selection
          The selection.
 
Fields inherited from class edu.jhu.ece.iacl.jist.pipeline.PipeSource
childPort, isReset, parentPort
 
Fields inherited from class edu.jhu.ece.iacl.jist.pipeline.PipeModule
bounds, cell, currentContext, inputHash, inputParams, inputPorts, label, listeners, name, outputHash, outputParams, outputPorts
 
Constructor Summary
PipeSelectionSource()
          Instantiates a new pipe selection source.
 
Method Summary
 void connectAction(PipePort port)
          Update selection options when a new connector is added.
 ParamCollection createInputParams()
          Create input parameters.
 ParamCollection createOutputParams()
          Create output parameters.
 void disconnectAction(PipePort owner, PipePort child, PipeConnector wire)
          Update selection options if connector is removed.
 ParamOption getOutputParam()
          Get output parameter.
 boolean hasNext()
          Returns true if iterator has more elements.
 boolean iterate()
          Iterate.
 void reset()
          Reset iterator.
 
Methods inherited from class edu.jhu.ece.iacl.jist.pipeline.PipeSource
createModuleCell, disconnect, getChildPort, getParentPort, getRoot, init, isRoot
 
Methods inherited from class edu.jhu.ece.iacl.jist.pipeline.PipeModule
addListener, forward, getAncestors, getAncestors, getBounds, getChildren, getCurrentContext, getDescendants, getDescendants, getInputHash, getInputParams, getInputPorts, getLabel, getListeners, getModuleCell, getName, getOutputHash, getOutputParams, getOutputPorts, getParents, isAncestorOf, isDescendantOf, push, removeAllListeners, removeListener, setBounds, setCurrentContext, setLabel, setModuleCell, setName, update
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

multiOption

protected ParamMultiOption multiOption
The multi option.


option

protected ParamOption option
The option.


selection

protected transient java.util.List<java.lang.String> selection
The selection.


index

protected transient int index
The index.

Constructor Detail

PipeSelectionSource

public PipeSelectionSource()
Instantiates a new pipe selection source.

Method Detail

connectAction

public void connectAction(PipePort port)
Update selection options when a new connector is added.

Specified by:
connectAction in interface PipePort.PortListener
Overrides:
connectAction in class PipeModule
Parameters:
port - the port

createInputParams

public ParamCollection createInputParams()
Create input parameters.

Specified by:
createInputParams in class PipeSource
Returns:
the param collection

createOutputParams

public ParamCollection createOutputParams()
Create output parameters.

Specified by:
createOutputParams in class PipeSource
Returns:
the param collection

disconnectAction

public void disconnectAction(PipePort owner,
                             PipePort child,
                             PipeConnector wire)
Update selection options if connector is removed.

Specified by:
disconnectAction in interface PipePort.PortListener
Overrides:
disconnectAction in class PipeModule
Parameters:
owner - the owner
child - the child
wire - the wire

getOutputParam

public ParamOption getOutputParam()
Get output parameter.

Specified by:
getOutputParam in class PipeSource
Returns:
the output param

hasNext

public boolean hasNext()
Returns true if iterator has more elements.

Overrides:
hasNext in class PipeSource
Returns:
true, if checks for next

iterate

public boolean iterate()
Iterate.

Overrides:
iterate in class PipeSource
Returns:
true, if iterate

reset

public void reset()
Reset iterator.

Overrides:
reset in class PipeSource