com.cosylab.vdct.graphics.objects
Class Connector

java.lang.Object
  extended by com.cosylab.vdct.graphics.objects.VisibleObject
      extended by com.cosylab.vdct.graphics.objects.Connector
All Implemented Interfaces:
Descriptable, InLink, Linkable, Movable, OutLink, Selectable, Visitable, Popupable

public class Connector
extends VisibleObject
implements Descriptable, InLink, Movable, OutLink, Popupable, Selectable

Insert the type's description here. Creation date: (29.1.2001 20:05:51)

Author:
Matej Sekoranja

Field Summary
protected  boolean disconnected
           
protected  java.lang.String ID
           
protected  InLink inlink
           
protected  int mode
           
protected  OutLink outlink
           
 
Fields inherited from class com.cosylab.vdct.graphics.objects.VisibleObject
x, y, zoomImage
 
Fields inherited from interface com.cosylab.vdct.graphics.objects.InLink
INPUT_MACRO_MODE, OUTPUT_MACRO_MODE
 
Fields inherited from interface com.cosylab.vdct.graphics.objects.OutLink
CONSTANT_PORT_MODE, EXTERNAL_INPUT_MODE, EXTERNAL_OUTPUT_MODE, INPUT_PORT_MODE, INVISIBLE_MODE, NORMAL_MODE, OUTPUT_PORT_MODE
 
Constructor Summary
Connector(java.lang.String id, LinkManagerObject parent, OutLink outlink, InLink inlink)
          Insert the method's description here.
 
Method Summary
 void accept(Visitor visitor)
          Insert the method's description here.
 Connector addConnector()
          Insert the method's description here.
 void bypass()
          Insert the method's description here.
 boolean checkMove(int dx, int dy)
          Insert the method's description here.
 void destroy()
          Insert the method's description here.
 void disconnect(Linkable disconnector)
          This method destroys connector (connector should not be used afer this method was called) Creation date: (29.1.2001 20:05:51)
protected  void draw(java.awt.Graphics g, boolean hilited)
          Insert the method's description here.
 java.lang.String getDescription()
          Insert the method's description here.
 java.lang.String getHashID()
          Insert the method's description here.
 java.lang.String getID()
          Insert the method's description here.
 InLink getInput()
          Insert the method's description here.
 int getInX()
          Insert the method's description here.
 int getInY()
          Insert the method's description here.
 java.util.Vector getItems()
          Insert the method's description here.
 java.lang.String getLayerID()
          Insert the method's description here.
 int getLeftX()
           
 int getMode()
          Insert the method's description here.
 OutLink getOutput()
          Insert the method's description here.
 int getOutX()
          Insert the method's description here.
 int getOutY()
          Insert the method's description here.
 int getQueueCount()
          Insert the method's description here.
 int getRightX()
           
 VisibleObject intersects(int px, int py)
          Default impmlementation for square (must be rescaled) Creation date: (19.12.2000 20:20:20)
 VisibleObject intersects(int p1x, int p1y, int p2x, int p2y)
          Default impmlementation for square (must be rescaled) p1 is upper-left point Creation date: (19.12.2000 20:20:20)
 boolean isConnectable()
          Insert the method's description here.
 boolean isDisconnected()
          Insert the method's description here.
 boolean isRight()
           
 boolean move(int dx, int dy)
          Insert the method's description here.
 void revalidatePosition()
          Insert the method's description here.
 void setDescription(java.lang.String description)
          Insert the method's description here.
 void setID(java.lang.String newID)
          Insert the method's description here.
 void setInput(InLink input)
          Insert the method's description here.
 void setLayerID(java.lang.String id)
          Insert the method's description here.
 void setMode(int mode)
          Sets the mode.
 void setOutput(OutLink output, OutLink prevOutput)
          Insert the method's description here.
protected  void validate()
          Insert the method's description here.
 void validateLink()
           
 
