com.mindfusion.diagramming
Class TableNode

java.lang.Object
  extended by com.mindfusion.diagramming.DiagramItem
      extended by com.mindfusion.diagramming.DiagramNode
          extended by com.mindfusion.diagramming.TableNode
All Implemented Interfaces:
InplaceEditable, java.io.Externalizable, java.io.Serializable

public class TableNode
extends DiagramNode

Tables are diagram nodes that can contain multiple cells and can be related to other nodes through their rows.

Links can link either to table rows or to the table as an integral node. Use the setConnectionStyle(int) method to specify whether links drawn by the user should be connected to the table rows or to the table itself.

Tables consist of Cell instances distributed across rows and columns. The number of rows and columns can be set via the setRowCount(int) and setColumnCount(int) methods. The default width of the table columns is specified through setColumnWidth(float) and the default height of the rows through setRowHeight(float). Cells can be made to span several rows and columns via their Cell.setRowSpan(int) and Cell.setColumnSpan(int) methods.

Rows can be assigned to distinct sections of the table. Each section can be collapsed or expanded, hiding or showing all rows in the section except the header one. To define a section, call the Row.setHeader(boolean) method. A section consists of all rows after a header row and spans to the next header. Each header row displays a +/- mouseButton that allows expanding or collapsing the section interactively. The mouseButton appears either on the left of the first cell of a header row or in a separate column, as specified through the setOffsetHeaderRows(boolean) method. Sections can be collapsed or expanded programmatically using the Row.setExpanded(boolean) method of their header rows.

The structure of a table can be changed dynamically by adding and deleting rows and columns. This can be done with the addColumn() and addRow() methods as well with the insertColumn(int), insertRow(int) and redimTable(int, int) methods. Use the deleteRow(int) and deleteColumn(int) methods to delete existing rows and columns.

Tables have a caption text, which is set via the setCaption(java.lang.String) method. The height of the caption and the alignment of the text are specified via the setCaptionHeight(float) and setCaptionFormat(com.mindfusion.diagramming.TextFormat) methods. To get even richer text formatting, call setEnableStyledText(boolean) and embed HTML-like formatting tags in the caption.

In order to set an image as tables background, call the setImage(java.awt.Image) method. The alignment of the image in relation to the tables rectangle is set via the setImageAlign(int) method. The table can be resized to fit the size of its image by calling the resizeToFitImage() method.

Tow rows and columns of a table can be accessed through the getRows() and getColumns() methods. The getCell(int, int) method lets you access individual table cells.

See Also:
Serialized Form

Field Summary
 
Fields inherited from class com.mindfusion.diagramming.DiagramNode
allowIncomingLinks, allowOutgoingLinks, anchorPattern, AV_Cancel, AV_EndModIncoming, AV_EndModOutgoing, AV_StartModIncoming, AV_StartModOutgoing, AV_UpdateIncoming, AV_UpdateOutgoing, AV_UpdIntscIncoming, AV_UpdIntscOutgoing, AV_UpdPosIncoming, AV_UpdPosOutgoing, bounds, enabledHandles, handlesStyle, incomingLinks, masterGroup, obstacle, outgoingLinks, savedBounds
 
Fields inherited from class com.mindfusion.diagramming.DiagramItem
brush, cycleDetected, cycleProtect, font, hyperLink, ignoreLayout, locked, modifyDX, modifyDY, modifyHandle, modifying, pen, printable, ptEnd, ptMdfLast, ptOrg, ptSavedEnd, ptSavedOrg, selected, shadowColor, shadowOffsetX, shadowOffsetY, subordinateGroup, tag, toolTip, visible, zIndex
 
Constructor Summary
TableNode()
          Initializes a new instance of the TableNode class.
TableNode(Diagram parent)
          Initializes a new instance of the TableNode class by setting is properties to the default values set in the specified diagram.
TableNode(TableNode prototype)
          Initializes a new instance of the TableNode class by copying the attributes of the specified prototype table.
 
Method Summary
 int addColumn()
          Appends a new column to this table.
 DiagramLink addRelation(int row, int rel, TableNode table, int relRow)
          Creates a new DiagramLink related to this table.
 int addRow()
          Adds a row to the table.
 boolean cellFromPoint(java.awt.geom.Point2D point, java.awt.Point cellPos)
          Returns the row and column indices of the cell located at the specified point, taking into consideration the cells span.
