Class PatchLine

java.lang.Object
  |
  +--ViewObject
        |
        +--PatchLine

public class PatchLine
extends ViewObject

PatchLine, a ViewObject, a line between ConnectionBoxes represents a patch.


Field Summary
protected  java.beans.PropertyChangeSupport pcs
           
 
Constructor Summary
PatchLine()
          Default Constructor
PatchLine(ConnectionBox inputBox, ConnectionBox outputBox)
          Default Constructor, sets the ConnectionBoxes for the relationship.
 
Method Summary
 void addPropertyChangeListener(java.beans.PropertyChangeListener pcl)
          Adds a propertyChangeListener which will listen for various events on the object specifically when object state has changed.
 void addPropertyChangeListener(java.lang.String propertyName, java.beans.PropertyChangeListener pcl)
          Adds a propertyChangeListener which will listen for various events on the object specifically when object state has changed.
 boolean draggable()
          Is this object draggable.
 void dragTo(int x, int y)
          Drag the object to x and y
 ConnectionBox getInput()
          gets the input ConnectionBox.
 ConnectionBox getOutput()
          gets the output ConnectionBox.
 int hashCode()
          Hashcode based on the input and output ids
 void paintOn(java.awt.Graphics g)
          PaintOn the graphics g
 void setInput(ConnectionBox i)
          sets the input ConnectionBox.
 void setOutput(ConnectionBox o)
          sets the output ConnectionBox.
 boolean wasClicked(int x, int y)
          Was this line clicked on? has a small margin of error
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

pcs

protected final java.beans.PropertyChangeSupport pcs
Constructor Detail

PatchLine

public PatchLine()
Default Constructor


PatchLine

public PatchLine(ConnectionBox inputBox,
                 ConnectionBox outputBox)
Default Constructor, sets the ConnectionBoxes for the relationship.

Parameters:
inputBox - the input ConnectionBox
outputBox - the output ConnectionBox
Method Detail

paintOn

public void paintOn(java.awt.Graphics g)
PaintOn the graphics g

Overrides:
paintOn in class ViewObject

draggable

public boolean draggable()
Is this object draggable.

Overrides:
draggable in class ViewObject

getInput

public ConnectionBox getInput()
gets the input ConnectionBox.


getOutput

public ConnectionBox getOutput()
gets the output ConnectionBox.


setInput

public void setInput(ConnectionBox i)
sets the input ConnectionBox.

Parameters:
i - the inputBox

setOutput

public void setOutput(ConnectionBox o)
sets the output ConnectionBox.


wasClicked

public boolean wasClicked(int x,
                          int y)
Was this line clicked on? has a small margin of error

Overrides:
wasClicked in class ViewObject

hashCode

public int hashCode()
Hashcode based on the input and output ids

Overrides:
hashCode in class java.lang.Object

addPropertyChangeListener

public void addPropertyChangeListener(java.beans.PropertyChangeListener pcl)
Adds a propertyChangeListener which will listen for various events on the object specifically when object state has changed.


addPropertyChangeListener

public void addPropertyChangeListener(java.lang.String propertyName,
                                      java.beans.PropertyChangeListener pcl)
Adds a propertyChangeListener which will listen for various events on the object specifically when object state has changed.


dragTo

public void dragTo(int x,
                   int y)
Drag the object to x and y

Parameters:
x - the xcoord to drag to
y - the ycoord to drag to