Methods inherited from class com.cosylab.vdct.graphics.objects.VisibleObject
forceValidation, getColor, getDsId, getFont, getHeight, getLabel, getLeftOffset, getMarkedX, getMarkedY, getMoveInsideView, getParent, getRheight, getRightOffset, getRlabelX, getRlabelY, getRootContainer, getRscale, getRwidth, getRx, getRy, getScale, getTopOffset, getVisibleColor, getWidth, getX, getY, isDestroyed, isVisible, isZoomRepaint, markPosition, paint, postDraw, postPaint, setColor, setDestroyed, setFont, setHeight, setLabel, setParent, setRheight, setRlabelX, setRlabelY, setRwidth, setRx, setRy, setScale, setWidth, setX, setY, setZoomRepaint, snapToGrid, unconditionalValidation
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface com.cosylab.vdct.graphics.popup.Popupable
getLabel
 

Field Detail

inlink

protected InLink inlink

outlink

protected OutLink outlink

ID

protected java.lang.String ID

disconnected

protected boolean disconnected

mode

protected int mode
Constructor Detail

Connector

public Connector(java.lang.String id,
                 LinkManagerObject parent,
                 OutLink outlink,
                 InLink inlink)
Insert the method's description here. Creation date: (1.2.2001 17:22:29)

Parameters:
parent - com.cosylab.vdct.graphics.objects.Record
outlink - com.cosylab.vdct.graphics.objects.OutLink
inlink - com.cosylab.vdct.graphics.objects.InLink
Method Detail

accept

public void accept(Visitor visitor)
Insert the method's description here. Creation date: (29.1.2001 20:05:52)

Specified by:
accept in interface Visitable
Parameters:
visitor - com.cosylab.vdct.graphics.objects.Visitor

addConnector

public Connector addConnector()
Insert the method's description here. Creation date: (4.2.2001 12:50:51)


bypass

public void bypass()
Insert the method's description here. Creation date: (4.2.2001 12:35:05)


checkMove

public boolean checkMove(int dx,
                         int dy)
Insert the method's description here. Creation date: (29.1.2001 20:05:51)

Specified by:
checkMove in interface Movable
Parameters:
dx - int
dy - int
Returns:
boolean

destroy

public void destroy()
Insert the method's description here. Creation date: (1.2.2001 16:40:51)

Overrides:
destroy in class VisibleObject

disconnect

public void disconnect(Linkable disconnector)
This method destroys connector (connector should not be used afer this method was called) Creation date: (29.1.2001 20:05:51)

Specified by:
disconnect in interface Linkable

draw

protected void draw(java.awt.Graphics g,
                    boolean hilited)
Insert the method's description here. Creation date: (29.1.2001 20:05:52)

Specified by:
draw in class VisibleObject
Parameters:
g - java.awt.Graphics
hilited - boolean

getDescription

public java.lang.String getDescription()
Insert the method's description here. Creation date: (24.4.2001 18:04:05)

Specified by:
getDescription in interface Descriptable
Returns:
java.lang.String

getHashID

public java.lang.String getHashID()
Insert the method's description here. Creation date: (3.5.2001 16:43:08)

Specified by:
getHashID in class VisibleObject
Returns:
java.lang.String

getID

public java.lang.String getID()
Insert the method's description here. Creation date: (1.2.2001 17:31:26)

Specified by:
getID in interface Linkable
Returns:
java.lang.String

getInput

public InLink getInput()
Insert the method's description here. Creation date: (29.1.2001 20:05:52)

Specified by:
getInput in interface OutLink
Returns:
com.cosylab.vdct.graphics.objects.InLink

getInX

public int getInX()
Insert the method's description here. Creation date: (29.1.2001 20:05:51)

Specified by:
getInX in interface InLink
Returns:
int

getInY

public int getInY()
Insert the method's description here. Creation date: (29.1.2001 20:05:51)

Specified by:
getInY in interface InLink
Returns:
int

getItems

public java.util.Vector getItems()
Insert the method's description here. Creation date: (3.2.2001 11:23:59)

Specified by:
getItems in interface Popupable
Returns:
java.util.Vector

getLayerID

public java.lang.String getLayerID()
Insert the method's description here. Creation date: (29.1.2001 20:05:51)

Specified by:
getLayerID in interface Linkable
Returns:
java.lang.String

getOutput

public OutLink getOutput()
Insert the method's description here. Creation date: (29.1.2001 20:05:51)

