Class pmr.cml.XVARNode
All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class pmr.cml.XVARNode

java.lang.Object
   |
   +----pmr.sgml.SGMLNode
           |
           +----pmr.sgml.DrawableSGMLNode
                   |
                   +----pmr.cml.DrawableX_Node
                           |
                           +----pmr.cml.DataPrimitive
                                   |
                                   +----pmr.cml.XVARNode

public class XVARNode
extends DataPrimitive
Holds XVAR from CML
Author:
(C) P. Murray-Rust, 1996

Constructor Index

 o XVARNode(String, SGMLTree)

Method Index

 o childrenToString()
this is required as we have to deal with _PEL subnodes
 o createAndAdd(SGMLTree, int, Date)
create from a data entry as date and add to tree
 o createAndAdd(SGMLTree, int, double)
create from a data entry as float and add to tree
 o createAndAdd(SGMLTree, int, int)
create from a data entry as integer and add to tree
 o createAndAdd(SGMLTree, int, int, int, int, int, int, int)
create from a data entry as date and add to tree ; if hrs, sec are negative, they are ignored
 o createAndAdd(SGMLTree, int, String)
create from a data entry as string and add to tree
 o createAndAdd(SGMLTree, String, int, String)
create from a data entry as TYPE=type and add to tree
 o display()
Kicks off a ScrollableTopLevel which contains the object.
 o display(Graphics)
only for large chunks of text at present
 o displayAddress()
for an XVAR of ADDRESS, display it if possible
 o drawIcon(Graphics, int, int)
at some stage make this useful to subclasses
 o getDateValue()
note - if not a date, returns null
 o getFirstXVARChildhasAttval(SGMLNode, String, String)
get the first XVAR child of a node with given Attribute value OR NULL
 o getFirstXVARDescendantHasAttname(SGMLNode, String)
get the first XVAR descendant of a node with given Attribute name
 o getFirstXVARDescendantHasAttval(SGMLNode, String, String)
get the first XVAR descendant of a node with given Att value OR NULL
 o getFloatValue()
note - if not a float , returns 0
 o getIntegerValue()
note - if not an integer, returns 0
 o getStringValue()
note - if not a String , returns ""
 o mayContain(SGMLNode)
XVAR and ARRAY may node contain other nodes (except PEL).
 o process()
complex objects may require processing; override this.
 o setDisplayURLTOC(boolean)
do we display the URL target as a TOC or as the 'most important subobject'
 o setFloatValue(double)
 o setIntValue(int)
 o setStringValue(String)
 o showHelp()
display Help

Constructors

 o XVARNode
  public XVARNode(String giName,
                  SGMLTree tree)

Methods

 o createAndAdd
  public static int createAndAdd(SGMLTree tree,
                                 int parentIndex,
                                 int value)
create from a data entry as integer and add to tree
 o createAndAdd
  public static int createAndAdd(SGMLTree tree,
                                 int parentIndex,
                                 double value)
create from a data entry as float and add to tree
 o createAndAdd
  public static int createAndAdd(SGMLTree tree,
                                 int parentIndex,
                                 int year,
                                 int month,
                                 int day,
                                 int hrs,
                                 int min,
                                 int sec)
create from a data entry as date and add to tree ; if hrs, sec are negative, they are ignored
 o createAndAdd
  public static int createAndAdd(SGMLTree tree,
                                 int parentIndex,
                                 Date d)
create from a data entry as date and add to tree
 o createAndAdd
  public static int createAndAdd(SGMLTree tree,
                                 int parentIndex,
                                 String value)
create from a data entry as string and add to tree
 o createAndAdd
  public static int createAndAdd(SGMLTree tree,
                                 String type,
                                 int parentIndex,
                                 String value)
create from a data entry as TYPE=type and add to tree
 o setStringValue
  public void setStringValue(String s)
 o setIntValue
  public void setIntValue(int i)
 o setFloatValue
  public void setFloatValue(double f)
 o getIntegerValue
  public int getIntegerValue()
note - if not an integer, returns 0
 o getFloatValue
  public double getFloatValue()
note - if not a float , returns 0
 o getDateValue
  public Date getDateValue()
note - if not a date, returns null
 o getStringValue
  public String getStringValue()
note - if not a String , returns ""
 o getFirstXVARChildhasAttval
  public static XVARNode getFirstXVARChildhasAttval(SGMLNode parentNode,
                                                    String name,
                                                    String value)
get the first XVAR child of a node with given Attribute value OR NULL
 o getFirstXVARDescendantHasAttname
  public static XVARNode getFirstXVARDescendantHasAttname(SGMLNode parentNode,
                                                          String name)
get the first XVAR descendant of a node with given Attribute name
 o getFirstXVARDescendantHasAttval
  public static XVARNode getFirstXVARDescendantHasAttval(SGMLNode parentNode,
                                                         String name,
                                                         String value)
get the first XVAR descendant of a node with given Att value OR NULL
 o showHelp
  public void showHelp()
display Help
Overrides:
showHelp in class DrawableX_Node
 o mayContain
  public boolean mayContain(SGMLNode n)
XVAR and ARRAY may node contain other nodes (except PEL).
Overrides:
mayContain in class DataPrimitive
 o process
  public void process()
complex objects may require processing; override this.
Overrides:
process in class DrawableSGMLNode
 o displayAddress
  public void displayAddress()
for an XVAR of ADDRESS, display it if possible
 o setDisplayURLTOC
  public void setDisplayURLTOC(boolean b)
do we display the URL target as a TOC or as the 'most important subobject'
 o display
  public void display()
Kicks off a ScrollableTopLevel which contains the object.
Overrides:
display in class DrawableSGMLNode
 o display
  public void display(Graphics g)
only for large chunks of text at present
Overrides:
display in class DrawableX_Node
 o childrenToString
  public String childrenToString()
this is required as we have to deal with _PEL subnodes
Overrides:
childrenToString in class SGMLNode
 o drawIcon
  public int drawIcon(Graphics g,
                      int x,
                      int y)
at some stage make this useful to subclasses
Overrides:
drawIcon in class DataPrimitive

All Packages  Class Hierarchy  This Package  Previous  Next  Index