com.cosylab.vdct.graphics.objects
Class Record

java.lang.Object
  extended by com.cosylab.vdct.graphics.objects.VisibleObject
      extended by com.cosylab.vdct.graphics.objects.ContainerObject
          extended by com.cosylab.vdct.graphics.objects.LinkManagerObject
              extended by com.cosylab.vdct.graphics.objects.Record
All Implemented Interfaces:
Clipboardable, Descriptable, Flexible, Hub, InLink, Linkable, Morphable, Movable, MultiInLink, Rotatable, SaveObject, Selectable, SelectableComponents, Visitable, Popupable, Inspectable

public class Record
extends LinkManagerObject
implements Clipboardable, Descriptable, Flexible, Hub, Morphable, Movable, MultiInLink, Rotatable, Selectable, Popupable, Inspectable, SaveObject, SelectableComponents

Insert the type's description here. Creation date: (21.12.2000 20:46:35)

Author:
Matej Sekoranja

Field Summary
protected  java.util.Vector changedFields
           
static int DBD_ORDER
           
protected  java.awt.Color debugValueColor
           
protected  boolean disconnected
           
protected  java.awt.Font fieldFont
           
static int GUI_GROUP_ORDER
           
protected  java.lang.String label2
           
protected  java.util.Vector outlinks
           
protected  VDBRecordData recordData
           
protected  int rfieldLabelX
           
protected  int rfieldLabelY
           
protected  double rfieldRowHeight
           
protected  int rtypeLabelX
           
protected  int rtypeLabelY
           
static int SORT_ORDER
           
protected  java.lang.String timestamp
           
protected  java.awt.Font timestampFont
           
protected  int timestampX
           
protected  int timestampY
           
protected  java.awt.Font typeFont
           
protected  java.lang.String value
           
protected  java.awt.Font valueFont
           
protected  int valueX
           
protected  int valueY
           
 
Fields inherited from class com.cosylab.vdct.graphics.objects.LinkManagerObject
fwdlinkString, inlinkString, nullString, outlinkString, varlinkPortString, varlinkString
 
Fields inherited from class com.cosylab.vdct.graphics.objects.ContainerObject
subObjects, subObjectsV, useHashtable
 
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
 
Constructor Summary
Record(ContainerObject parent, VDBRecordData recordData, int x, int y)
          Group constructor comment.
 
Method Summary
 void _fixEPICSInLinks(java.lang.String oldRecordName, java.lang.String newRecordName)
          Insert the method's description here.
 void accept(Visitor visitor)
          Insert the method's description here.
 void addLink(Linkable link)
          Insert the method's description here.
 boolean checkMove(int dx, int dy)
          Insert the method's description here.
 Flexible copyToGroup(java.lang.Object dsId, java.lang.String group)
          Insert the method's description here.
 void destroy()
          Insert the method's description here.
 void disconnect(Linkable disconnector)
          Insert the method's description here.
protected  void draw(java.awt.Graphics g, boolean hilited)
          Insert the method's description here.
protected static void drawDebugTimeout(java.awt.Graphics g, int hour, int minute, int x0, int y0, int w, int h)
          Draws a timeout clock.
 void fieldChanged(VDBFieldData field)
          Insert the method's description here.
 void fixEPICSOutLinks(java.lang.String prevGroup, java.lang.String group)
          Insert the method's description here.
 void fixEPICSOutLinksOnCopy(java.lang.String prevGroup, java.lang.String group)
          Insert the method's description here.
 void fixLinks()
          Goes through link fields (in, out, var, fwd) and cheks if ther are OK, if not it fixes it When record is moved, renames, etc.
 void generateMacros(java.util.HashMap macros)
           
static GUISeparator getAlphaSeparator()
          Insert the method's description here.
 InspectableProperty getCommentProperty()
          Insert the method's description here.
