com.cosylab.vdct.graphics.objects
Class Group

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.Group
All Implemented Interfaces:
DsEventListener, Clipboardable, Descriptable, Flexible, Movable, SaveInterface, SaveObject, Selectable, Visitable

public class Group
extends ContainerObject
implements Clipboardable, Descriptable, Flexible, Movable, SaveInterface, Selectable, SaveObject, DsEventListener

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

Author:
Matej Sekoranja

Field Summary
protected  boolean disposed
           
protected  java.lang.Object dsId
           
protected  java.lang.String name
           
protected  java.lang.String namePrefix
           
protected  java.util.Vector structure
           
 
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
 
Constructor Summary
Group(ContainerObject parent)
          Group constructor comment.
 
Method Summary
 void accept(Visitor visitor)
          Insert the method's description here.
 void addSubObject(java.lang.String id, VisibleObject object)
          Insert the method's description here.
 void addSubObject(java.lang.String id, VisibleObject object, boolean create)
          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.
static Group createGroup(java.lang.Object dsId, java.lang.String name)
          Insert the method's description here.
 void destroy()
          Insert the method's description here.
protected  void draw(java.awt.Graphics g, boolean hilited)
          Insert the method's description here.
 java.lang.Object findObject(java.lang.String objectName, boolean deep)
          Insert the method's description here.
 void fixLinks(boolean deep)
          This method has to be called to fix links after move, copy...
 void generateMacros(java.util.HashMap macros, boolean deep)
           
 java.lang.String getAbsoluteName()
          Insert the method's description here.
 int getAbsoulteHeight()
           
 int getAbsoulteWidth()
           
static java.util.Vector getAllRoots()
           
static Group getClipboard()
          Insert the method's description here.
 java.lang.String getDescription()
          Insert the method's description here.
 java.lang.Object getDsId()
           
static VDBTemplate getEditingTemplateData(java.lang.Object dsId)
          Returns the editingTemplateData.
 java.lang.String getFlexibleName()
          Insert the method's description here.
 java.lang.String getHashID()
          Insert the method's description here.
 ViewState getLocalView()
          Insert the method's description here.
 java.util.Hashtable getLookupTable()
          Returns the lookupTable.
 java.lang.String getName()
          Insert the method's description here.
 java.lang.String getNamePrefix()
          Insert the method's description here.
static Group getRoot()
          Returns the root group currently displayed by active drawing surface, or null in there are no drawing surfaces open.
static Group getRoot(java.lang.Object id)
           
 java.util.Vector getStructure()
          Returns the structure.
 java.lang.Object getSubObject(java.lang.String id)
          Insert the method's description here.
static java.lang.String getVDCTData(java.lang.Object dsId)
           
static boolean hasMacroPortsIDChanged(java.lang.Object dsId)
           
static boolean hasTokens(java.lang.String name)
          Insert the method's description here.
 VisibleObject hiliteComponentsCheck(int x, int y)
          Returned value inicates change Creation date: (21.12.2000 22:21:12)
 void initializeLayout()
          Insert the method's description here.
 boolean isDisposed()
           
 void manageLinks(boolean deep)
          Insert the method's description here.
 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 onDsAdded(java.lang.Object id)
           
 void onDsFocused(java.lang.Object id)
           
 void onDsRemoved(java.lang.Object id)
           
 void paintComponents(java.awt.Graphics g, boolean hilited)
          Insert the method's description here.
 void paintComponents(java.awt.Graphics g, boolean hilited, boolean flatten)
          Insert the method's description here.
static void registerDsListener()
           
 java.lang.Object removeObject(java.lang.String id)
          Insert the method's description here.
 boolean rename(java.lang.Object dsId, java.lang.String newName)
          Insert the method's description here.
 void reset()
          Resets certain parameters of the subobjects (validationsCounter in Record).
 void revalidatePosition()
          Insert the method's description here.
static void save(java.lang.Object dsId, Group group2save, java.io.File file, boolean export)
          Insert the method's description here.
static void save(java.lang.Object dsId, Group group2save, java.io.File file, NamingContext renamer, boolean export)
          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 setAbsoluteName(java.lang.String absoluteName)
          Insert the method's description here.
 void setDescription(java.lang.String description)
          Insert the method's description here.
 void setDsId(java.lang.Object dsId)
           
static void setEditingTemplateData(java.lang.Object dsId, VDBTemplate editingTemplateData)
          Sets the editingTemplateData.
 void setLocalView(ViewState newLocalView)
          Insert the method's description here.
 void setLookupTable(java.util.Hashtable lookupTable)
          Sets the lookupTable.
 void setName(java.lang.String newName)
          Insert the method's description here.
 void setNamePrefix(java.lang.String newNamePrefix)
          Insert the method's description here.
static void setRoot(java.lang.Object dsId, Group newRoot)
           
