Class EDRTreeTableNode

All Implemented Interfaces:
TreeTableNode, Serializable, Cloneable, MutableTreeNode, TreeNode

public class EDRTreeTableNode extends DefaultTreeTableNode
EDRTreeTableNode displays a single node of a serialized EDR in a JTreeTable. It takes as input a W3C DOM Node object and a FieldMap object. The DOM node contains the serialzed EDR data that the node displays.

FieldMap: The serialized EDR format stores ids for field information. To display the actual field names, it is necessary to look them up in the provided FieldMap. The the fieldmap isn't in the fieldmap, its ID will be displayed.

Subclassing: EDRTreeTableNode is designed to be subclassed. Subclasses should override createNewNode() factory method. They can also override getFieldID(), getFieldName() and getFieldNodeValue() methods to provide customized processing.

Since:
6.5FP3
Author:
Max Spivak
See Also:
  • Field Details

    • mNode

      protected Node mNode
      W3C DOM node containing data to display
    • mFM

      protected EDRFieldMap mFM
      FieldMap reference
  • Constructor Details

    • EDRTreeTableNode

      public EDRTreeTableNode(Node node, EDRFieldMap fm)
      Create an EDRTreeTableNode.
      Parameters:
      node - W3C DOM Node object containing data to display
      fm - FieldMap that maps field ids to field names
  • Method Details

    • getValueAt

      public Object getValueAt(int columnIndex)
      Overrides superclass. Provides data to display.
      Specified by:
      getValueAt in interface TreeTableNode
      Overrides:
      getValueAt in class DefaultTreeTableNode
      Parameters:
      columnIndex - Value should be 0 or 1. Field name should be returned when columnIndex == 0. Field value should be returned for columnIndex 1.
    • getFieldValue

      protected String getFieldValue()
      Reads the actual node value and returns it. May be subclassed to override default behavior. For example, a subclass can check if values have been updated and return those.
    • getFieldName

      protected String getFieldName()
      Retrieves field name from FieldMap. Returns fully-qualified field name.
    • getFieldID

      protected String getFieldID()
      Retrieves id representing field name from the DOM node.
    • createNewNode

      protected EDRTreeTableNode createNewNode(Node node, EDRFieldMap fm)
      Factory method to create a new node. Called primarily when creating nodes to display contents of a composite field. May be overridden to create subclassed nodes for specialized processing.
      Parameters:
      node - W3C DOM Node object containing data to display
      fm - FieldMap that maps field ids to field names