|
|||||||||
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.PipePort<T>
public abstract class PipePort<T>
The Class PipePort.
Nested Class Summary | |
---|---|
static interface |
PipePort.PortListener
Listener class to monitor for changes to a port. |
static class |
PipePort.type
Differentiate between input and output ports. |
Field Summary | |
---|---|
protected boolean |
connectible
Indicates if this port can be connected to. |
protected PipeModulePort |
gport
Rendering port component. |
protected java.util.Vector<PipeConnector> |
incomingConnectors
incoming connectors attached to this port. |
protected java.util.Vector<PipePort.PortListener> |
listeners
Listeners that are called when port is connected or disconnected. |
protected int |
maxIncoming
Maximum number of incoming ports. |
protected int |
maxOutgoing
Maximum number of outgoing ports. |
protected java.util.Vector<PipeConnector> |
outgoingConnectors
outgoing connectors attached to this port. |
protected PipeModule |
owner
Module that this port is attached to. |
protected PipePort.type |
portType
indicates whether this is an input or output port. |
protected boolean |
useWire
Flag indicating whether the user prefers to use a connector or not for this port. |
Constructor Summary | |
---|---|
PipePort()
Default constructor. |
|
PipePort(PipeModule owner,
PipePort.type type)
Default constructor. |
Method Summary | |
---|---|
void |
addListener(PipePort.PortListener listener)
Add listener. |
abstract PipePort |
clone()
Clone parameter. |
void |
disconnect()
Disconnect all incoming and outgoing connectors. |
void |
disconnect(int index)
Disconnect a specific connector. |
void |
disconnect(PipeConnector wire)
Remove connector from this port. |
void |
disconnect(PipePort port)
Remove all connections between this port and the specified port. |
java.lang.String |
getDescription()
Get port description. |
Port |
getGraphPort()
Get port to display on graph. |
PipeConnector |
getIncomingConnector(PipePort src)
Get incoming connector for specified source. |
java.util.Vector<PipeConnector> |
getIncomingConnectors()
Get input connections. |
java.util.Vector<PipePort> |
getIncomingPorts()
Get all ports that are connected to this port. |
abstract java.lang.String |
getLabel()
Get displayed label. |
java.util.Vector<PipePort.PortListener> |
getListeners()
Get all listeners. |
int |
getMaxIncoming()
Maximum number of input ports. |
int |
getMaxOutgoing()
Get maximum number of outgoing ports. |
abstract java.lang.String |
getName()
Get identifying name. |
PipeConnector |
getOutgoingConnector(PipePort dest)
Get outgoing connector for specified destination. |
java.util.Vector<PipeConnector> |
getOutgoingConnectors()
Get output connections. |
java.util.Vector<PipePort> |
getOutgoingPorts()
Get all ports that are connected to this port. |
PipeModule |
getOwner()
Module that owns this port. |
PipePort.type |
getPortType()
Get port type. |
abstract T |
getValue()
Value associated with this port. |
abstract javax.swing.JPanel |
getView()
Get panel to render user input to this port. |
abstract void |
init()
Initialized data that could not be deserialized. |
abstract boolean |
isCompatible(PipePort p)
Check if port is compatible with other port. |
boolean |
isConnected()
Returns true if this port is connected to another port. |
boolean |
isConnectedTo(PipePort p)
Returns true if this port is connected to the specified port. |
boolean |
isConnectible()
Returns true if this port is connectible. |
boolean |
isInputPort()
Returns true if this is an input port. |
boolean |
isOutputPort()
Returns true if this is an output port. |
void |
notifyListenersOfConnection()
Notify port listeners of connections. |
void |
notifyListenersOfDisconnection(PipePort child,
PipeConnector wire)
Notify port listeners of disconnections. |
void |
removeAllListeners()
Remove all listeners. |
void |
removeListener(PipePort.PortListener listener)
Remove listener. |
void |
setConnectable(boolean connectable)
Set whether this port is connectible. |
void |
setGraphPort(PipeModulePort p)
Set port to display on graph. |
abstract void |
setLabel(java.lang.String label)
Set label to display next to port. |
void |
setMaxIncoming(int maxIncoming)
Set maximum number of input ports. |
void |
setMaxOutgoing(int maxOutgoing)
Set maximum number of outgoing ports. |
abstract void |
setName(java.lang.String name)
Set name to identify port. |
void |
setOwner(PipeModule owner)
Set module that owns this port. |
void |
setPortType(PipePort.type ty)
Set port type as either input or output. |
void |
setUseConnector(boolean useWire)
Indicate that this port should use a connector instead of a default value. |
abstract void |
setValue(T value)
Set value for this parameter. |
java.lang.String |
toString()
Get port description. |
boolean |
usingConnector()
Returns true if this port should use a connector instead of a default value. |
abstract void |
validate()
Validate parameter associated with this port. |
Methods inherited from class java.lang.Object |
---|
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
protected PipeModule owner
protected java.util.Vector<PipeConnector> incomingConnectors
protected java.util.Vector<PipeConnector> outgoingConnectors
protected transient PipePort.type portType
protected transient int maxIncoming
protected transient int maxOutgoing
protected transient boolean useWire
protected transient PipeModulePort gport
protected transient java.util.Vector<PipePort.PortListener> listeners
protected transient boolean connectible
Constructor Detail |
---|
public PipePort()
public PipePort(PipeModule owner, PipePort.type type)
owner
- module that owns this porttype
- port typeMethod Detail |
---|
public void addListener(PipePort.PortListener listener)
listener
- port listenerpublic abstract PipePort clone()
clone
in class java.lang.Object
public void disconnect()
public void disconnect(int index)
index
- connector indexpublic void disconnect(PipeConnector wire)
wire
- connectorpublic void disconnect(PipePort port)
port
- the portpublic java.lang.String getDescription()
public Port getGraphPort()
public PipeConnector getIncomingConnector(PipePort src)
src
- source port
public java.util.Vector<PipeConnector> getIncomingConnectors()
public java.util.Vector<PipePort> getIncomingPorts()
public abstract java.lang.String getLabel()
public java.util.Vector<PipePort.PortListener> getListeners()
public int getMaxIncoming()
public int getMaxOutgoing()
public abstract java.lang.String getName()
public PipeConnector getOutgoingConnector(PipePort dest)
dest
- destination port
public java.util.Vector<PipeConnector> getOutgoingConnectors()
public java.util.Vector<PipePort> getOutgoingPorts()
public PipeModule getOwner()
public PipePort.type getPortType()
public abstract T getValue()
public abstract javax.swing.JPanel getView()
public abstract void init()
public abstract boolean isCompatible(PipePort p)
p
- parameter to check against compatibility
public boolean isConnectible()
public boolean isConnected()
public boolean isConnectedTo(PipePort p)
p
- port
public boolean isInputPort()
public boolean isOutputPort()
public void notifyListenersOfConnection()
public void notifyListenersOfDisconnection(PipePort child, PipeConnector wire)
child
- disconnected portwire
- disconnected connectorpublic void removeAllListeners()
public void removeListener(PipePort.PortListener listener)
listener
- port listenerpublic void setConnectable(boolean connectable)
connectable
- true if connectiblepublic void setGraphPort(PipeModulePort p)
p
- the portpublic abstract void setLabel(java.lang.String label)
label
- the labelpublic void setMaxIncoming(int maxIncoming)
maxIncoming
- the max incomingpublic void setMaxOutgoing(int maxOutgoing)
maxOutgoing
- the max outgoingpublic abstract void setName(java.lang.String name)
name
- the namepublic void setOwner(PipeModule owner)
owner
- module ownerpublic void setPortType(PipePort.type ty)
ty
- port typepublic void setUseConnector(boolean useWire)
useWire
- the use wirepublic abstract void setValue(T value) throws InvalidParameterValueException
value
- parameter value
InvalidParameterValueException
- the invalid parameter value exceptionpublic java.lang.String toString()
toString
in class java.lang.Object
public boolean usingConnector()
public abstract void validate() throws InvalidParameterException
InvalidParameterException
- the invalid parameter exception
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |