WUI : API


org.westofj.wui
Class WImageButton

java.lang.Object
  extended byorg.westofj.wui.Widget
      extended byorg.westofj.wui.WAbstractButton
          extended byorg.westofj.wui.WImageButton

public class WImageButton
extends WAbstractButton

An image that behaves as a button.

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

Constructor Summary
WImageButton()
          Constructs an image button.
WImageButton(String image)
          Constructs an image button with the specified target image url.
WImageButton(String activeImage, String hoverImage, String clickImage, String inactiveImage)
          Constructs an image button with the specified images.
 
Method Summary
 String getActiveImage()
          Returns the target image url of the image displayed when the button is enabled.
 String getClickImage()
          Returns the target image url of the image displayed when the user clicks the button.
 String getHoverImage()
          Returns the target image url of the image displayed when the user's mouse is over the button.
 String getInactiveImage()
          Returns the target image url of the image displayed when the button is not enabled.
 void render(WRunner runner, WRenderContext context, PrintWriter out)
          Renders the widget to the display.
 void setActiveImage(String activeImage)
          Sets the target image url of the image displayed when the button is enabled.
 void setClickImage(String clickImage)
          Sets the target image url of the image displayed when the user clicks the button.
 void setHoverImage(String hoverImage)
          Sets the target image url of the image displayed when the user's mouse is over the button.
 void setInactiveImage(String inactiveImage)
          Sets the target image url of the image displayed when the button is not enabled.
 
Methods inherited from class org.westofj.wui.WAbstractButton
addActionListener, getActionCommand, getText, getText, handleParams, hasActionListeners, isEnabled, press, 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

WImageButton

public WImageButton()
Constructs an image button.


WImageButton

public WImageButton(String image)
Constructs an image button with the specified target image url.

Parameters:
image - the target image url.

WImageButton

public WImageButton(String activeImage,
                    String hoverImage,
                    String clickImage,
                    String inactiveImage)
Constructs an image button with the specified images.

Parameters:
activeImage - the target image url of the image to display when the button is enabled.
hoverImage - the target image url of the image to display when the user's mouse is over the button.
clickImage - the target image url of the image to display after the user has clicked on the button.
inactiveImage - the target image url of the image to display when the button is not enabled.
Method Detail

getActiveImage

public String getActiveImage()
Returns the target image url of the image displayed when the button is enabled.

Returns:
String the target image url of the image displayed when the button is enabled.

getClickImage

public String getClickImage()
Returns the target image url of the image displayed when the user clicks the button.

Returns:
String the target image url of the image displayed when the user clicks the button.

getHoverImage

public String getHoverImage()
Returns the target image url of the image displayed when the user's mouse is over the button.

Returns:
String the target image url of the image displayed when the user's mouse is over the button.

getInactiveImage

public String getInactiveImage()
Returns the target image url of the image displayed when the button is not enabled.

Returns:
String the target image url of the image displayed when the button is not enabled.

render

public void render(WRunner runner,
                   WRenderContext context,
                   PrintWriter out)
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.

setActiveImage

public void setActiveImage(String activeImage)
Sets the target image url of the image displayed when the button is enabled.

Parameters:
activeImage - the target image url of the image displayed when the button is enabled.

setClickImage

public void setClickImage(String clickImage)
Sets the target image url of the image displayed when the user clicks the button.

Parameters:
clickImage - the target image url of the image displayed when the user clicks the button.

setHoverImage

public void setHoverImage(String hoverImage)
Sets the target image url of the image displayed when the user's mouse is over the button.

Parameters:
hoverImage - the target image url of the image displayed when the user's mouse is over the button.

setInactiveImage

public void setInactiveImage(String inactiveImage)
Sets the target image url of the image displayed when the button is not enabled.

Parameters:
inactiveImage - the target image url of the image displayed when the button is not enabled.

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