org.zkoss.zul
Class Iframe

java.lang.Object
  extended by org.zkoss.zk.ui.AbstractComponent
      extended by org.zkoss.zk.ui.HtmlBasedComponent
          extended by org.zkoss.zul.impl.XulElement
              extended by org.zkoss.zul.Iframe
All Implemented Interfaces:
java.io.Serializable, java.lang.Cloneable, org.zkoss.zk.ui.Component, org.zkoss.zk.ui.sys.ComponentCtrl

public class Iframe
extends XulElement

Includes an inline frame.

Author:
tomyeh
See Also:
Serialized Form

Nested Class Summary
protected  class Iframe.ExtraCtrl
          A utility class to implement AbstractComponent.getExtraCtrl().
 
Field Summary
 
Fields inherited from class org.zkoss.zk.ui.HtmlBasedComponent
RS_NO_DISPLAY, RS_NO_HEIGHT, RS_NO_WIDTH
 
Fields inherited from interface org.zkoss.zk.ui.Component
APPLICATION_SCOPE, COMPONENT_SCOPE, DESKTOP_SCOPE, PAGE_SCOPE, REQUEST_SCOPE, SESSION_SCOPE, SPACE_SCOPE
 
Constructor Summary
Iframe()
           
Iframe(java.lang.String src)
           
 
Method Summary
 java.lang.String getAlign()
          Returns the alignment.
 org.zkoss.util.media.Media getContent()
          Returns the content set by setContent(org.zkoss.util.media.Media).
 java.lang.String getName()
          Returns the frame name.
 java.lang.String getOuterAttrs()
           
 java.lang.String getSrc()
          Returns the src.
 boolean isAutohide()
          Returns whether to automatically hide this component if a popup or dropdown is overlapped with it.
 boolean isChildable()
          Default: not childable.
protected  java.lang.Object newExtraCtrl()
           
 void setAlign(java.lang.String align)
          Sets the alignment: one of top, middle, bottom, left, right and center.
 void setAutohide(boolean autohide)
          Sets whether to automatically hide this component if a popup or dropdown is overlapped with it.
 void setContent(org.zkoss.util.media.Media media)
          Sets the content directly.
 void setName(java.lang.String name)
          Sets the frame name.
 void setSrc(java.lang.String src)
          Sets the src.
 
Methods inherited from class org.zkoss.zul.impl.XulElement
getAction, getAllOnClickAttrs, getContext, getInnerAttrs, getPopup, getTooltip, setAction, setContext, setPopup, setTooltip
 
Methods inherited from class org.zkoss.zk.ui.HtmlBasedComponent
addEventListener, appendAsapAttr, focus, getDraggable, getDroppable, getHeight, getLeft, getRealStyle, getRealStyleFlags, getSclass, getStyle, getTooltiptext, getTop, getWidth, getZIndex, isAsapRequired, removeEventListener, setClass, setDraggable, setDroppable, setHeight, setLeft, setSclass, setStyle, setTooltiptext, setTop, setWidth, setZIndex
 
Methods inherited from class org.zkoss.zk.ui.AbstractComponent
addAnnotation, addAnnotation, addEventHandler, addSharedAnnotationMap, addSharedEventHandlerMap, appendChild, applyProperties, clone, containsVariable, detach, equals, getAnnotatedProperties, getAnnotatedPropertiesBy, getAnnotation, getAnnotation, getAnnotations, getAnnotations, getAttribute, getAttribute, getAttributes, getAttributes, getChildren, getDefinition, getDesktop, getEventHandler, getExtraCtrl, getFellow, getFellowIfAny, getId, getListenerIterator, getMold, getMoldURI, getNamespace, getPage, getParent, getPropagatee, getRoot, getSpaceOwner, getUuid, getVariable, insertBefore, invalidate, isListenerAvailable, isVisible, onChildAdded, onChildRemoved, onDrawNewChild, onWrongValue, redraw, removeAttribute, removeAttribute, removeChild, response, sessionDidActivate, sessionWillPassivate, setAttribute, setAttribute, setComponentDefinition, setId, setMold, setPage, setParent, setVariable, setVisible, smartUpdate, smartUpdate, smartUpdate, toString, unsetVariable
 
Methods inherited from class java.lang.Object
finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Iframe

public Iframe()

Iframe

public Iframe(java.lang.String src)
Method Detail

getAlign

public java.lang.String getAlign()
Returns the alignment.

Default: null (use browser default).


setAlign

public void setAlign(java.lang.String align)
Sets the alignment: one of top, middle, bottom, left, right and center.


getName

public java.lang.String getName()
Returns the frame name.

Default: null (use browser default).


setName

public void setName(java.lang.String name)
Sets the frame name.


isAutohide

public boolean isAutohide()
Returns whether to automatically hide this component if a popup or dropdown is overlapped with it.

Default: false.

If an iframe contains PDF or other embeds, it will be placed on top of other components. It may then make popups and dropdowns obscure. In this case, you have to specify autohide="true" to ask ZK to hide the iframe when popups or dropdowns is overlapped with the iframe.


setAutohide

public void setAutohide(boolean autohide)
Sets whether to automatically hide this component if a popup or dropdown is overlapped with it.


getSrc

public java.lang.String getSrc()
Returns the src.

Default: null.


setSrc

public void setSrc(java.lang.String src)
Sets the src.

If src is changed, the whole component is invalidate. Thus, you want to smart-update, you have to override this method.

Parameters:
src - the source URL. If null or empty, nothing is included.

setContent

public void setContent(org.zkoss.util.media.Media media)
Sets the content directly. Default: null.

Parameters:
media - the media for this inline frame. If not null, it has higher priority than getSrc().

getContent

public org.zkoss.util.media.Media getContent()
Returns the content set by setContent(org.zkoss.util.media.Media).

Note: it won't fetch what is set thru by setSrc(java.lang.String). It simply returns what is passed to setContent(org.zkoss.util.media.Media).


getOuterAttrs

public java.lang.String getOuterAttrs()
Overrides:
getOuterAttrs in class XulElement

isChildable

public boolean isChildable()
Default: not childable.

Specified by:
isChildable in interface org.zkoss.zk.ui.Component
Overrides:
isChildable in class org.zkoss.zk.ui.AbstractComponent

newExtraCtrl

protected java.lang.Object newExtraCtrl()
Overrides:
newExtraCtrl in class org.zkoss.zk.ui.HtmlBasedComponent


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