Specified by:
getOutput in interface InLink
Returns:
com.cosylab.vdct.graphics.objects.OutLink

getOutX

public int getOutX()
Insert the method's description here. Creation date: (29.1.2001 20:05:52)

Specified by:
getOutX in interface OutLink
Returns:
int

getOutY

public int getOutY()
Insert the method's description here. Creation date: (29.1.2001 20:05:52)

Specified by:
getOutY in interface OutLink
Returns:
int

getQueueCount

public int getQueueCount()
Insert the method's description here. Creation date: (30.1.2001 14:50:26)

Specified by:
getQueueCount in interface OutLink
Returns:
int

isConnectable

public boolean isConnectable()
Insert the method's description here. Creation date: (29.1.2001 20:05:52)

Specified by:
isConnectable in interface Linkable
Returns:
boolean

isDisconnected

public boolean isDisconnected()
Insert the method's description here. Creation date: (29.1.2001 20:05:51)

Specified by:
isDisconnected in interface Linkable
Returns:
boolean

move

public boolean move(int dx,
                    int dy)
Insert the method's description here. Creation date: (29.1.2001 20:05:51)

Specified by:
move in interface Movable
Parameters:
dx - int
dy - int
Returns:
boolean

revalidatePosition

public void revalidatePosition()
Insert the method's description here. Creation date: (29.1.2001 20:05:52)

Specified by:
revalidatePosition in class VisibleObject

setDescription

public void setDescription(java.lang.String description)
Insert the method's description here. Creation date: (24.4.2001 18:04:05)

Specified by:
setDescription in interface Descriptable
Parameters:
description - java.lang.String

setID

public void setID(java.lang.String newID)
Insert the method's description here. Creation date: (1.2.2001 17:31:26)

Parameters:
newID - java.lang.String

setInput

public void setInput(InLink input)
Insert the method's description here. Creation date: (29.1.2001 20:05:52)

Specified by:
setInput in interface OutLink

setLayerID

public void setLayerID(java.lang.String id)
Insert the method's description here. Creation date: (29.1.2001 20:05:51)

Specified by:
setLayerID in interface Linkable
Parameters:
id - java.lang.String

setOutput

public void setOutput(OutLink output,
                      OutLink prevOutput)
Insert the method's description here. Creation date: (29.1.2001 20:05:51)

Specified by:
setOutput in interface InLink
Parameters:
output - com.cosylab.vdct.graphics.objects.OutLink
prevOutput - com.cosylab.vdct.graphics.objects.OutLink

validate

protected void validate()
Insert the method's description here. Creation date: (29.1.2001 20:05:52)

Specified by:
validate in class VisibleObject

getMode

public int getMode()
Description copied from interface: OutLink
Insert the method's description here. Creation date: (29.1.2001 17:53:09)

Specified by:
getMode in interface OutLink
Returns:
int
See Also:
OutLink.getMode()

setMode

public void setMode(int mode)
Sets the mode.

Parameters:
mode - The mode to set

intersects

public VisibleObject intersects(int px,
                                int py)
Default impmlementation for square (must be rescaled) Creation date: (19.12.2000 20:20:20)

Overrides:
intersects in class VisibleObject
Parameters:
px - int
py - int
Returns:
com.cosylab.visible.objects.VisibleObject

intersects

public VisibleObject intersects(int p1x,
                                int p1y,
                                int p2x,
                                int p2y)
Default impmlementation for square (must be rescaled) p1 is upper-left point Creation date: (19.12.2000 20:20:20)

Overrides:
intersects in class VisibleObject
Parameters:
p1x - int
p1y - int
p2x - int
p2y - int
Returns:
com.cosylab.visible.objects.VisibleObject

validateLink

public void validateLink()
Specified by:
validateLink in interface OutLink
See Also:
OutLink.validateLink()

getLeftX

public int getLeftX()
Specified by:
getLeftX in interface InLink
Specified by:
getLeftX in interface OutLink

getRightX

public int getRightX()
Specified by:
getRightX in interface InLink
Specified by:
getRightX in interface OutLink

isRight

public boolean isRight()
Specified by:
isRight in interface InLink
Specified by:
isRight in interface OutLink