Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

nextapp.echoservlet.ui
Class ToggleButtonUI  view ToggleButtonUI download ToggleButtonUI.java

java.lang.Object
  extended bynextapp.echoservlet.ComponentPeer
      extended bynextapp.echoservlet.ui.AbstractButtonUI
          extended bynextapp.echoservlet.ui.ToggleButtonUI
All Implemented Interfaces:
nextapp.echoservlet.Alignment, nextapp.echoservlet.ClientActionProducer, java.util.EventListener, nextapp.echo.event.ImageUpdateListener, java.beans.PropertyChangeListener, java.io.Serializable
Direct Known Subclasses:
CheckBoxUI, RadioButtonUI

public abstract class ToggleButtonUI
extends AbstractButtonUI
implements java.beans.PropertyChangeListener

A base peer class for components derived from ToggleButton.


Field Summary
protected static java.lang.String ROLLOVER_SELECTED_ICON_IMAGE
          A constant used to identify the rollover selected icon for the in the ImageManager.
protected static java.lang.String SELECTED_ICON_IMAGE
          A constant used to identify the selected icon for the in the ImageManager.
protected static nextapp.echoservlet.Service SERVICE_TOGGLE_BUTTON_SCRIPT
          A service providing JavaScript to handle client-side management of toggle buttons.
static java.lang.String TOGGLE_IMAGE_PREFIX
          A prefix used in the value of the image "name" attribute of a an <img> element rendered to represent a toggle button's state icon.
 
Fields inherited from class nextapp.echoservlet.ui.AbstractButtonUI
ICON_IMAGE, imageManager, renderedActive, ROLLOVER_ICON_IMAGE
 
Fields inherited from class nextapp.echoservlet.ComponentPeer
 
Constructor Summary
ToggleButtonUI()
           
 
Method Summary
abstract  java.lang.String getDefaultStateImageUri(nextapp.echoservlet.RenderingContext rc, boolean selected)
          Returns the URI of the default image used to represent the toggle button's state.
static java.lang.String getScriptCustomStateIconToggleRollover(nextapp.echoservlet.Connection conn, java.lang.String id, java.lang.String stateId, java.lang.String imageUri, java.lang.String selectedImageUri, java.lang.String styleName)
          Returns the necessary script to produce a button rollover effect.
 nextapp.echoservlet.Id getStateId()
          Returns the Id of the controller input field in which the ToggleButton's state is to be stored.
 java.lang.String getStateImageUri(nextapp.echoservlet.RenderingContext rc, boolean selected)
          Returns the URI of the image that will be used to represent state for this particular toggle button.
 void propertyChange(java.beans.PropertyChangeEvent e)
          Fired after a Bean's property has changed.
 void registered()
          Called when the component is registered.
 void unregistered()
          Called when the component is unregistered.
 
Methods inherited from class nextapp.echoservlet.ui.AbstractButtonUI
clientAction, getHorizontalAlignment, getScriptAction, getVerticalAlignment, imageUpdate, render
 
Methods inherited from class nextapp.echoservlet.ComponentPeer
addAncillaryService, generateId, getBackground, getChildCount, getChildren, getComponent, getFocusedElementId, getFont, getForeground, getId, getInstancePeer, getParent, getPeer, getTabIndex, redraw, removeAncillaryService
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

TOGGLE_IMAGE_PREFIX

public static final java.lang.String TOGGLE_IMAGE_PREFIX
A prefix used in the value of the image "name" attribute of a an <img> element rendered to represent a toggle button's state icon.

See Also:
Constant Field Values

SERVICE_TOGGLE_BUTTON_SCRIPT

protected static final nextapp.echoservlet.Service SERVICE_TOGGLE_BUTTON_SCRIPT
A service providing JavaScript to handle client-side management of toggle buttons.


SELECTED_ICON_IMAGE

protected static final java.lang.String SELECTED_ICON_IMAGE
A constant used to identify the selected icon for the in the ImageManager.

See Also:
Constant Field Values

ROLLOVER_SELECTED_ICON_IMAGE

protected static final java.lang.String ROLLOVER_SELECTED_ICON_IMAGE
A constant used to identify the rollover selected icon for the in the ImageManager.

See Also:
Constant Field Values
Constructor Detail

ToggleButtonUI

public ToggleButtonUI()
Method Detail

getScriptCustomStateIconToggleRollover

public static java.lang.String getScriptCustomStateIconToggleRollover(nextapp.echoservlet.Connection conn,
                                                                      java.lang.String id,
                                                                      java.lang.String stateId,
                                                                      java.lang.String imageUri,
                                                                      java.lang.String selectedImageUri,
                                                                      java.lang.String styleName)
Returns the necessary script to produce a button rollover effect.


getDefaultStateImageUri

public abstract java.lang.String getDefaultStateImageUri(nextapp.echoservlet.RenderingContext rc,
                                                         boolean selected)
Returns the URI of the default image used to represent the toggle button's state.


getStateId

public nextapp.echoservlet.Id getStateId()
Returns the Id of the controller input field in which the ToggleButton's state is to be stored. In the case where multiple RadioButtons are in a ButtonGroup, the state will be stored in only one field, specified by this method.

The default implementation returns the Id of this peer.


getStateImageUri

public java.lang.String getStateImageUri(nextapp.echoservlet.RenderingContext rc,
                                         boolean selected)
Returns the URI of the image that will be used to represent state for this particular toggle button.


propertyChange

public void propertyChange(java.beans.PropertyChangeEvent e)
Description copied from interface: java.beans.PropertyChangeListener
Fired after a Bean's property has changed.

Specified by:
propertyChange in interface java.beans.PropertyChangeListener
Overrides:
propertyChange in class AbstractButtonUI

registered

public void registered()
Description copied from class: nextapp.echoservlet.ComponentPeer
Called when the component is registered. This method should be overridden if necessary.

Overrides:
registered in class AbstractButtonUI

unregistered

public void unregistered()
Description copied from class: nextapp.echoservlet.ComponentPeer
Called when the component is unregistered. This method should be overridden if necessary.

Overrides:
unregistered in class AbstractButtonUI