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

Class pmr.cml.CMLObj

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.CMLObj

public class CMLObj
extends SGMLTree
Tree holding a CML document instance; primarily used to derive specific 'filetypes'. and to provide generic 'get' routines.
Author:
(C) P. Murray-Rust, 1996

Constructor Index

 o CMLObj()
 o CMLObj(ESISStream)
 o CMLObj(ESISStream, String[])
 o CMLObj(SGMLStream)

Method Index

 o display()
the 'default' display for this object, rather than the tree.
 o display(Graphics)
as above, but output to preselected Graphics; not sure yet what to do about Scaler2D for multiple nodes
 o getC_MOL()
gets first MOL object in file (often the only one).
 o getCMLObjFromMIME(String, String)
returns a CMLObj from a file/URL.
 o getGraph()
gets first Graph object in file (often the only one).
 o getScaler2D()
 o getSpectrum()
gets first Spectrum object in file (often the only one).
 o main(String[])
this is only run when an application.
 o removeDisplayNode(DrawableX_Node)
 o setDisplayNode(DrawableX_Node)
a CMLObj can have one or more displayNodes which are displayed when display() is invoked.
 o setOmit(String, boolean)
can omit various components when constructing file
 o 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!!

Constructors

 o CMLObj
  public CMLObj()
 o CMLObj
  public CMLObj(SGMLStream s) throws BadSGMLFileException, BadAttributeException
 o CMLObj
  public CMLObj(ESISStream e) throws BadESISFileException, BadAttributeException
 o CMLObj
  public CMLObj(ESISStream e,
                String indexes[]) throws BadESISFileException, BadAttributeException

Methods

 o setOmit
  public void setOmit(String keyword,
                      boolean omit)
can omit various components when constructing file
 o getC_MOL
  public MOLNode getC_MOL()
gets first MOL object in file (often the only one). Returns a null object if none found; This will need updating
 o 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
 o 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
 o 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!!
 o getScaler2D
  public Scaler2D getScaler2D()
 o setDisplayNode
  public void setDisplayNode(DrawableX_Node n)
a CMLObj can have one or more displayNodes which are displayed when display() is invoked. These may be set when the CMLObj is created (e.g. the MOLNodes might be highlighted for molecules
 o removeDisplayNode
  public void removeDisplayNode(DrawableX_Node n)
 o 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)
 o display
  public void display(Graphics g)
as above, but output to preselected Graphics; not sure yet what to do about Scaler2D for multiple nodes
 o getCMLObjFromMIME
  public static CMLObj getCMLObjFromMIME(String filename,
                                         String mime) throws BadFileException, FileNotFoundException, IOException
returns a CMLObj from a file/URL. Takes a MIME type; if this is nulll or "", makes a guess; returns null if fails, without Exception
Throws: BadFileException
cannot interpret file as given MIME type, or cannot guess
 o main
  public static void main(String args[])
this is only run when an application.

All Packages  Class Hierarchy  This Package  Previous  Next  Index