WUI : API


org.westofj.wui
Class WMenuTree

java.lang.Object
  extended byorg.westofj.wui.Widget
      extended byorg.westofj.wui.WMenuTree

public class WMenuTree
extends Widget

Displays a menu as a static tree.

Version:
$Revision: 1.4 $, $Date: 2004/03/22 00:34:01 $
Author:
bill

Constructor Summary
WMenuTree()
          Constructs a menu tree widget.
WMenuTree(WMenu menu)
          Constructs a menu tree widget to display the specified menu.
 
Method Summary
 WMenu getMenu()
          Returns the menu displayed by the menu tree widget.
protected  void handleParams(WRunner runner, String[] values)
           
 boolean isShowRoot()
          Returns if the root of the menu tree is be displayed.
 void render(WRunner runner, WRenderContext context, PrintWriter out)
          Renders the widget to the display.
 void setMenu(WMenu menu)
          Sets the menu displayed by the menu tree.
 void setShowRoot(boolean showRoot)
          Sets if the root of the menu tree is displayed.
 
Methods inherited from class org.westofj.wui.Widget
addChangeListener, getRunner, handleNoParams, hasChangeListeners, removeChangeListener, stateChanged
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

WMenuTree

public WMenuTree()
Constructs a menu tree widget.


WMenuTree

public WMenuTree(WMenu menu)
Constructs a menu tree widget to display the specified menu.

Parameters:
menu - the menu to display.
Method Detail

getMenu

public WMenu getMenu()
Returns the menu displayed by the menu tree widget.

Returns:
WMenu the menu displayed by the menu tree widget.

isShowRoot

public boolean isShowRoot()
Returns if the root of the menu tree is be displayed.

Returns:
boolean true if the root of the menu tree is displayed, false otherwise.

render

public void render(WRunner runner,
                   WRenderContext context,
                   PrintWriter out)
            throws WRenderException
Description copied from class: Widget
Renders the widget to the display.

Specified by:
render in class Widget
Parameters:
runner - the current runner context.
out - the output for the display.
Throws:
WRenderException

setMenu

public void setMenu(WMenu menu)
Sets the menu displayed by the menu tree.

Parameters:
menu - the menu displayed by the menu tree.

setShowRoot

public void setShowRoot(boolean showRoot)
Sets if the root of the menu tree is displayed. True indicates that the root is displayed. False indicates that the root is not displayed.

Parameters:
showRoot - true if the root of the menu tree is displayed, false otherwise.

handleParams

protected void handleParams(WRunner runner,
                            String[] values)
Overrides:
handleParams in class Widget

Copyright (c) 2003 West of J - All rights reserved.