net.claribole.zgrviewer.dot
Class SubRecord

java.lang.Object
  extended bynet.claribole.zgrviewer.dot.Node
      extended bynet.claribole.zgrviewer.dot.CommonNode
          extended bynet.claribole.zgrviewer.dot.Record
              extended bynet.claribole.zgrviewer.dot.SubRecord

public class SubRecord
extends net.claribole.zgrviewer.dot.Record

Part of a Record, may also be considered as a node as it can point or be pointed with an edge

Author:
Eric Mounhem

Field Summary
 Rectangle rect
           
protected  SubRecord[] subRecords
          List of the Record's elemnts that can be used on edges' start and ending nodes
 
Constructor Summary
SubRecord(java.lang.Object root, java.lang.String id, net.claribole.zgrviewer.dot.Record directParentRecord)
          Create a SubRecord
 
Method Summary
 void addRectangle(Rectangle rect)
          Add a new Rectangle to the rects' list
 void addSubRecord(SubRecord subRecord)
          Add a new SubRecord to the subRecord's list
protected  void changeOption(java.lang.String name, java.lang.String value)
           
 boolean isRounded()
           
protected  java.lang.String nodeOptions()
          Write node options
protected  java.lang.String printRecordLabel()
          Write a record's label
protected  java.lang.String printShapeOption()
          Write the shape of a record
 void removeRectangle(Rectangle rect)
          Remove a Rectangle from the rects' list
 void removeSubRecord(SubRecord subRecord)
          Remove a SubRecord from the subRecord's list
 void setRounded(boolean rounded)
           
 java.lang.String toString()
           
 
Methods inherited from class net.claribole.zgrviewer.dot.Node
addInEdge, addOutEdge, getIn, getOut, getRootGraph, printOption, printOption, printOption, printOption, removeInEdge, removeOutEdge
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

rect

public Rectangle rect

subRecords

protected SubRecord[] subRecords
List of the Record's elemnts that can be used on edges' start and ending nodes

Constructor Detail

SubRecord

public SubRecord(java.lang.Object root,
                 java.lang.String id,
                 net.claribole.zgrviewer.dot.Record directParentRecord)
          throws java.lang.Exception
Create a SubRecord

Parameters:
root - root of the graph
id - identificator of the subRecord
directParentRecord - direct Record on top of the new one
Throws:
java.lang.Exception
Method Detail

addSubRecord

public void addSubRecord(SubRecord subRecord)
Add a new SubRecord to the subRecord's list

Parameters:
subRecord - SubRecord to add

addRectangle

public void addRectangle(Rectangle rect)
Add a new Rectangle to the rects' list

Parameters:
rect - Rectangle to add

removeSubRecord

public void removeSubRecord(SubRecord subRecord)
Remove a SubRecord from the subRecord's list

Parameters:
subRecord - SubRecord to remove

removeRectangle

public void removeRectangle(Rectangle rect)
Remove a Rectangle from the rects' list

Parameters:
rect - Rectangle to remove

isRounded

public boolean isRounded()
Returns:
Returns the rounded attribute.

setRounded

public void setRounded(boolean rounded)
Parameters:
rounded - The rounded value to set.

changeOption

protected void changeOption(java.lang.String name,
                            java.lang.String value)

toString

public java.lang.String toString()
Overrides:
toString in class Node
See Also:
Node.toString()

nodeOptions

protected java.lang.String nodeOptions()
Description copied from class: Node
Write node options

See Also:
CommonNode.nodeOptions()

printShapeOption

protected java.lang.String printShapeOption()
Write the shape of a record

Returns:
Correct record' shape option line

printRecordLabel

protected java.lang.String printRecordLabel()
Write a record's label

Returns:
A record's label with the GraphViz syntax


Copyright © 2004-2005 INRIA. All Rights Reserved
Licensed under the GNU LGPL. For full terms see the file COPYING.