static java.lang.String substractObjectName(java.lang.String name)
          Insert the method's description here.
static java.lang.String substractParentName(java.lang.String name)
          Insert the method's description here.
static java.lang.String substractRelativeName(java.lang.String groupName, java.lang.String objName)
          Insert the method's description here.
static java.lang.String substractToken(java.lang.String name)
          Insert the method's description here.
 void unconditionalValidateSubObjects(boolean flat)
          Insert the method's description here.
protected  void validate()
          Insert the method's description here.
 void validateSubObjects()
          Insert the method's description here.
 void writeObjects(java.io.DataOutputStream file, NamingContext renamer, boolean export)
          Insert the method's description here.
static void writeObjects(java.lang.Object dsId, java.util.Vector elements, java.io.DataOutputStream file, NamingContext renamer, boolean export)
          Insert the method's description here.
static void writeTemplateData(java.lang.Object dsId, java.io.DataOutputStream stream, NamingContext renamer)
          Insert the method's description here.
static void writeTemplateData(java.lang.Object dsId, java.io.DataOutputStream stream, NamingContext renamer, java.util.Vector allowedPortMacroSet)
           
 void writeVDCTObjects(java.io.DataOutputStream file, NamingContext renamer, boolean export)
          Insert the method's description here.
static void writeVDCTObjects(java.util.Vector elements, java.io.DataOutputStream file, NamingContext renamer, boolean export)
           
static void writeVDCTObjects(java.util.Vector elements, java.io.Writer writer, NamingContext renamer, boolean export)
          Insert the method's description here.
 void writeVDCTObjects(java.io.Writer writer, NamingContext renamer, boolean export)
           
 
Methods inherited from class com.cosylab.vdct.graphics.objects.ContainerObject
addSubObject, clear, containsObject, getRootContainer, getSubObjects, getSubObjectsV, updateFields
 
Methods inherited from class com.cosylab.vdct.graphics.objects.VisibleObject
forceValidation, getColor, getFont, getHeight, getLabel, getLeftOffset, getMarkedX, getMarkedY, getMoveInsideView, getParent, getRheight, getRightOffset, getRlabelX, getRlabelY, getRscale, getRwidth, getRx, getRy, getScale, getTopOffset, getVisibleColor, getWidth, getX, getY, intersects, intersects, 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.objects.Flexible
toString
 

Field Detail

dsId

protected java.lang.Object dsId

name

protected java.lang.String name

namePrefix

protected java.lang.String namePrefix

disposed

protected boolean disposed

structure

protected java.util.Vector structure
Constructor Detail

Group

public Group(ContainerObject parent)
Group constructor comment.

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

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

addSubObject

public void addSubObject(java.lang.String id,
                         VisibleObject object)
Insert the method's description here. Creation date: (21.12.2000 20:30:04)

Overrides:
addSubObject in class ContainerObject
Parameters:
id - java.lang.String
object - com.cosylab.vdct.graphics.objects.VisibleObject

addSubObject

public void addSubObject(java.lang.String id,
                         VisibleObject object,
                         boolean create)
Insert the method's description here. IDs are relative Creation date: (28.1.2001 17:10:46)

Overrides:
addSubObject in class ContainerObject
Parameters:
id - java.lang.String
object - com.cosylab.vdct.graphics.objects.VisibleObject
create - boolean

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:39)

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

createGroup

public static Group createGroup(java.lang.Object dsId,
                                java.lang.String name)
Insert the method's description here. IDs are relative Creation date: (28.1.2001 17:10:46)

Parameters:
name - java.lang.String

destroy

public void destroy()
Insert the method's description here. Creation date: (4.2.2001 16:23:37)

Overrides:
destroy in class VisibleObject

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

findObject

public java.lang.Object findObject(java.lang.String objectName,
                                   boolean deep)
Insert the method's description here. Creation date: (28.1.2001 11:13:31)

Parameters:
objectName - java.lang.String
deep - boolean
Returns:
com.cosylab.vdct.graphics.objects.Record

fixLinks

public void fixLinks(boolean deep)
This method has to be called to fix links after move, copy... Creation date: (30.1.2001 11:37:45)

Parameters:
deep - boolean

getAbsoluteName

public java.lang.String getAbsoluteName()
Insert the method's description here. Creation date: (21.12.2000 20:52:35)

Returns:
java.lang.String

getClipboard

public static Group getClipboard()
Insert the method's description here. Creation date: (5.2.2001 14:42:24)

Returns:
com.cosylab.vdct.graphics.objects.Group

getDescription

public java.lang.String getDescription()
Insert the method's description here. Creation date: (24.4.2001 17:41:21)

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:17:13)

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:42:04)

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

getLocalView

public ViewState getLocalView()
Insert the method's description here. Creation date: (3.5.2001 13:28:45)