protected  com.mindfusion.diagramming.ConnectionPoint createConnectionPoint(DiagramLink link, java.awt.geom.Point2D pt, boolean incoming)
           
protected  DiagramItemProperties createProperties()
          DiagramItem.createProperties() override.
 void deleteColumn(int col)
          Deletes the specified column.
 void deleteRow(int row)
          Deletes the specified row from the table.
protected  void draw(java.awt.Graphics2D g, RenderOptions options)
           
protected  void drawShadow(java.awt.Graphics2D g, RenderOptions options)
           
 java.lang.String getCaption()
          Gets the caption text of a table.
 java.awt.Color getCaptionColor()
          Gets the color of the caption text.
 TextFormat getCaptionFormat()
          Gets a TextFormat object specifying how to format and align the caption text.
 float getCaptionHeight()
          Gets the height of the caption area of the table.
 java.lang.String getCaptionPlainText()
          Gets the plain text extracted from the formatted caption text by removing the formatting tags.
 Cell getCell(int column, int row)
          Gets the cell at the specified row and column.
 int getCellFrameStyle()
          Gets the style of the cell frame lines.
 int getColumnCount()
          Gets the number of columns of this table.
 ColumnList getColumns()
          Gets a list of all columns in the table.
 float getColumnWidth()
          Gets the initial width of the columns of this table.
 int getConnectionStyle()
          Gets a value indicating whether links should connect to the rows of this table or to the table as an integral entity.
 int getCurrentRow()
          Gets the index of the current scroll row.
 java.awt.geom.Rectangle2D getEditRect(java.awt.geom.Point2D mousePosition)
           
 boolean getEnableStyledText()
          Gets a value indicating whether the text displayed inside a table contains formatting tags which should be processed by JDiagram.
 java.awt.Font getFont()
          Gets the font used to draw the text displayed in this table.
 java.awt.Image getImage()
          Gets the image displayed inside this table.
 int getImageAlign()
          Gets the alignment of the table image relative to the boundaries of the table.
 boolean getOffsetHeaderRows()
          Gets a value indicating whether the table cells are offset to the right to accommodate for the expand buttons displayed inside header rows.
 AnchorPattern getRowAnchorPattern()
          Gets the default row AnchorPattern.
 int getRowCount()
          Gets the number of rows of this table.
 float getRowHeight()
          Gets the initial height of the rows of this table.
 RowList getRows()
          Gets a list of all rows in the table.
 boolean getScrollable()
          Gets a value indicating whether users are allowed to scroll the table.
 int getStyle()
          Gets the shape of this table.
 java.awt.Color getTextColor()
          Gets the color used to draw the cells' text in this table.
 java.lang.String getTextToEdit()
           
 void insertColumn(int col)
          Inserts a new column at the specified position.
 void insertRow(int row)
          Inserts a row in the table.
protected  void loadFromXml(org.w3c.dom.Element xmlElement, XmlPersistContext context)
          Loads the item content from an XML element.
protected  void onUpdateBounds()
          Invoked when the bounding rectangle of the node has changed.
 void readExternal(java.io.ObjectInput in)
          Implements Externalizable.
 void redimTable(int cols, int rows)
          Sets the number of rows and columns.
 void renderText(java.lang.String text, java.awt.geom.Rectangle2D dest, com.mindfusion.diagramming.DrawTextHint hint)
           
 void resizeToFitImage()
          Resizes a table so that it will be as big as the image displayed in the table.
 void resizeToFitText(boolean ignoreCaption)
          Resizes the columns and rows so that the cells are large enough to fit their text.
protected  void restoreProperties(DiagramItemProperties props)
          DiagramItem.restoreProperties(com.mindfusion.diagramming.DiagramItemProperties) override.
protected  void saveProperties(DiagramItemProperties props)
          DiagramItem.saveProperties(com.mindfusion.diagramming.DiagramItemProperties) override.
