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

Class pmr.cml.TERMENTRYNode

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

public class TERMENTRYNode
extends DrawableX_Node
a glossary entry - not yet completed
Author:
copyright P.Murray-Rust, 1996

Constructor Index

 o TERMENTRYNode(String, SGMLTree)

Method Index

 o action(Event, Object)
pass any button actions to the object
 o addSubordinateTerm(TERMENTRYNode)
add subordinate class.
 o addSuperordinateTerm(TERMENTRYNode)
add superordinate class.
 o addURL(String, String, String)
add a URL (e.g.
 o createADMINNode()
 o createAndAdd(SGMLTree, int, String)
 o createTERMENTRYNode(CMLTree, String)
standalone TERMENTRYNode (i.e.
 o debug()
for debug
 o display()
Kicks off a ScrollableTopLevel which contains the object.
 o display(Graphics)
called from the display() routine of DrawableX_Node
 o drawIcon(Graphics, int, int)
draw a CML icon
 o getDefinition()
TERMENTRYs *may* have a DEFINITION (which can contain HTML)
 o getID()
all TERMENTRYs *must* have an ID (without spaces or dubious punctuation); any attempt to alter ID once set will fail
 o getKeywords()
TERMENTRYs usually have keywords (ideally taken from ISO 12620); some may be repeated (e.g.
 o getKeywordsWithName(String)
get values of all the keywords with a given name (e.g.
 o getOwner()
TERMENTRYs *may* have an Owner/Title
 o getTerm()
all TERMENTRYs *must* have a TERM (which can have any punctuation, but is case-sensitive).
 o getTitle()
get title from TITLE, DICTNAME, BUILTIN if present, else TITLE
 o mayContain(SGMLNode)
can this node contain others.
 o mouseUp(Event, int, int)
action when mouse is unclicked; if not overridden, no action
 o process()
complex objects may require processing; override this.
 o processMouseBox(Int2Range)
action when mouseBox has been swept out; if not overridden, tries to scale the object.
 o setDefinition(String)
set the definition (at present HTML markup is NOT honoured).
 o setFontScale(double)
 o setHTMLKeyword(String, String)
set a keyword with a given HTML value; no check is made on duplication; (At present the HTML is only a String); name must be "NOTE" or "EXAMPLE"
 o setID(String)
 o setISO12620(String, String)
set the directory and suffix for the 12620 keywords
 o setISO12620Keywords()
adds the ISO12620 standard terms to the keywords.
 o setKeyword(String, String)
set a keyword with a given value; no check is made on duplication;
 o setKeywordDefinition(String, String)
set a keyword definition (by pointing to a file name)
 o setOwner(String)
 o setSuffix(String)
set the suffix for the entries
 o setTerm(String)
 o setTitle(String)
 o showHelp()
display Help
 o toHTML()
returns (maybe recursively) the HTML representation of the node.
 o toString()
output as SGML , making sure that children and parents are not included

Constructors

 o TERMENTRYNode
  public TERMENTRYNode(String giName,
                       SGMLTree tree)

Methods

 o createTERMENTRYNode
  public static int createTERMENTRYNode(CMLTree tree,
                                        String title)
standalone TERMENTRYNode (i.e. single glossary entry). You must create a tree (CMLTree) and then create the subnodes using this routine. It returns the index of the TERMENTRYNode in the tree.
 o createAndAdd
  public static int createAndAdd(SGMLTree tree,
                                 int parentIndex,
                                 String title)
 o getID
  public String getID()
all TERMENTRYs *must* have an ID (without spaces or dubious punctuation); any attempt to alter ID once set will fail
 o setID
  public void setID(String id)
 o getTitle
  public String getTitle()
get title from TITLE, DICTNAME, BUILTIN if present, else TITLE
Overrides:
getTitle in class DrawableX_Node
 o setTitle
  public void setTitle(String title)
Overrides:
setTitle in class SGMLNode
 o addSuperordinateTerm
  public void addSuperordinateTerm(TERMENTRYNode sup)
add superordinate class. More than one is allowed (not everyone will agree with this). The order of addition is irrelevant. 'this' is automatically added as a subordinate term. Not everyone will agree with this either!
 o addSubordinateTerm
  public void addSubordinateTerm(TERMENTRYNode sub)
add subordinate class. More than one is allowed The order of addition is irrelevant. 'this' is automatically added as a superordinate term. Either this or the preceding routine can be used - the effect is the same - to ensure consistency. Note, however, that usually the children are listed after the parents so this routine is more likely to reference null.
 o getTerm
  public String getTerm()
all TERMENTRYs *must* have a TERM (which can have any punctuation, but is case-sensitive). any attempt to alter Term once set will fail
 o setTerm
  public void setTerm(String term)
 o getOwner
  public String getOwner()
TERMENTRYs *may* have an Owner/Title
 o setOwner
  public void setOwner(String owner)
 o getDefinition
  public XHTMLNode getDefinition()
TERMENTRYs *may* have a DEFINITION (which can contain HTML)
 o setDefinition
  public boolean setDefinition(String def)
set the definition (at present HTML markup is NOT honoured). At present a duplicate definition is ignored and false is returned.
 o getKeywords
  public String[] getKeywords()
TERMENTRYs usually have keywords (ideally taken from ISO 12620); some may be repeated (e.g. synonyms). This returns a String[] of all keywords in the order they were added
 o getKeywordsWithName
  public String[] getKeywordsWithName(String name)
get values of all the keywords with a given name (e.g. synonym). The name is case-insensitive
 o setISO12620
  public static void setISO12620(String directory,
                                 String suffix)
set the directory and suffix for the 12620 keywords
 o setSuffix
  public static void setSuffix(String sufx)
set the suffix for the entries
 o setISO12620Keywords
  public void setISO12620Keywords()
adds the ISO12620 standard terms to the keywords. This requires the directory that contains them and their suffices (e.g. "cml") be set by the above routine
 o setHTMLKeyword
  public void setHTMLKeyword(String name,
                             String value)
set a keyword with a given HTML value; no check is made on duplication; (At present the HTML is only a String); name must be "NOTE" or "EXAMPLE"
 o setKeyword
  public void setKeyword(String name,
                         String value)
set a keyword with a given value; no check is made on duplication;
 o setKeywordDefinition
  public void setKeywordDefinition(String keyword,
                                   String filename)
set a keyword definition (by pointing to a file name)
 o createADMINNode
  public void createADMINNode()
 o showHelp
  public void showHelp()
display Help
Overrides:
showHelp in class DrawableX_Node
 o mayContain
  public boolean mayContain(SGMLNode n)
can this node contain others.
Overrides:
mayContain in class DrawableX_Node
 o process
  public void process()
complex objects may require processing; override this.
Overrides:
process in class DrawableSGMLNode
 o addURL
  public int addURL(String title,
                    String target,
                    String builtin)
add a URL (e.g. for SEE or SEEALSO; target must be a valid file or URL; builtin can be "XREF", "SEE" or "SEEALSO"
 o action
  public boolean action(Event e,
                        Object arg)
pass any button actions to the object
Overrides:
action in class DrawableX_Node
 o setFontScale
  public static void setFontScale(double s)
 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)
called from the display() routine of DrawableX_Node
Overrides:
display in class DrawableX_Node
 o mouseUp
  public boolean mouseUp(Event e,
                         int x,
                         int y)
action when mouse is unclicked; if not overridden, no action
Overrides:
mouseUp in class DrawableX_Node
 o processMouseBox
  public boolean processMouseBox(Int2Range box)
action when mouseBox has been swept out; if not overridden, tries to scale the object.
Overrides:
processMouseBox in class DrawableX_Node
 o toString
  public String toString()
output as SGML , making sure that children and parents are not included
Overrides:
toString in class SGMLNode
 o toHTML
  public String toHTML()
returns (maybe recursively) the HTML representation of the node.
Overrides:
toHTML in class SGMLNode
 o debug
  public void debug()
for debug
Overrides:
debug in class DrawableX_Node
 o drawIcon
  public int drawIcon(Graphics g,
                      int x,
                      int y)
draw a CML icon
Overrides:
drawIcon in class DrawableX_Node

All Packages  Class Hierarchy  This Package  Previous  Next  Index