Returns:
com.cosylab.vdct.graphics.ViewState

getName

public java.lang.String getName()
Insert the method's description here. Creation date: (21.12.2000 20:51:29)

Returns:
java.lang.String

getNamePrefix

public java.lang.String getNamePrefix()
Insert the method's description here. Creation date: (21.12.2000 20:51:29)

Returns:
java.lang.String

getRoot

public static Group getRoot()
Returns the root group currently displayed by active drawing surface, or null in there are no drawing surfaces open. Creation date: (28.1.2001 11:32:14)

Returns:
com.cosylab.vdct.graphics.objects.Group

getSubObject

public java.lang.Object getSubObject(java.lang.String id)
Insert the method's description here. Creation date: (28.1.2001 16:54:17)

Overrides:
getSubObject in class ContainerObject
Parameters:
id - java.lang.String
Returns:
java.lang.Object

hasTokens

public static boolean hasTokens(java.lang.String name)
Insert the method's description here. Creation date: (28.1.2001 11:50:26)

Parameters:
name - java.lang.String
Returns:
boolean

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.vdct.graphics.object.VisibleObject

initializeLayout

public void initializeLayout()
Insert the method's description here. Creation date: (1.2.2001 14:09:39)


manageLinks

public void manageLinks(boolean deep)
Insert the method's description here. Creation date: (30.1.2001 11:37:45)

Parameters:
deep - 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

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:39)

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

paintComponents

public void paintComponents(java.awt.Graphics g,
                            boolean hilited)
Insert the method's description here. Creation date: (21.12.2000 21:58:56)

Parameters:
g - java.awt.Graphics
hilited - boolean

paintComponents

public void paintComponents(java.awt.Graphics g,
                            boolean hilited,
                            boolean flatten)
Insert the method's description here. Creation date: (21.12.2000 21:58:56)

Parameters:
g - java.awt.Graphics
hilited - boolean

removeObject

public java.lang.Object removeObject(java.lang.String id)
Insert the method's description here. Creation date: (21.12.2000 20:32:49)

Overrides:
removeObject in class ContainerObject
Parameters:
id - java.lang.String
Returns:
java.lang.Object

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:42)

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

revalidatePosition

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

Specified by:
revalidatePosition in class VisibleObject

selectAllComponents

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

Returns:
boolean

selectComponentsCheck

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

Parameters:
x1 - int
y1 - int
x2 - int
y2 - int
Returns:
boolean anyNew

setAbsoluteName

public void setAbsoluteName(java.lang.String absoluteName)
Insert the method's description here. Creation date: (28.1.2001 11:43:27)

Parameters:
absoluteName - java.lang.String

setDescription

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

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

setLocalView

public void setLocalView(ViewState newLocalView)
Insert the method's description here. Creation date: (3.5.2001 13:28:45)

Parameters:
newLocalView - com.cosylab.vdct.graphics.ViewState

setName

public void setName(java.lang.String newName)
Insert the method's description here. Creation date: (21.12.2000 20:51:29)

Parameters:
newName - java.lang.String

setNamePrefix

public void setNamePrefix(java.lang.String newNamePrefix)
Insert the method's description here. Creation date: (21.12.2000 20:51:29)

Parameters:
newNamePrefix - java.lang.String

setRoot

public static void setRoot(java.lang.Object dsId,
                           Group newRoot)

substractObjectName

public static java.lang.String substractObjectName(java.lang.String name)
Insert the method's description here. Creation date: (28.1.2001 18:15:47)

Parameters:
name - java.lang.String
Returns:
java.lang.String

substractParentName

public static java.lang.String substractParentName(java.lang.String name)
Insert the method's description here. Creation date: (28.1.2001 18:15:47)

Parameters:
name - java.lang.String
Returns:
java.lang.String

substractRelativeName

public static java.lang.String substractRelativeName(java.lang.String groupName,
                                                     java.lang.String objName)
Insert the method's description here. Creation date: (28.1.2001 11:36:31)


substractToken

public static java.lang.String substractToken(java.lang.String name)
Insert the method's description here. Creation date: (28.1.2001 11:49:56)

Parameters:
name - java.lang.String
Returns:
java.lang.String

unconditionalValidateSubObjects

public void unconditionalValidateSubObjects(boolean flat)
Insert the method's description here. Creation date: (26.1.2001 17:19:47)


validate

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

Specified by:
validate in class VisibleObject

validateSubObjects

public void validateSubObjects()
Insert the method's description here. Creation date: (26.1.2001 17:19:47)


writeObjects

public void writeObjects(java.io.DataOutputStream file,
                         NamingContext renamer,
                         boolean export)
                  throws java.io.IOException
Insert the method's description here. Creation date: (22.4.2001 21:51:25)

