org.zkoss.zk.device
Class AjaxDevice

java.lang.Object
  extended by org.zkoss.zk.device.AjaxDevice
All Implemented Interfaces:
java.io.Serializable, Device

public class AjaxDevice
extends java.lang.Object
implements Device, java.io.Serializable

Represents a Web browser with the Ajax support.

Since:
2.4.0
Author:
tomyeh
See Also:
Serialized Form

Constructor Summary
AjaxDevice()
           
 
Method Summary
 java.lang.String getType()
          Returns the device type.
 java.lang.String getUnavailableMessage()
          Returns the unavailable message that is shown to the client if the client doesn't support this device.
 void init(java.lang.String type, Desktop desktop, java.lang.String unavailmsg)
          Initializes the device.
 void sessionDidActivate(Desktop desktop)
          Notification that the desktop, which owns this device, has just been activated (aka., deserialized) by the Web container.
 void sessionWillPassivate(Desktop desktop)
          Notification that the desktop, which owns this device, is about to be passivated (aka., serialized) by the Web container.
 void setUnavailableMessage(java.lang.String unavailmsg)
          Sets the unavailable message that is shown to the client if the client doesn't support this device.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AjaxDevice

public AjaxDevice()
Method Detail

getType

public java.lang.String getType()
Description copied from interface: Device
Returns the device type.

Specified by:
getType in interface Device

getUnavailableMessage

public java.lang.String getUnavailableMessage()
Description copied from interface: Device
Returns the unavailable message that is shown to the client if the client doesn't support this device.

Specified by:
getUnavailableMessage in interface Device
Returns:
the unavailable message, or null if no such message

setUnavailableMessage

public void setUnavailableMessage(java.lang.String unavailmsg)
Description copied from interface: Device
Sets the unavailable message that is shown to the client if the client doesn't support this device.

Note: this method must be called before the desktop is rendered (and sent to the client). Otherwise, it is meaningless.

Specified by:
setUnavailableMessage in interface Device
Parameters:
unavailmsg - the unavailable message.

init

public void init(java.lang.String type,
                 Desktop desktop,
                 java.lang.String unavailmsg)
Description copied from interface: Device
Initializes the device. A device is created for each desktop, and this method is called when it is associated to the desktop.

Specified by:
init in interface Device
Parameters:
type - the device type
desktop - the desktop to associate this device with (never null).
unavailmsg - the message to shown when the device is not, or null no message will be shown

sessionWillPassivate

public void sessionWillPassivate(Desktop desktop)
Description copied from interface: Device
Notification that the desktop, which owns this device, is about to be passivated (aka., serialized) by the Web container.

Specified by:
sessionWillPassivate in interface Device

sessionDidActivate

public void sessionDidActivate(Desktop desktop)
Description copied from interface: Device
Notification that the desktop, which owns this device, has just been activated (aka., deserialized) by the Web container.

Specified by:
sessionDidActivate in interface Device


Copyright © 2005-2007 Potix Corporation. All Rights Reserved.