uk.ac.starlink.datanode.nodes
Class HTMLDataNode

java.lang.Object
  extended by uk.ac.starlink.datanode.nodes.DefaultDataNode
      extended by uk.ac.starlink.datanode.nodes.HTMLDataNode
All Implemented Interfaces:
DataNode

public class HTMLDataNode
extends DefaultDataNode

DataNode implementation which describes a top-level HTML document. The formatted HTML page is displayed and hyperlinks can be followed. Note that if links are followed then the original document must be reloaded in order to display the original page again.

Version:
$Id$
Author:
David Giaretta (Starlink)

Field Summary
 File file
           
 
Constructor Summary
HTMLDataNode(File file)
          Constructs a URL to be displayed in the pane, if possible.
 
Method Summary
 boolean allowsChildren()
          HTML type does not allow children.
 void configureDetail(DetailViewer dv)
          Sets up a pane to display the HTML file.
 String getNodeTLA()
          Returns Three Letter Acronym "HTM".
 String getNodeType()
          Returns a short sentence indicating what kind of node this is.
 
Methods inherited from class uk.ac.starlink.datanode.nodes.DefaultDataNode
beep, getChildIterator, getChildMaker, getCreator, getDataObject, getDescription, getIcon, getLabel, getName, getParentObject, getPathElement, getPathSeparator, hasDataObject, makeChild, makeErrorChild, registerDataObject, setChildMaker, setCreator, setDescription, setIconID, setLabel, setName, setParentObject, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

file

public final File file
Constructor Detail

HTMLDataNode

public HTMLDataNode(File file)
             throws NoSuchDataException
Constructs a URL to be displayed in the pane, if possible.

Throws:
NoSuchDataException
Method Detail

allowsChildren

public boolean allowsChildren()
HTML type does not allow children.

Specified by:
allowsChildren in interface DataNode
Overrides:
allowsChildren in class DefaultDataNode
Returns:
false

getNodeTLA

public String getNodeTLA()
Returns Three Letter Acronym "HTM".

Specified by:
getNodeTLA in interface DataNode
Overrides:
getNodeTLA in class DefaultDataNode
Returns:
"HTM"

getNodeType

public String getNodeType()
Description copied from interface: DataNode
Returns a short sentence indicating what kind of node this is. The return value should be just a few words. As a rough guideline it should indicate what the implementing class is.

Specified by:
getNodeType in interface DataNode
Overrides:
getNodeType in class DefaultDataNode
Returns:
a short description of the type of this DataNode

configureDetail

public void configureDetail(DetailViewer dv)
Sets up a pane to display the HTML file. Also activates the hyperlinks. Note that if any hyperlinks are followed then the new page will be cached and displayed until the original docuemnt is reloaded.

Specified by:
configureDetail in interface DataNode
Overrides:
configureDetail in class DefaultDataNode
Parameters:
dv - the detail viewer which this node is given an opportunity to configure


Copyright © 2015 Central Laboratory of the Research Councils. All Rights Reserved.