Specified by:
writeObjects in interface SaveInterface
Parameters:
file - java.io.DataOutputStream
path2remove - java.lang.String
Throws:
java.io.IOException - The exception description.

writeObjects

public static void writeObjects(java.lang.Object dsId,
                                java.util.Vector elements,
                                java.io.DataOutputStream file,
                                NamingContext renamer,
                                boolean export)
                         throws java.io.IOException
Insert the method's description here. Creation date: (22.4.2001 21:51:25)

Parameters:
file - java.io.DataOutputStream
Throws:
java.io.IOException - The exception description.

getVDCTData

public static java.lang.String getVDCTData(java.lang.Object dsId)

writeVDCTObjects

public void writeVDCTObjects(java.io.DataOutputStream file,
                             NamingContext renamer,
                             boolean export)
                      throws java.io.IOException
Insert the method's description here. Creation date: (22.4.2001 21:51:25)

Specified by:
writeVDCTObjects in interface SaveInterface
Parameters:
file - java.io.DataOutputStream
path2remove - java.lang.String
Throws:
java.io.IOException - The exception description.

writeVDCTObjects

public void writeVDCTObjects(java.io.Writer writer,
                             NamingContext renamer,
                             boolean export)
                      throws java.io.IOException
Throws:
java.io.IOException

writeVDCTObjects

public static void writeVDCTObjects(java.util.Vector elements,
                                    java.io.DataOutputStream file,
                                    NamingContext renamer,
                                    boolean export)
                             throws java.io.IOException
Throws:
java.io.IOException

writeVDCTObjects

public static void writeVDCTObjects(java.util.Vector elements,
                                    java.io.Writer writer,
                                    NamingContext renamer,
                                    boolean export)
                             throws java.io.IOException
Insert the method's description here. Creation date: (22.4.2001 21:51:25)

Parameters:
writer - java.io.DataOutputStream
path2remove - java.lang.String
Throws:
java.io.IOException - The exception description.

writeTemplateData

public static void writeTemplateData(java.lang.Object dsId,
                                     java.io.DataOutputStream stream,
                                     NamingContext renamer)
                              throws java.io.IOException
Insert the method's description here.

Throws:
java.io.IOException

writeTemplateData

public static void writeTemplateData(java.lang.Object dsId,
                                     java.io.DataOutputStream stream,
                                     NamingContext renamer,
                                     java.util.Vector allowedPortMacroSet)
                              throws java.io.IOException
Throws:
java.io.IOException

save

public static void save(java.lang.Object dsId,
                        Group group2save,
                        java.io.File file,
                        boolean export)
                 throws java.io.IOException
Insert the method's description here.

Throws:
java.io.IOException

save

public static void save(java.lang.Object dsId,
                        Group group2save,
                        java.io.File file,
                        NamingContext renamer,
                        boolean export)
                 throws java.io.IOException
Insert the method's description here.

Throws:
java.io.IOException

getLookupTable

public java.util.Hashtable getLookupTable()
Returns the lookupTable.

Returns:
Hashtable

setLookupTable

public void setLookupTable(java.util.Hashtable lookupTable)
Sets the lookupTable.

Parameters:
lookupTable - The lookupTable to set

getEditingTemplateData

public static VDBTemplate getEditingTemplateData(java.lang.Object dsId)
Returns the editingTemplateData.

Returns:
VDBTemplate

setEditingTemplateData

public static void setEditingTemplateData(java.lang.Object dsId,
                                          VDBTemplate editingTemplateData)
Sets the editingTemplateData.

Parameters:
editingTemplateData - The editingTemplateData to set

hasMacroPortsIDChanged

public static boolean hasMacroPortsIDChanged(java.lang.Object dsId)

getStructure

public java.util.Vector getStructure()
Returns the structure.

Returns:
Vector

getAbsoulteWidth

public int getAbsoulteWidth()

getAbsoulteHeight

public int getAbsoulteHeight()

generateMacros

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

reset

public void reset()
Resets certain parameters of the subobjects (validationsCounter in Record).

Parameters:
settingsChanged - flag whether this method was invoked when settings (settings dialog) were changed

getRoot

public static Group getRoot(java.lang.Object id)

getAllRoots

public static java.util.Vector getAllRoots()

getDsId

public java.lang.Object getDsId()
Overrides:
getDsId in class VisibleObject

setDsId

public void setDsId(java.lang.Object dsId)

isDisposed

public boolean isDisposed()

registerDsListener

public static void registerDsListener()

onDsAdded

public void onDsAdded(java.lang.Object id)
Specified by:
onDsAdded in interface DsEventListener

onDsRemoved

public void onDsRemoved(java.lang.Object id)
Specified by:
onDsRemoved in interface DsEventListener

onDsFocused

public void onDsFocused(java.lang.Object id)
Specified by:
onDsFocused in interface DsEventListener