static GUISeparator getDBDSeparator()
          Insert the method's description here.
 java.lang.String getDescription()
          Insert the method's description here.
 VDBFieldData getField(java.lang.String name)
           
 java.lang.String getFlexibleName()
          Insert the method's description here.
 java.lang.String getHashID()
          Insert the method's description here.
 int getHeight()
          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.
 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 getLinkCount()
          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.
 java.util.Vector getOutlinks()
           
 OutLink getOutput()
          Insert the method's description here.
 InspectableProperty[] getProperties(int mode, boolean spreadsheet)
          Return properties to be inspected Creation date: (11.1.2001 21:43:31)
 VDBRecordData getRecordData()
          Insert the method's description here.
 int getRightX()
           
 java.util.Vector getStartPoints()
          Insert the method's description here.
 java.lang.Object[] getTargets()
           
 java.lang.String getType()
           
 VisibleObject hiliteComponentsCheck(int x, int y)
          Returned value inicates change Creation date: (21.12.2000 22:21:12)
 EPICSLink initializeLinkField(VDBFieldData field)
          Insert the method's description here.
 VisibleObject intersects(int px, int py)
          Default impmlementation for square (must be rescaled) 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 isOldVisible(VDBFieldData field)
           
 boolean isRight()
          Insert the method's description here.
 boolean isVisible(VDBFieldData field)
           
 void manageLinks()
          Insert the method's description here.
 boolean morph(java.lang.String newType)
          Insert the method's description here.
 boolean move(int dx, int dy)
          Insert the method's description here.
 boolean moveAsMuchAsPossibleTopUp(int dx, int dy)
          NOTE: only dy < 0 is checked
 boolean moveToGroup(java.lang.Object dsId, java.lang.String group)
          Insert the method's description here.
 void removeLink(Linkable link)
          Insert the method's description here.
 boolean rename(java.lang.Object dsId, java.lang.String newName)
          Insert the method's description here.
 void resetValidationsCounter()
           
 void revalidateFieldsPosition()
          Insert the method's description here.
 void revalidateOutlinkConnectors()
           
 void revalidatePosition()
          Insert the method's description here.
 void rotate()
          Insert the method's description here.
 boolean selectAllComponents()
          Insert the method's description here.
 boolean selectComponentsCheck(int x1, int y1, int x2, int y2)
          Returned value inicates change Creation date: (21.12.2000 22:21:12)
 void setDescription(java.lang.String description)
          Insert the method's description here.
 void setLayerID(java.lang.String id)
          Insert the method's description here.
 void setOutput(OutLink output, OutLink prevOutput)
          Insert the method's description here.
 void setRecordData(VDBRecordData recordData)
           
 void setRight(boolean state)
          Insert the method's description here.
 void snapToGrid()
          Snap to grid.
 java.lang.String toString()
          Insert the method's description here.
 void updateFields()
           
protected  void validate()
          Insert the method's description here.
 
Methods inherited from class com.cosylab.vdct.graphics.objects.LinkManagerObject
addInvalidLink, checkIfMacroCandidate, destroyFields, fixEPICSOutLinks, fixLink_, fixLink, fixLink, fixLinks_, fixMacroLink, getLinkMenus, getTargetLink, isFirstField, isLastField, isSoftwareLink, manageLink_, manageLink, moveConnectors, moveFieldDown, moveFieldUp, postDraw, removeInvalidLink, setTargetLink
 
Methods inherited from class com.cosylab.vdct.graphics.objects.ContainerObject
addSubObject, addSubObject, addSubObject, clear, containsObject, getRootContainer, getSubObject, getSubObjects, getSubObjectsV, removeObject
 
Methods inherited from class com.cosylab.vdct.graphics.objects.VisibleObject
forceValidation, getColor, getDsId, getFont, getLabel, getLeftOffset, getMarkedX, getMarkedY, getMoveInsideView, getParent, getRheight, getRightOffset, getRlabelX, getRlabelY, getRscale, getRwidth, getRx, getRy, getScale, getTopOffset, getVisibleColor, getWidth, getX, getY, intersects, isDestroyed, isVisible, isZoomRepaint, markPosition, paint, postPaint, setColor, setDestroyed, setFont, setHeight, setLabel, setParent, setRheight, setRlabelX, setRlabelY, setRwidth, setRx, setRy, setScale, setWidth, setX, setY, setZoomRepaint, 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

