uk.ac.starlink.treeview
Class HTMLDocComponentMaker

java.lang.Object
  extended by uk.ac.starlink.treeview.HTMLDocComponentMaker
All Implemented Interfaces:
uk.ac.starlink.datanode.nodes.ComponentMaker

public class HTMLDocComponentMaker
extends Object
implements uk.ac.starlink.datanode.nodes.ComponentMaker

Adaptor class to turn an HTMLViewer into a ComponentMaker. It also pulls documents from a known path in the Treeview resource tree.

Author:
Mark Taylor (Starlink)

Field Summary
static String DOCS_PATH
          The base location of documents viewed by this object.
 
Constructor Summary
HTMLDocComponentMaker(String docFileName)
          Construct a ComponentMaker which will build an HTMLViewer on request.
 
Method Summary
 JComponent getComponent()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DOCS_PATH

public static final String DOCS_PATH
The base location of documents viewed by this object.

See Also:
Constant Field Values
Constructor Detail

HTMLDocComponentMaker

public HTMLDocComponentMaker(String docFileName)
Construct a ComponentMaker which will build an HTMLViewer on request. The name of the file to display is given; this is looked for in the default location (DOCS_PATH). This constructor is lightweight, all the hard work is deferred until a call of the getComponent() method.

Parameters:
docFileName - the base name (without path) of the HTML document in the treeview document directory which will be displayed
Method Detail

getComponent

public JComponent getComponent()
                        throws IOException
Specified by:
getComponent in interface uk.ac.starlink.datanode.nodes.ComponentMaker
Throws:
IOException


Copyright © 2002-2017 CCLRC: Council for the Central Laboratory of the Research Councils. All Rights Reserved.