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
-
CMLObj()
-
-
CMLObj(ESISStream)
-
-
CMLObj(ESISStream, String[])
-
-
CMLObj(SGMLStream)
-
-
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
-
getC_MOL()
- gets first MOL object in file (often the only one).
-
getCMLObjFromMIME(String, String)
- returns a CMLObj from a file/URL.
-
getGraph()
- gets first Graph object in file (often the only one).
-
getScaler2D()
-
-
getSpectrum()
- gets first Spectrum object in file (often the only one).
-
main(String[])
- this is only run when an application.
-
removeDisplayNode(DrawableX_Node)
-
-
setDisplayNode(DrawableX_Node)
- a CMLObj can have one or more displayNodes which are displayed
when display() is invoked.
-
setOmit(String, boolean)
- can omit various components when constructing file
-
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!!
CMLObj
public CMLObj()
CMLObj
public CMLObj(SGMLStream s) throws BadSGMLFileException, BadAttributeException
CMLObj
public CMLObj(ESISStream e) throws BadESISFileException, BadAttributeException
CMLObj
public CMLObj(ESISStream e,
String indexes[]) throws BadESISFileException, BadAttributeException
setOmit
public void setOmit(String keyword,
boolean omit)
- can omit various components when constructing file
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
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
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 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
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
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
main
public static void main(String args[])
- this is only run when an application.
All Packages Class Hierarchy This Package Previous Next Index