protected  void saveToXml(org.w3c.dom.Element xmlElement, XmlPersistContext context)
          Saves the item content into an XML element.
 void setCaption(java.lang.String value)
          Sets the caption text of a table.
 void setCaptionColor(java.awt.Color value)
          Sets the color of the caption text.
 void setCaptionFormat(TextFormat value)
          Sets a TextFormat object specifying how to format and align the caption text.
 void setCaptionHeight(float value)
          Sets the height of the caption area of the table.
 void setCellFrameStyle(int value)
          Sets the style of the cell frame lines.
 void setColumnCount(int value)
          Sets the number of columns of this table.
 void setColumnWidth(float value)
          Sets the initial width of the columns of this table.
 void setConnectionStyle(int value)
          Sets a value indicating whether links should connect to the rows of this table or to the table as an integral entity.
 void setCurrentRow(int value)
          Scrolls the table to the specified row.
 void setEditedText(java.lang.String newText)
           
 void setEnableStyledText(boolean value)
          Sets a value indicating whether the text displayed inside a table contains formatting tags which should be processed by JDiagram.
 void setFont(java.awt.Font value)
          Sets the font used to draw the text displayed in this table.
 void setImage(java.awt.Image value)
          Sets the image that should be displayed inside this table.
 void setImageAlign(int value)
          Sets the alignment of the table image relative to the boundaries of the table.
 void setOffsetHeaderRows(boolean value)
          Sets a value indicating whether the table cells should be offset to the right to accommodate for the expand buttons displayed inside header rows.
protected  void setReflexive(DiagramLink link)
          Invoked to let a node set the shape of a reflexive link connected to it.
 void setRowAnchorPattern(AnchorPattern value)
          Sets the default row AnchorPattern.
 void setRowCount(int value)
          Sets the number of rows of this table.
 void setRowHeight(float value)
          Sets the initial height of the rows of this table.
 void setScrollable(boolean value)
          Sets a value indicating whether users are allowed to scroll the table.
 void setStyle(int value)
          Sets the shape of this table.
 void setTextColor(java.awt.Color value)
          Sets the color used to draw the text in this table.
 void writeExternal(java.io.ObjectOutput out)
          Implements Externalizable.
 
Methods inherited from class com.mindfusion.diagramming.DiagramNode
allowCreate, allowModify, attachTo, attachTo, attachTo, cancelModify, completeCreate, completeModify, constraintsInfringed, containsPoint, containsPoint, createState, detach, getAllowIncomingLinks, getAllowOutgoingLinks, getAnchorPattern, getBounds, getConstraints, getEnabledHandles, getExpandable, getExpanded, getHandlesStyle, getIncomingLinks, getMasterGroup, getObstacle, getOutgoingLinks, groupContains, move, moveTo, nodesIntersect, onDragOut, onDragOver, onDropOver, onRemove, putExpandable, rectFromPoints, resize, resizeToFitImage, restoreState, saveState, setAllowIncomingLinks, setAllowOutgoingLinks, setAnchorPattern, setBounds, setBounds, setConstraints, setEnabledHandles, setExpandable, setExpanded, setExpandedFlag, setHandlesStyle, setObstacle, shouldRenderAnchors, startCreate, startModify, updateCreate, updateLinkPositions, updateModify
 
Methods inherited from class com.mindfusion.diagramming.DiagramItem
clone, getBrush, getHyperLink, getIgnoreLayout, getLayoutTraits, getLocked, getMeasureUnit, getParent, getPen, getPrintable, getSelected, getShadowColor, getShadowOffsetX, getShadowOffsetY, getSubordinateGroup, getTag, getToolTip, getVisible, getWeight, getZIndex, hasSubordinates, onAdd, onChangeFont, onChildModified, onClick, onDoubleClick, onModify, putSelected, repaint, repaint, repaint, setBrush, setDiagramDirty, setHyperLink, setIgnoreLayout, setLocked, setPen, setPrintable, setSelected, setShadowColor, setShadowOffsetX, setShadowOffsetY, setTag, setToolTip, setVisible, setWeight, setZIndex, shouldRender, zBottom, zLevelDown, zLevelUp, zTop
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TableNode

public TableNode()
Initializes a new instance of the TableNode class.


TableNode

public TableNode(Diagram parent)
Initializes a new instance of the TableNode class by setting is properties to the default values set in the specified diagram.

Parameters:
parent - A Diagram instance whose default table attributes are copied to this table.

TableNode

public TableNode(TableNode prototype)
Initializes a new instance of the TableNode class by copying the attributes of the specified prototype table.

Parameters:
prototype - A TableNode instance whose attributes are copied to this table.
Method Detail

getCell

public Cell getCell(int column,
                    int row)
Gets the cell at the specified row and column.

Parameters:
column - An integer value specifying the column index.
row - An integer value specifying the row index.
Returns:
A Cell object representing the specified cell.

