com.cosylab.vdct.graphics.objects
Class Port

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

public class Port
extends VisibleObject
implements Descriptable, Movable, OutLink, Popupable, Selectable, Inspectable, Flexible

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

Author:
Matej Sekoranja

Field Summary
protected  VDBPort data
           
protected  boolean disconnected
           
protected  InLink inlink
           
protected  java.awt.Polygon leftPoly
           
protected  int leftXtranslation
           
protected  int leftYtranslation
           
protected  LinkProperties properties
           
protected  java.awt.Polygon rightPoly
           
protected  int rightXtranslation
           
protected  int rightYtranslation
           
 
Fields inherited from class com.cosylab.vdct.graphics.objects.VisibleObject
x, y, zoomImage
 
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
Port(VDBPort data, ContainerObject parent, int x, int y)
          Insert the method's description here.
 
Method Summary
 void accept(Visitor visitor)
          Insert the method's description here.
 Connector addConnector()
           
 boolean checkMove(int dx, int dy)
          Insert the method's description here.
 Flexible copyToGroup(java.lang.Object dsId, java.lang.String group)
          Returns the copied instance or null if the object cannot be copied.
 void destroy()
          Insert the method's description here.
 void disconnect(Linkable disconnector)
          ...
protected  void draw(java.awt.Graphics g, boolean hilited)
          Insert the method's description here.
 void fixLinkProperties()
           
 InspectableProperty getCommentProperty()
           
 VDBPort getData()
          Returns the data.
 java.lang.String getDescription()
          Insert the method's description here.
 java.lang.String getFlexibleName()
          Insert the method's description here.
 java.lang.String getHashID()
          Insert the method's description here.
 javax.swing.Icon getIcon()
          Insert the method's description here.
 java.lang.String getID()
          Insert the method's description here.
 InLink getInput()
          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.
 java.util.ArrayList getModeNames()
          Obtains list of all mode names for this particular property.
 java.lang.String getName()
          Insert the method's description here.
 int getOutX()
          Insert the method's description here.
 int getOutY()
          Insert the method's description here.
static GUISeparator getPortSeparator()
          Insert the method's description here.
 InspectableProperty[] getProperties(int mode, boolean spreadsheet)
           
 int getQueueCount()
          Insert the method's description here.
 int getRightX()
           
 int getTopOffset()
          Returns the offset in pixels(the length of additional objects (arrows, strings) drawn above this object.
 boolean isConnectable()
          Insert the method's description here.
 boolean isDisconnected()
          Insert the method's description here.
 boolean isRight()
          Insert the method's description here.
 boolean isTextPositionNorth()
           
 boolean move(int dx, int dy)
          Insert the method's description here.
 boolean moveToGroup(java.lang.Object dsId, java.lang.String group)
          Insert the method's description here.
 void removeLink()
          Insert the method's description here.
 boolean rename(java.lang.Object dsId, java.lang.String newName)
          Insert the method's description here.
 void rename(java.lang.String oldName, java.lang.String newName)
           
 void revalidatePosition()
          Insert the method's description here.
 void setColor(java.awt.Color newColor)
          Insert the method's description here.
 void setDescription(java.lang.String description)
          Insert the method's description here.
 void setDestroyed(boolean newDestroyed)
          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)
           
 void setTextPositionNorth(boolean isTextPositionNorth)
           
 java.lang.String toString()
          Insert the method's description here.
protected  void validate()
          Insert the method's description here.
 void validateLink()
           
 void valueChanged()
          Insert the method's description here.
 
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, getVisibleColor, getWidth, getX, getY, intersects, intersects, isDestroyed, isVisible, isZoomRepaint, markPosition, paint, postDraw, postPaint, 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, wait, wait, wait
 
Methods inherited from interface com.cosylab.vdct.graphics.popup.Popupable
getLabel
 
Methods inherited from interface com.cosylab.vdct.inspector.Inspectable
getDsId
 

Field Detail

inlink

protected InLink inlink

disconnected

protected boolean disconnected

properties

protected LinkProperties properties

data

protected VDBPort data

rightXtranslation

protected int rightXtranslation

rightYtranslation

protected int rightYtranslation

leftXtranslation

protected int leftXtranslation

leftYtranslation

protected int leftYtranslation

leftPoly

protected java.awt.Polygon leftPoly

rightPoly

protected java.awt.Polygon rightPoly
Constructor Detail

Port

public Port(VDBPort data,
            ContainerObject parent,
            int x,
            int y)
Insert the method's description here. Creation date: (1.2.2001 17:22:29)

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

checkMove

public boolean checkMove(int dx,
                         int dy)
Insert the method's description here. Creation date: (25.12.2000 14:14:35)

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

removeLink

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


disconnect

public void disconnect(Linkable disconnector)
... 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

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

isRight

public boolean isRight()
Insert the method's description here. Creation date: (30.1.2001 16:58:58)

Specified by:
isRight in interface OutLink
Returns:
boolean

