WUI : API


org.westofj.wui
Class WCheckMenuItem

java.lang.Object
  extended byorg.westofj.wui.Widget
      extended byorg.westofj.wui.WAbstractButton
          extended byorg.westofj.wui.WMenuElement
              extended byorg.westofj.wui.WMenuItem
                  extended byorg.westofj.wui.WCheckMenuItem

public class WCheckMenuItem
extends WMenuItem

A menu item that behaves as a check box.

Version:
$Revision: 1.2 $, $Date: 2004/03/08 01:57:35 $
Author:
bill

Constructor Summary
WCheckMenuItem()
          Constructs a check menu item.
WCheckMenuItem(String text)
          Constructs a check menu item with the specified text.
WCheckMenuItem(WDisplayable text)
          Constructs a check menu item with the specified text.
 
Method Summary
 boolean isSelected()
          Returns true if the check menu item is selected, false otherwise.
 void press()
          Presses the button.
 void renderModifier(WRunner runner, PrintWriter out)
          Renders a modifier image to the display.
 void setSelected(boolean selected)
          Sets if the check menu item is selected.
 
Methods inherited from class org.westofj.wui.WMenuItem
getElementCount, getSubElements
 
Methods inherited from class org.westofj.wui.WMenuElement
render
 
Methods inherited from class org.westofj.wui.WAbstractButton
addActionListener, getActionCommand, getText, getText, handleParams, hasActionListeners, isEnabled, removeActionListener, setActionCommand, setEnabled, setText, setText
 
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

WCheckMenuItem

public WCheckMenuItem()
Constructs a check menu item.


WCheckMenuItem

public WCheckMenuItem(String text)
Constructs a check menu item with the specified text.

Parameters:
text - the label of the check menu item.

WCheckMenuItem

public WCheckMenuItem(WDisplayable text)
Constructs a check menu item with the specified text.

Parameters:
text - the label of the check menu item.
Method Detail

isSelected

public boolean isSelected()
Returns true if the check menu item is selected, false otherwise.

Returns:
boolean true if the check menu item is selected, false otherwise.

setSelected

public void setSelected(boolean selected)
Sets if the check menu item is selected. True indicates that the check menu item is selected. False indicates that the check menu item is not selected.

Parameters:
selected - true if the check menu item is selected, false otherwise.

renderModifier

public void renderModifier(WRunner runner,
                           PrintWriter out)
Description copied from class: WMenuElement
Renders a modifier image to the display. A modifier image is an additional image that communicates state to the user. This render method is separate from the WMenuElement.render(org.westofj.wui.WRunner, org.westofj.wui.WRenderContext, java.io.PrintWriter) method to allow menu containers to place the modifier in different locations on the display.

Overrides:
renderModifier in class WMenuElement
Parameters:
runner - the current runner context.
out - the output for the display.

press

public void press()
Description copied from class: WAbstractButton
Presses the button.

Overrides:
press in class WAbstractButton

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