getRows

public RowList getRows()
Gets a list of all rows in the table.

Returns:
A RowList containing the table rows.

getColumns

public ColumnList getColumns()
Gets a list of all columns in the table.

Returns:
A ColumnList containing the table columns.

getCurrentRow

public int getCurrentRow()
Gets the index of the current scroll row.

Returns:
An integer value specifying the index of the top-most visible row in a table.

setCurrentRow

public void setCurrentRow(int value)
Scrolls the table to the specified row.

Parameters:
value - An integer value specifying the index of the row that should be scrolled to the top of the table.

getOffsetHeaderRows

public boolean getOffsetHeaderRows()
Gets a value indicating whether the table cells are offset to the right to accommodate for the expand buttons displayed inside header rows.

Returns:
true if table cells are offset to the right, otherwise false.

setOffsetHeaderRows

public void setOffsetHeaderRows(boolean value)
Sets a value indicating whether the table cells should be offset to the right to accommodate for the expand buttons displayed inside header rows.

Parameters:
value - true if table cells should be offset to the right, otherwise false.

getScrollable

public boolean getScrollable()
Gets a value indicating whether users are allowed to scroll the table.

Returns:
true if users are allowed to scroll the table, otherwise false.

setScrollable

public void setScrollable(boolean value)
Sets a value indicating whether users are allowed to scroll the table.

Parameters:
value - true if users are allowed to scroll the table, otherwise false.

getCaptionPlainText

public java.lang.String getCaptionPlainText()
Gets the plain text extracted from the formatted caption text by removing the formatting tags.

Returns:
A String containing the caption text stripped from any formatting tags.

getFont

public java.awt.Font getFont()
Gets the font used to draw the text displayed in this table.

Overrides:
getFont in class DiagramItem
Returns:
A Font object representing the table font.

setFont

public void setFont(java.awt.Font value)
Sets the font used to draw the text displayed in this table.

Overrides:
setFont in class DiagramItem
Parameters:
value - A Font object representing the table font.

getEnableStyledText

public boolean getEnableStyledText()
Gets a value indicating whether the text displayed inside a table contains formatting tags which should be processed by JDiagram.

Returns:
true if JDiagram should process formatting tags when rendering text in this table, otherwise false.

setEnableStyledText

public void setEnableStyledText(boolean value)
Sets a value indicating whether the text displayed inside a table contains formatting tags which should be processed by JDiagram.

Parameters:
value - true if JDiagram should process formatting tags when rendering text in this table, otherwise false.

renderText

public void renderText(java.lang.String text,
                       java.awt.geom.Rectangle2D dest,
                       com.mindfusion.diagramming.DrawTextHint hint)

getImage

public java.awt.Image getImage()
Gets the image displayed inside this table.

Returns:
A java.awt.Image object.

setImage

public void setImage(java.awt.Image value)
Sets the image that should be displayed inside this table.

Parameters:
value - A java.awt.Image object.

getImageAlign

public int getImageAlign()
Gets the alignment of the table image relative to the boundaries of the table.

Returns:
One of the ImageAlign constants.

setImageAlign

public void setImageAlign(int value)
Sets the alignment of the table image relative to the boundaries of the table.

Parameters:
value - One of the ImageAlign constants.

getCaption

public java.lang.String getCaption()
Gets the caption text of a table.

Returns:
A String object containing the caption text.

setCaption

public void setCaption(java.lang.String value)
Sets the caption text of a table.

Parameters:
value - A String object containing the caption text.

getCaptionColor

public java.awt.Color getCaptionColor()
Gets the color of the caption text.

Returns:
A Color object representing the color of the caption text.

setCaptionColor

public void setCaptionColor(java.awt.Color value)
Sets the color of the caption text.

Parameters:
value - A Color object representing the color of the caption text.

getCaptionFormat

public TextFormat getCaptionFormat()
Gets a TextFormat object specifying how to format and align the caption text.

Returns:
A TextFormat object specifying the caption format and alignment.

setCaptionFormat

public void setCaptionFormat(TextFormat value)
Sets a TextFormat object specifying how to format and align the caption text.

Parameters:
value - A TextFormat object specifying the caption format and alignment.

getCaptionHeight

public float getCaptionHeight()
Gets the height of the caption area of the table.

Returns:
A float value specifying the height of the table caption area.

setCaptionHeight

