Class pmr.cml.CMLTree
All Packages Class Hierarchy This Package Previous Next Index
Class pmr.cml.CMLTree
java.lang.Object
|
+----java.awt.Component
|
+----java.awt.Container
|
+----java.awt.Panel
|
+----java.applet.Applet
|
+----pmr.simplegraph.SimpleApplet
|
+----pmr.sgml.SGMLApplet
|
+----pmr.sgml.SGMLTree
|
+----pmr.cml.CMLTree
- public class CMLTree
- extends SGMLTree
Tree holding a CML document instance; primarily used to derive specific
'filetypes'. and to provide generic 'get' routines.
This is also still an applet
- Author:
- (C) P. Murray-Rust, 1996
-
CMLTree()
-
-
CMLTree(ESISStream)
-
-
CMLTree(SGMLStream)
-
-
createGeneralTOC(int)
- create a chemical TOC
-
display()
- the 'default' display for this object, rather than the tree.
-
display(Graphics)
- as above, but output to preselected Graphics; not sure yet what to
do about Scaler2D for multiple nodes
-
getCMLTreeFromMIME(String, String)
- returns a CMLTree from a file/URL.
-
getGraph()
- gets first Graph object in file (often the only one).
-
getMOL()
- gets first MOL object in file (often the only one).
-
getScaler2D()
-
-
getSEQUENCENodes(int)
- return SEQUENCENodes if they exist as children of index
-
getSpectrum()
- gets first Spectrum object in file (often the only one).
-
init()
- when an applet
-
removeDisplayNode(DrawableX_Node)
-
-
setDisplayNode(DrawableX_Node)
- a CMLTree can have one or more displayNodes which are displayed
when display() is invoked.
-
setScaler2D(Scaler2D)
- set and get the Scaler2D for displaying nodes; however only the Screen
Window will be used - I have yet to work all this out!!
-
showHelp()
- display Help
CMLTree
public CMLTree()
CMLTree
public CMLTree(SGMLStream s) throws BadSGMLFileException, BadAttributeException
CMLTree
public CMLTree(ESISStream e) throws BadESISFileException, BadAttributeException
showHelp
public void showHelp()
- display Help
- Overrides:
- showHelp in class SGMLTree
init
public void init()
- when an applet
- Overrides:
- init in class SGMLTree
createGeneralTOC
public GeneralTOC createGeneralTOC(int depth)
- create a chemical TOC
- Overrides:
- createGeneralTOC in class SGMLTree
getMOL
public MOLNode getMOL()
- gets first MOL object in file (often the only one). Returns a null
object if none found; This will need updating
getSpectrum
public XLISTNode getSpectrum()
- gets first Spectrum object in file (often the only one). Returns a null
object if none found; This will need updating
getGraph
public XLISTNode getGraph()
- gets first Graph object in file (often the only one). Returns a null
object if none found; This will need updating
getSEQUENCENodes
public SEQUENCENode[] getSEQUENCENodes(int index)
- return SEQUENCENodes if they exist as children of index
setScaler2D
public void setScaler2D(Scaler2D s2d)
- set and get the Scaler2D for displaying nodes; however only the Screen
Window will be used - I have yet to work all this out!!
getScaler2D
public Scaler2D getScaler2D()
setDisplayNode
public void setDisplayNode(DrawableX_Node n)
- a CMLTree can have one or more displayNodes which are displayed
when display() is invoked. These may be set when the CMLTree is created
(e.g. the MOLNodes might be highlighted for molecules
removeDisplayNode
public void removeDisplayNode(DrawableX_Node n)
display
public void display()
- the 'default' display for this object, rather than the tree. One or
more subnodes (DrawableX_Nodes) can be set with setDisplayNode() and these
are displayed; output to new Frame (Window)
display
public void display(Graphics g)
- as above, but output to preselected Graphics; not sure yet what to
do about Scaler2D for multiple nodes
getCMLTreeFromMIME
public static CMLTree getCMLTreeFromMIME(String filename,
String mime) throws BadFileException, FileNotFoundException, IOException
- returns a CMLTree from a file/URL. Takes a MIME type; if this is
null or "", makes a guess; returns null if fails, without Exception
NOTE: only chemical/x-cml, text/sgml are allowed as mimetypes; this function
is normally overridden by ChemicalMIMETree
- Throws: BadFileException
- cannot interpret file as given MIME type, or cannot guess
All Packages Class Hierarchy This Package Previous Next Index