org.zkoss.zul
Class Applet

java.lang.Object
  extended by org.zkoss.zk.ui.AbstractComponent
      extended by org.zkoss.zk.ui.HtmlBasedComponent
          extended by org.zkoss.zul.Applet
All Implemented Interfaces:
Serializable, Cloneable, org.zkoss.zk.ui.Component, org.zkoss.zk.ui.ext.DynamicPropertied, org.zkoss.zk.ui.ext.Scope, org.zkoss.zk.ui.sys.ComponentCtrl

public class Applet
extends org.zkoss.zk.ui.HtmlBasedComponent
implements org.zkoss.zk.ui.ext.DynamicPropertied

A generic applet component.

See also HTML applet tag.

Non XUL extension.

Note: AbstractComponent.setVisible(boolean) with false cannot work in IE. (Browser's limitation)

Since:
3.6.0
Author:
Davidchen, Tomyeh
See Also:
Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from class org.zkoss.zk.ui.HtmlBasedComponent
org.zkoss.zk.ui.HtmlBasedComponent.ExtraCtrl
 
Nested classes/interfaces inherited from class org.zkoss.zk.ui.AbstractComponent
org.zkoss.zk.ui.AbstractComponent.Children
 
Field Summary
 
Fields inherited from class org.zkoss.zk.ui.HtmlBasedComponent
_zclass
 
Fields inherited from interface org.zkoss.zk.ui.Component
APPLICATION_SCOPE, COMPONENT_SCOPE, DESKTOP_SCOPE, PAGE_SCOPE, REQUEST_SCOPE, SESSION_SCOPE, SPACE_SCOPE
 
Fields inherited from interface org.zkoss.zk.ui.sys.ComponentCtrl
CE_BUSY_IGNORE, CE_DUPLICATE_IGNORE, CE_IMPORTANT, CE_NON_DEFERRABLE, CE_REPEAT_IGNORE
 
Constructor Summary
Applet()
           
 
Method Summary
 String getAlign()
          Returns the alignment of an applet according to surrounding elements.
 String getArchive()
          Returns the location of an archive file (URL).
 String getCode()
          Return the applet class to run.
 String getCodebase()
          Returns a relative base URL for applets specified in setCode(java.lang.String) (URL).
 Object getDynamicProperty(String name)
           
 String getHspace()
          Returns the horizontal spacing around an applet.
 Map<String,String> getParams()
          Returns a map of parameters (never null).
 String getVspace()
          Returns the vertical spacing around an applet.
 boolean hasDynamicProperty(String name)
           
 void invoke(String function)
          Invokes the function of the applet running at the client.
 void invoke(String function, String argument)
          Invokes the function of the applet running at the client with one argument.
 void invoke(String function, String[] arguments)
          Invokes the function of the applet running at the client with variable number argument.
protected  boolean isChildable()
          No child is allowed.
 boolean isMayscript()
          Returns whether the applet is allowed to access the scripting object.
protected  void renderProperties(org.zkoss.zk.ui.sys.ContentRenderer renderer)
           
 void setAlign(String align)
          Sets the alignment of an applet according to surrounding elements.
 void setArchive(String archive)
          Sets the location of an archive file (URL).
 void setCode(String code)
          Sets the applet class to run.
 void setCodebase(String codebase)
          Sets a relative base URL for applets specified in setCode(java.lang.String) (URL).
 void setDynamicProperty(String name, Object value)
           
 void setField(String field, String value)
          Sets the value of the specified filed.
 void setHspace(String hspace)
          Sets the horizontal spacing in pixels around an applet.
 void setMayscript(boolean mayscript)
          Sets whether the applet is allowed to access the scripting object.
 String setParam(String name, String value)
          Sets a parameter.
 void setParams(Map<String,String> params)
          Sets a map of parameters (all existent parameters are removed first).
 void setVspace(String vspace)
          Sets the vertical spacing in pixels around an applet.
 
Methods inherited from class org.zkoss.zk.ui.HtmlBasedComponent
clone, focus, getAction, getDraggable, getDroppable, getExtraCtrl, getHeight, getHflex, getLeft, getRenderdefer, getSclass, getStyle, getTooltiptext, getTop, getVflex, getWidth, getZclass, getZindex, getZIndex, service, setAction, setClass, setDraggable, setDroppable, setFocus, setHeight, setHeightDirectly, setHflex, setHflexDirectly, setLeft, setLeftDirectly, setRenderdefer, setSclass, setStyle, setTooltiptext, setTop, setTopDirectly, setVflex, setWidth, setWidthDirectly, setZclass, setZindex, setZIndex, setZIndexDirectly
 
Methods inherited from class org.zkoss.zk.ui.AbstractComponent
addAnnotation, addAnnotation, addClientEvent, addEventHandler, addEventListener, addEventListener, addForward, addForward, addForward, addForward, addMoved, addScopeListener, addSharedEventHandlerMap, appendChild, applyProperties, beforeChildAdded, beforeChildRemoved, beforeParentChanged, detach, didActivate, didActivate, didDeserialize, didDeserialize, disableClientUpdate, equals, getAnnotatedProperties, getAnnotatedPropertiesBy, getAnnotation, getAnnotation, getAnnotations, getAnnotations, getAnnotations, getAttribute, getAttribute, getAttribute, getAttributeOrFellow, getAttributes, getAttributes, getAuService, getAutag, getChildren, getClientEvents, getDefaultMold, getDefinition, getDesktop, getEventHandler, getEventHandlerNames, getEventListenerMap, getEventListeners, getFellow, getFellow, getFellowIfAny, getFellowIfAny, getFellows, getFirstChild, getId, getLastChild, getListenerIterator, getMold, getNextSibling, getPage, getParent, getPreviousSibling, getRoot, getSpaceOwner, getStubonly, getTemplate, getTemplateNames, getUuid, getWidgetAttribute, getWidgetAttributeNames, getWidgetClass, getWidgetListener, getWidgetListenerNames, getWidgetOverride, getWidgetOverrideNames, hasAttribute, hasAttribute, hasAttribute, hasAttributeOrFellow, hasFellow, hasFellow, insertBefore, invalidate, isInvalidated, isListenerAvailable, isVisible, onChildAdded, onChildRemoved, onPageAttached, onPageDetached, onWrongValue, query, queryAll, redraw, redrawChildren, removeAttribute, removeAttribute, removeAttribute, removeChild, removeEventListener, removeForward, removeForward, removeScopeListener, render, render, render, replace, response, response, response, service, sessionDidActivate, sessionWillPassivate, setAttribute, setAttribute, setAttribute, setAuService, setAutag, setDefinition, setDefinition, setId, setMold, setPage, setPageBefore, setParent, setStubonly, setStubonly, setTemplate, setVisible, setVisibleDirectly, setWidgetAttribute, setWidgetClass, setWidgetListener, setWidgetOverride, smartUpdate, smartUpdate, smartUpdate, smartUpdate, smartUpdate, smartUpdate, smartUpdate, smartUpdate, smartUpdate, smartUpdateWidgetListener, smartUpdateWidgetOverride, toString, updateByClient, willPassivate, willPassivate, willSerialize, willSerialize
 
Methods inherited from class java.lang.Object
finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Applet

public Applet()
Method Detail

getCode

public String getCode()
Return the applet class to run. Example: MyApplet.


setCode

public void setCode(String code)
Sets the applet class to run.


getCodebase

public String getCodebase()
Returns a relative base URL for applets specified in setCode(java.lang.String) (URL).

Default: null (no codebase at all).

Since:
3.6.2

setCodebase

public void setCodebase(String codebase)
Sets a relative base URL for applets specified in setCode(java.lang.String) (URL).

Notice that, if URI is specified, it will be encoded (Execution.encodeURL(java.lang.String)).

Since:
3.6.2

isMayscript

public boolean isMayscript()
Returns whether the applet is allowed to access the scripting object.

Default: false.

It is only necessary for the applet to control the page script objects. It is not necessary for the page objects to control the applet.

Since:
5.0.3

setMayscript

public void setMayscript(boolean mayscript)
Sets whether the applet is allowed to access the scripting object.

Since:
5.0.3

getArchive

public String getArchive()
Returns the location of an archive file (URL).

Default: null (no archive at all)

Since:
5.0.3

setArchive

public void setArchive(String archive)
Sets the location of an archive file (URL).

Notice that, if URI is specified, it will be encoded (Execution.encodeURL(java.lang.String)).

Since:
5.0.3

getAlign

public String getAlign()
Returns the alignment of an applet according to surrounding elements.

Default: null (browser default)

Since:
5.0.3

setAlign

public void setAlign(String align)
Sets the alignment of an applet according to surrounding elements.

Refer to HTML <applet> Tagfor more information.

Since:
5.0.3

getHspace

public String getHspace()
Returns the horizontal spacing around an applet.

Default: null (browser default)

Since:
5.0.3

setHspace

public void setHspace(String hspace)
Sets the horizontal spacing in pixels around an applet.

Since:
5.0.3

getVspace

public String getVspace()
Returns the vertical spacing around an applet.

Default: null (browser default)

Since:
5.0.3

setVspace

public void setVspace(String vspace)
Sets the vertical spacing in pixels around an applet.

Since:
5.0.3

setParams

public void setParams(Map<String,String> params)
Sets a map of parameters (all existent parameters are removed first).


getParams

public Map<String,String> getParams()
Returns a map of parameters (never null).


setParam

public String setParam(String name,
                       String value)
Sets a parameter. If the value is null, the parameter is removed.


getDynamicProperty

public Object getDynamicProperty(String name)
Specified by:
getDynamicProperty in interface org.zkoss.zk.ui.ext.DynamicPropertied

hasDynamicProperty

public boolean hasDynamicProperty(String name)
Specified by:
hasDynamicProperty in interface org.zkoss.zk.ui.ext.DynamicPropertied

setDynamicProperty

public void setDynamicProperty(String name,
                               Object value)
                        throws org.zkoss.zk.ui.WrongValueException
Specified by:
setDynamicProperty in interface org.zkoss.zk.ui.ext.DynamicPropertied
Throws:
org.zkoss.zk.ui.WrongValueException

invoke

public void invoke(String function)
Invokes the function of the applet running at the client.


invoke

public void invoke(String function,
                   String argument)
Invokes the function of the applet running at the client with one argument.


invoke

public void invoke(String function,
                   String[] arguments)
Invokes the function of the applet running at the client with variable number argument.


setField

public void setField(String field,
                     String value)
Sets the value of the specified filed.


isChildable

protected boolean isChildable()
No child is allowed.

Overrides:
isChildable in class org.zkoss.zk.ui.AbstractComponent

renderProperties

protected void renderProperties(org.zkoss.zk.ui.sys.ContentRenderer renderer)
                         throws IOException
Overrides:
renderProperties in class org.zkoss.zk.ui.HtmlBasedComponent
Throws:
IOException


Copyright © 2013. All rights reserved.