public void setCaptionHeight(float value)
Sets the height of the caption area of the table.

Parameters:
value - A float value specifying the height of the table caption area.

getColumnCount

public int getColumnCount()
Gets the number of columns of this table.

Returns:
An integer value specifying the number of columns in this table.

setColumnCount

public void setColumnCount(int value)
Sets the number of columns of this table.

Parameters:
value - An integer value specifying the number of columns in this table.

getRowCount

public int getRowCount()
Gets the number of rows of this table.

Returns:
An integer value specifying the number of rows in this table.

setRowCount

public void setRowCount(int value)
Sets the number of rows of this table.

Parameters:
value - An integer value specifying the number of rows in this table.

getCellFrameStyle

public int getCellFrameStyle()
Gets the style of the cell frame lines.

Returns:
One of the CellFrameStyle constants.

setCellFrameStyle

public void setCellFrameStyle(int value)
Sets the style of the cell frame lines.

Parameters:
value - One of the CellFrameStyle constants.

getColumnWidth

public float getColumnWidth()
Gets the initial width of the columns of this table.

Returns:
A float value specifying the initial width of columns added to this table.

setColumnWidth

public void setColumnWidth(float value)
Sets the initial width of the columns of this table.

Parameters:
value - A float value specifying the initial width of columns added to this table.

getRowHeight

public float getRowHeight()
Gets the initial height of the rows of this table.

Returns:
A float value specifying the initial height of rows added to this table.

setRowHeight

public void setRowHeight(float value)
Sets the initial height of the rows of this table.

Parameters:
value - A float value specifying the initial height of rows added to this table.

addRelation

public DiagramLink addRelation(int row,
                               int rel,
                               TableNode table,
                               int relRow)
Creates a new DiagramLink related to this table.

Parameters:
row - Index of a row in this table.
rel - One of the Relationship constants.
table - The related table.
relRow - Index of a row in the related table.
Returns:
An DiagramLink object representing the new link.

resizeToFitImage

public void resizeToFitImage()
Resizes a table so that it will be as big as the image displayed in the table.


resizeToFitText

public void resizeToFitText(boolean ignoreCaption)
Resizes the columns and rows so that the cells are large enough to fit their text.

Parameters:
ignoreCaption - false if the caption bar should be resized too to fit the caption text; otherwise true.

addRow

public int addRow()
Adds a row to the table.

Returns:
An integer value specifying the index of the new row.

insertRow

public void insertRow(int row)
Inserts a row in the table.

Parameters:
row - The position where the new row should be inserted.

deleteRow

public void deleteRow(int row)
Deletes the specified row from the table.

Parameters:
row - Index of the row that should be deleted.

addColumn

public int addColumn()
Appends a new column to this table.

Returns:
An integer value specifying the index of the new column.

insertColumn

public void insertColumn(int col)
Inserts a new column at the specified position.

Parameters:
col - The position where the new column must be inserted.

deleteColumn

public void deleteColumn(int col)
Deletes the specified column.

Parameters:
col - Index of the column that must be deleted.

redimTable

public void redimTable(int cols,
                       int rows)
Sets the number of rows and columns.

Parameters:
cols - The new number of columns.
rows - The new number of rows.

onUpdateBounds

protected void onUpdateBounds()
Description copied from class: DiagramNode
Invoked when the bounding rectangle of the node has changed.

Overrides:
onUpdateBounds in class DiagramNode

getTextColor

public java.awt.Color getTextColor()
Gets the color used to draw the cells' text in this table.

Returns:
A Color object representing the text color.

setTextColor

public void setTextColor(java.awt.Color value)
Sets the color used to draw the text in this table.

Parameters:
value - A Color object representing the text color.

draw

protected void draw(java.awt.Graphics2D g,
                    RenderOptions options)
Specified by:
draw in class DiagramItem

drawShadow

protected void drawShadow(java.awt.Graphics2D g,
                          RenderOptions options)
Specified by:
drawShadow in class DiagramItem

createConnectionPoint

protected com.mindfusion.diagramming.ConnectionPoint createConnectionPoint(DiagramLink link,
                                                                           java.awt.geom.Point2D pt,
                                                                           boolean incoming)
Overrides:
createConnectionPoint in class DiagramNode

setReflexive

protected void setReflexive(DiagramLink link)
Invoked to let a node set the shape of a reflexive link connected to it.

