ucar.unidata.idv.chooser
Class MenuHandler

java.lang.Object
  extended by ucar.unidata.idv.chooser.XmlHandler
      extended by ucar.unidata.idv.chooser.MenuHandler

public class MenuHandler
extends XmlHandler

This handles the menu bar xml (from idv/resources/defaultmenu.xml) to include idv commands, etc, into a XmlChooser chooser.

Version:
$Revision: 1.10 $Date: 2007/06/28 17:13:04 $
Author:
IDV development team

Field Summary
static String ATTR_ACTION
          The action attribute in menuitems
static String TAG_MENU
          Xml tag name for menu
static String TAG_MENUITEM
          Xml tag name for menuitems
static String TAG_MENUS
          Xml tag name for menus
 
Fields inherited from class ucar.unidata.idv.chooser.XmlHandler
chooser, path, root, tree
 
Constructor Summary
MenuHandler(XmlChooser chooser, Element root, String path)
          Create the handler
 
Method Summary
 void doLoad()
          The user has pressed the 'Load' button.
 JComponent doMakeContents()
          Make the GUI
 
Methods inherited from class ucar.unidata.idv.chooser.XmlHandler
getContents, getPath, updateStatus
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

TAG_MENUS

public static final String TAG_MENUS
Xml tag name for menus

See Also:
Constant Field Values

TAG_MENU

public static final String TAG_MENU
Xml tag name for menu

See Also:
Constant Field Values

TAG_MENUITEM

public static final String TAG_MENUITEM
Xml tag name for menuitems

See Also:
Constant Field Values

ATTR_ACTION

public static final String ATTR_ACTION
The action attribute in menuitems

See Also:
Constant Field Values
Constructor Detail

MenuHandler

public MenuHandler(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

doMakeContents

public JComponent doMakeContents()
Make the GUI

Specified by:
doMakeContents in class XmlHandler
Returns:
The UI component

doLoad

public void doLoad()
The user has pressed the 'Load' button. Check if a node is selected and process the xml action attribute

Specified by:
doLoad in class XmlHandler