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