recordData

protected VDBRecordData recordData

rtypeLabelX

protected int rtypeLabelX

rtypeLabelY

protected int rtypeLabelY

label2

protected java.lang.String label2

typeFont

protected java.awt.Font typeFont

rfieldLabelX

protected int rfieldLabelX

rfieldLabelY

protected int rfieldLabelY

rfieldRowHeight

protected double rfieldRowHeight

fieldFont

protected java.awt.Font fieldFont

changedFields

protected java.util.Vector changedFields

outlinks

protected java.util.Vector outlinks

disconnected

protected boolean disconnected

debugValueColor

protected java.awt.Color debugValueColor

timestampX

protected int timestampX

timestampY

protected int timestampY

timestamp

protected java.lang.String timestamp

timestampFont

protected java.awt.Font timestampFont

valueX

protected int valueX

valueY

protected int valueY

value

protected java.lang.String value

valueFont

protected java.awt.Font valueFont

GUI_GROUP_ORDER

public static final int GUI_GROUP_ORDER
See Also:
Constant Field Values

SORT_ORDER

public static final int SORT_ORDER
See Also:
Constant Field Values

DBD_ORDER

public static final int DBD_ORDER
See Also:
Constant Field Values
Constructor Detail

Record

public Record(ContainerObject parent,
              VDBRecordData recordData,
              int x,
              int y)
Group constructor comment.

Parameters:
parent - com.cosylab.vdct.graphics.objects.ContainerObject
Method Detail

_fixEPICSInLinks

public void _fixEPICSInLinks(java.lang.String oldRecordName,
                             java.lang.String newRecordName)
Insert the method's description here. Creation date: (5.2.2001 13:36:25)

Parameters:
oldRecordName - java.lang.String
newRecordName - java.lang.String

accept

public void accept(Visitor visitor)
Insert the method's description here. Creation date: (21.12.2000 20:46:35)

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

addLink

public void addLink(Linkable link)
Insert the method's description here. Creation date: (29.1.2001 22:40:48)

Specified by:
addLink in interface Hub
Parameters:
link - com.cosylab.vdct.graphics.objects.Linkable

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

copyToGroup

public Flexible copyToGroup(java.lang.Object dsId,
                            java.lang.String group)
Insert the method's description here. Creation date: (4.2.2001 22:02:29)

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

fixEPICSOutLinksOnCopy

public void fixEPICSOutLinksOnCopy(java.lang.String prevGroup,
                                   java.lang.String group)
Insert the method's description here. Creation date: (5.2.2001 9:42:29)

Parameters:
e - java.util.Enumeration list of VDBFieldData fields
prevGroup - java.lang.String
group - java.lang.String

destroy

public void destroy()
Insert the method's description here. Creation date: (30.1.2001 11:59:21)

Overrides:
destroy in class VisibleObject

disconnect

public void disconnect(Linkable disconnector)
Insert the method's description here. Creation date: (30.1.2001 11:47:53)

Specified by:
disconnect in interface Linkable

draw

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

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

drawDebugTimeout

protected static void drawDebugTimeout(java.awt.Graphics g,
                                       int hour,
                                       int minute,
                                       int x0,
                                       int y0,
                                       int w,
                                       int h)
Draws a timeout clock.

Parameters:
g -
hour -
minute -
x0 -
y0 -
w -
h -

fieldChanged

public void fieldChanged(VDBFieldData field)
Insert the method's description here. Creation date: (27.1.2001 16:12:03)

Specified by:
fieldChanged in class LinkManagerObject
Parameters:
field - com.cosylab.vdct.vdb.VDBFieldData

isVisible

public boolean isVisible(VDBFieldData field)

isOldVisible

public boolean isOldVisible(VDBFieldData field)

fixEPICSOutLinks

public void fixEPICSOutLinks(java.lang.String prevGroup,
                             java.lang.String group)
Insert the method's description here. Creation date: (5.2.2001 9:42:29)