Overrides:
setReflexive in class DiagramNode
Parameters:
link - Reference to the link.

cellFromPoint

public boolean cellFromPoint(java.awt.geom.Point2D point,
                             java.awt.Point cellPos)
Returns the row and column indices of the cell located at the specified point, taking into consideration the cells span.

Parameters:
point - The point to check.
cellPos - Receives the row and column indices if a cell is found at the specified position.
Returns:
true if a cell of this table contains the specified point; otherwise, false.

getTextToEdit

public java.lang.String getTextToEdit()
Specified by:
getTextToEdit in interface InplaceEditable

setEditedText

public void setEditedText(java.lang.String newText)
Specified by:
setEditedText in interface InplaceEditable

getEditRect

public java.awt.geom.Rectangle2D getEditRect(java.awt.geom.Point2D mousePosition)
Specified by:
getEditRect in interface InplaceEditable

getStyle

public int getStyle()
Gets the shape of this table.

Returns:
One of the TableStyle constants.

setStyle

public void setStyle(int value)
Sets the shape of this table.

Parameters:
value - One of the TableStyle constants.

getRowAnchorPattern

public AnchorPattern getRowAnchorPattern()
Gets the default row AnchorPattern.

Returns:
An AnchorPattern object representing the set of anchor points used when connecting links to the rows of this table.

setRowAnchorPattern

public void setRowAnchorPattern(AnchorPattern value)
Sets the default row AnchorPattern. A link is aligned to the points of this pattern if the row the link connects to doesn't have an AnchorPattern defined for it.

Parameters:
value - An AnchorPattern object representing the set of anchor points used when connecting links to the rows of this table.

getConnectionStyle

public int getConnectionStyle()
Gets a value indicating whether links should connect to the rows of this table or to the table as an integral entity.

Returns:
One of the TableConnectionStyle constants.

setConnectionStyle

public void setConnectionStyle(int value)
Sets a value indicating whether links should connect to the rows of this table or to the table as an integral entity.

Parameters:
value - One of the TableConnectionStyle constants.

createProperties

protected DiagramItemProperties createProperties()
DiagramItem.createProperties() override.

Overrides:
createProperties in class DiagramNode
Returns:
A DiagramItemProperties-derived object containing a snapshot of the item's properties.

saveProperties

protected void saveProperties(DiagramItemProperties props)
DiagramItem.saveProperties(com.mindfusion.diagramming.DiagramItemProperties) override.

Overrides:
saveProperties in class DiagramNode
Parameters:
props - A DiagramItemProperties-derived object where the item's properties should be saved.

restoreProperties

protected void restoreProperties(DiagramItemProperties props)
DiagramItem.restoreProperties(com.mindfusion.diagramming.DiagramItemProperties) override.

Overrides:
restoreProperties in class DiagramNode
Parameters:
props - A DiagramItemProperties -derived object containing a snapshot of the item's properties.

writeExternal

public void writeExternal(java.io.ObjectOutput out)
                   throws java.io.IOException
Implements Externalizable.

Specified by:
writeExternal in interface java.io.Externalizable
Overrides:
writeExternal in class DiagramNode
Throws:
java.io.IOException

readExternal

public void readExternal(java.io.ObjectInput in)
                  throws java.io.IOException,
                         java.lang.ClassNotFoundException
Implements Externalizable.

Specified by:
readExternal in interface java.io.Externalizable
Overrides:
readExternal in class DiagramNode
Throws:
java.io.IOException
java.lang.ClassNotFoundException

saveToXml

protected void saveToXml(org.w3c.dom.Element xmlElement,
                         XmlPersistContext context)
Description copied from class: DiagramItem
Saves the item content into an XML element.

Overrides:
saveToXml in class DiagramNode
Parameters:
xmlElement - An Element the item's data should be stored into.
context - An XmlPersistContext object providing contextual information about the serialization process and some helper serialization methods.

loadFromXml

protected void loadFromXml(org.w3c.dom.Element xmlElement,
                           XmlPersistContext context)
                    throws javax.xml.transform.TransformerException,
                           XmlException
Description copied from class: DiagramItem
Loads the item content from an XML element.

Overrides:
loadFromXml in class DiagramNode
Parameters:
xmlElement - An XmlElement containing the item's data.
context - An XmlPersistContext object providing contextual information about the serialization process and some helper serialization methods
Throws:
javax.xml.transform.TransformerException
XmlException