getOutX

public int getOutX()
Insert the method's description here. Creation date: (29.1.2001 22:22:13)

Specified by:
getOutX in interface OutLink
Returns:
int

getOutY

public int getOutY()
Insert the method's description here. Creation date: (29.1.2001 22:22:13)

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: (25.12.2000 14:14:35)

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

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

validate

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

Specified by:
validate in class VisibleObject

setColor

public void setColor(java.awt.Color newColor)
Insert the method's description here. Creation date: (4.2.2001 12:46:30)

Overrides:
setColor in class VisibleObject
Parameters:
newColor - java.awt.Color

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)

getCommentProperty

public InspectableProperty getCommentProperty()
Specified by:
getCommentProperty in interface Inspectable
Returns:
com.cosylab.vdct.inspector.InspectableProperty
See Also:
Inspectable.getCommentProperty()

getIcon

public javax.swing.Icon getIcon()
Description copied from interface: Inspectable
Insert the method's description here. Creation date: (10.1.2001 15:14:56)

Specified by:
getIcon in interface Inspectable
Returns:
javax.swing.Icon
See Also:
Inspectable.getIcon()

getModeNames

public java.util.ArrayList getModeNames()
Description copied from interface: Inspectable
Obtains list of all mode names for this particular property. Modes are numbered from 0-n. Creation date: (11.1.2001 21:30:04)

Specified by:
getModeNames in interface Inspectable
Returns:
java.util.ArrayList array of mode names - obtained using toString().
See Also:
Inspectable.getModeNames()

getName

public java.lang.String getName()
Description copied from interface: Inspectable
Insert the method's description here. Creation date: (10.1.2001 14:47:43)

Specified by:
getName in interface Inspectable
Returns:
java.lang.String
See Also:
Inspectable.getName()

toString

public java.lang.String toString()
Description copied from interface: Flexible
Insert the method's description here. Creation date: (3.5.2001 10:15:48)

Specified by:
toString in interface Flexible
Specified by:
toString in interface Inspectable
Overrides:
toString in class java.lang.Object
Returns:
java.lang.String
See Also:
String.toString()

getPortSeparator

public static GUISeparator getPortSeparator()
Insert the method's description here. Creation date: (3.2.2001 13:07:04)

Returns:
com.cosylab.vdct.vdb.GUISeparator

getProperties

public InspectableProperty[] getProperties(int mode,
                                           boolean spreadsheet)
Specified by:
getProperties in interface Inspectable
Returns:
com.cosylab.vdct.inspector.InspectableProperty[]
See Also:
com.cosylab.vdct.inspector.Inspectable#getProperties(int)

valueChanged

public void valueChanged()
Insert the method's description here. Creation date: (30.1.2001 12:25:44)


setDestroyed

public void setDestroyed(boolean newDestroyed)
Description copied from class: VisibleObject
Insert the method's description here. Creation date: (5.5.2001 18:02:09)

Overrides:
setDestroyed in class VisibleObject
Parameters:
newDestroyed - boolean
See Also:
VisibleObject.setDestroyed(boolean)

rename

public void rename(java.lang.String oldName,
                   java.lang.String newName)

fixLinkProperties

public void fixLinkProperties()
See Also:
EPICSLink.fixLinkProperties()

getData

public VDBPort getData()
Returns the data.

Returns:
VDBPort

validateLink

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

getLeftX

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

getRightX

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

getTopOffset

public int getTopOffset()
Description copied from class: VisibleObject
Returns the offset in pixels(the length of additional objects (arrows, strings) drawn above this object.

Overrides:
getTopOffset in class VisibleObject
Returns:

addConnector

public Connector addConnector()

setTextPositionNorth

public void setTextPositionNorth(boolean isTextPositionNorth)

isTextPositionNorth

public boolean isTextPositionNorth()

copyToGroup

public Flexible copyToGroup(java.lang.Object dsId,
                            java.lang.String group)
Description copied from interface: Flexible
Returns the copied instance or null if the object cannot be copied. Creation date: (4.2.2001 21:59:44)

Specified by:
copyToGroup in interface Flexible
group - java.lang.String

getFlexibleName

public java.lang.String getFlexibleName()
Description copied from interface: Flexible
Insert the method's description here. Creation date: (3.5.2001 10:15:48)

Specified by:
getFlexibleName in interface Flexible
Returns:
java.lang.String

moveToGroup

public boolean moveToGroup(java.lang.Object dsId,
                           java.lang.String group)
Description copied from interface: Flexible
Insert the method's description here. Creation date: (4.2.2001 22:00:01)

Specified by:
moveToGroup in interface Flexible
group - java.lang.String

rename

public boolean rename(java.lang.Object dsId,
                      java.lang.String newName)
Description copied from interface: Flexible
Insert the method's description here. Creation date: (2.5.2001 23:23:17)

Specified by:
rename in interface Flexible
newName - java.lang.String