Parameters:
prevGroup - java.lang.String
group - java.lang.String

fixLinks

public void fixLinks()
Goes through link fields (in, out, var, fwd) and cheks if ther are OK, if not it fixes it When record is moved, renames, etc. value of in, out, fwd should be changed, but visual link is still preserved :) (linked list). It compares start point end end point and ... Creation date: (2.5.2001 19:37:46)

Overrides:
fixLinks in class LinkManagerObject

getCommentProperty

public InspectableProperty getCommentProperty()
Insert the method's description here. Creation date: (26.1.2001 15:00:15)

Specified by:
getCommentProperty in interface Inspectable
Returns:
com.cosylab.vdct.inspector.InspectableProperty

getDescription

public java.lang.String getDescription()
Insert the method's description here. Creation date: (9.4.2001 13:12:33)

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

getFlexibleName

public java.lang.String getFlexibleName()
Insert the method's description here. Creation date: (3.5.2001 10:16:55)

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

getHashID

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

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

getHeight

public int getHeight()
Insert the method's description here. Creation date: (25.4.2001 17:58:03)

Overrides:
getHeight in class VisibleObject
Returns:
int

getIcon

public javax.swing.Icon getIcon()
Insert the method's description here. Creation date: (10.1.2001 15:15:51)

Specified by:
getIcon in interface Inspectable
Returns:
javax.swing.Icon

getID

public java.lang.String getID()
Insert the method's description here. Creation date: (23.4.2001 20:37:11)

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

getInX

public int getInX()
Insert the method's description here. Creation date: (30.1.2001 11:47:54)

Specified by:
getInX in interface InLink
Returns:
int

getInY

public int getInY()
Insert the method's description here. Creation date: (30.1.2001 11:47:54)

Specified by:
getInY in interface InLink
Returns:
int

getItems

public java.util.Vector getItems()
Insert the method's description here. Creation date: (2.2.2001 20:31:29)

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

getLayerID

public java.lang.String getLayerID()
Insert the method's description here. Creation date: (30.1.2001 11:47:53)

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

getLinkCount

public int getLinkCount()
Insert the method's description here. Creation date: (4.5.2001 9:54:07)

Specified by:
getLinkCount in interface MultiInLink
Returns:
java.util.Vector

getName

public java.lang.String getName()
Insert the method's description here. Creation date: (2.2.2001 21:40:05)

Specified by:
getName in interface Morphable
Specified by:
getName in interface Inspectable
Returns:
java.lang.String

getOutput

public OutLink getOutput()
Insert the method's description here. Creation date: (30.1.2001 11:47:53)

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

getAlphaSeparator

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

Returns:
com.cosylab.vdct.vdb.GUISeparator

getDBDSeparator

public static GUISeparator getDBDSeparator()
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)
Return properties to be inspected Creation date: (11.1.2001 21:43:31)

Specified by:
getProperties in interface Inspectable
Returns:
com.cosylab.vdct.inspector.InspectableProperty[]

getRecordData

public VDBRecordData getRecordData()
Insert the method's description here. Creation date: (8.1.2001 21:18:50)

Returns:
com.cosylab.vdct.vdb.VDBRecordData

getStartPoints

public java.util.Vector getStartPoints()
Insert the method's description here. Creation date: (5.2.2001 12:10:18)

Specified by:
getStartPoints in interface MultiInLink
Returns:
java.util.Vector

hiliteComponentsCheck

public VisibleObject hiliteComponentsCheck(int x,
                                           int y)
Returned value inicates change Creation date: (21.12.2000 22:21:12)

Parameters:
x - int
y - int
Returns:
com.cosylab.visible.objects.VisibleObject

initializeLinkField

public EPICSLink initializeLinkField(VDBFieldData field)
Insert the method's description here. Creation date: (30.1.2001 9:36:15)

Parameters:
field - com.cosylab.vdct.vdb.VDBFieldData

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

selectComponentsCheck

public boolean selectComponentsCheck(int x1,
                                     int y1,
                                     int x2,
                                     int y2)
