ucar.unidata.idv.chooser
Class XmlHandler

java.lang.Object
  extended by ucar.unidata.idv.chooser.XmlHandler
Direct Known Subclasses:
MenuHandler, ThreddsHandler, WmsHandler

public abstract class XmlHandler
extends Object

This is an abstract base class for defining different handlers of xml documents for the XmlChooser. The two primary subclasses are the WmsHandler and the ThreddsHandler

Version:
$Revision: 1.14 $Date: 2007/07/09 22:59:59 $
Author:
IDV development team

Field Summary
protected  XmlChooser chooser
          The chooser we are handling xml docs for
protected  String path
          This is the url or file path pointing to the xml
protected  Element root
          The root of the xml document
protected  XmlTree tree
          Most of the subclasses use the XmlTree to display the xml.
 
Constructor Summary
XmlHandler(XmlChooser chooser, Element root, String path)
          Create the handler
 
Method Summary
abstract  void doLoad()
          The user has pressed the 'Load' button.
protected abstract  JComponent doMakeContents()
          Overwritten by derived classes to actually create the GUI
 JComponent getContents()
          Return the GUI contents
 String getPath()
          Return the url or file path to the xml document
protected  void updateStatus()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

chooser

protected XmlChooser chooser
The chooser we are handling xml docs for


root

protected Element root
The root of the xml document


path

protected String path
This is the url or file path pointing to the xml


tree

protected XmlTree tree
Most of the subclasses use the XmlTree to display the xml.

Constructor Detail

XmlHandler

public XmlHandler(XmlChooser chooser,
                  Element root,
                  String path)
Create the handler

Parameters:
chooser - The chooser we are in
root - The root of the xml tree
path - The url path of the xml document
Method Detail

updateStatus

protected void updateStatus()

getPath

public String getPath()
Return the url or file path to the xml document

Returns:
The url or file path

getContents

public final JComponent getContents()
Return the GUI contents

Returns:
The UI component

doMakeContents

protected abstract JComponent doMakeContents()
Overwritten by derived classes to actually create the GUI

Returns:
The GUI

doLoad

public abstract void doLoad()
The user has pressed the 'Load' button. Check if a node is selected Needs to ber overwritten by derived classes.