Returned value inicates change Creation date: (21.12.2000 22:21:12)

Specified by:
selectComponentsCheck in interface SelectableComponents
Parameters:
x1 - int
y1 - int
x2 - int
y2 - int
Returns:
boolean anyNew

isConnectable

public boolean isConnectable()
Insert the method's description here. Creation date: (30.1.2001 11:47:53)

Specified by:
isConnectable in interface Linkable
Returns:
boolean

isDisconnected

public boolean isDisconnected()
Insert the method's description here. Creation date: (30.1.2001 11:47:53)

Specified by:
isDisconnected in interface Linkable
Returns:
boolean

isRight

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

Specified by:
isRight in interface InLink
Specified by:
isRight in interface Rotatable
Returns:
boolean

manageLinks

public void manageLinks()
Insert the method's description here. Creation date: (30.1.2001 11:35:39)


morph

public boolean morph(java.lang.String newType)
Insert the method's description here. Creation date: (4.2.2001 21:58:46)

Specified by:
morph in interface Morphable
Parameters:
newType - java.lang.String

setRecordData

public void setRecordData(VDBRecordData recordData)

getTargets

public java.lang.Object[] getTargets()
Specified by:
getTargets in interface Morphable

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

moveAsMuchAsPossibleTopUp

public boolean moveAsMuchAsPossibleTopUp(int dx,
                                         int dy)
NOTE: only dy < 0 is checked


moveToGroup

public boolean moveToGroup(java.lang.Object dsId,
                           java.lang.String group)
Insert the method's description here. Creation date: (4.2.2001 22:02:29)

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

removeLink

public void removeLink(Linkable link)
Insert the method's description here. Creation date: (29.1.2001 22:40:48)

Specified by:
removeLink in interface Hub
Parameters:
link - com.cosylab.vdct.graphics.objects.Linkable

rename

public boolean rename(java.lang.Object dsId,
                      java.lang.String newName)
Insert the method's description here. Creation date: (2.5.2001 23:23:32)

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

revalidateFieldsPosition

public void revalidateFieldsPosition()
Insert the method's description here. Creation date: (26.1.2001 17:18:51)

Specified by:
revalidateFieldsPosition in class LinkManagerObject

revalidatePosition

public void revalidatePosition()
Insert the method's description here. Creation date: (21.12.2000 21:22:45)

Specified by:
revalidatePosition in class VisibleObject

revalidateOutlinkConnectors

public void revalidateOutlinkConnectors()

rotate

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

Specified by:
rotate in interface Rotatable

selectAllComponents

public boolean selectAllComponents()
Insert the method's description here. Creation date: (27.12.2000 12:45:23)

Returns:
boolean

setDescription

public void setDescription(java.lang.String description)
Insert the method's description here. Creation date: (24.4.2001 17:40:55)

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

setLayerID

public void setLayerID(java.lang.String id)
Insert the method's description here. Creation date: (30.1.2001 11:47:53)

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: (30.1.2001 11:47:54)

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

setRight

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

Specified by:
setRight in interface Rotatable
Parameters:
state - boolean

toString

public java.lang.String toString()
Insert the method's description here. Creation date: (10.1.2001 14:49:50)

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

resetValidationsCounter

public void resetValidationsCounter()

validate

protected void validate()
Insert the method's description here. Creation date: (21.12.2000 20:46:35)

Specified by:
validate in class VisibleObject

getField

public VDBFieldData getField(java.lang.String name)
Specified by:
getField in class LinkManagerObject

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()

generateMacros

public void generateMacros(java.util.HashMap macros)
Parameters:
linkableMacros -
macros -
deep -

getLeftX

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

getRightX

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

getType

public java.lang.String getType()
Specified by:
getType in interface Morphable

getOutlinks

public java.util.Vector getOutlinks()
Specified by:
getOutlinks in interface MultiInLink

updateFields

public void updateFields()
Overrides:
updateFields in class ContainerObject

snapToGrid

public void snapToGrid()
Snap to grid. Nearest point is taken.

Overrides:
snapToGrid in class VisibleObject