org.zkoss.zul
Class Caption

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.impl.LabelElement
                  extended by org.zkoss.zul.impl.LabelImageElement
                      extended by org.zkoss.zul.Caption
All Implemented Interfaces:
java.io.Serializable, java.lang.Cloneable, org.zkoss.zk.ui.Component, org.zkoss.zk.ui.sys.ComponentCtrl

public class Caption
extends LabelImageElement

A header for a Groupbox. It may contain either a text label, using LabelElement.setLabel(java.lang.String), or child elements for a more complex caption.

Author:
tomyeh
See Also:
Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from class org.zkoss.zul.impl.LabelImageElement
LabelImageElement.ExtraCtrl
 
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
Caption()
           
Caption(java.lang.String label)
           
Caption(java.lang.String label, java.lang.String src)
           
 
Method Summary
 java.lang.String getCompoundLabel()
          Returns a compound label, which is the catenation of parent's title, if the parent is Window, and LabelElement.getLabel().
 java.lang.String getOuterAttrs()
           
 java.lang.String getSclass()
          Returns the style class.
 void invalidate()
           
 boolean isClosableVisible()
          Returns whether to display the closable button.
 boolean isLegend()
          Returns whether the legend mold shall be used.
 void setParent(org.zkoss.zk.ui.Component parent)
           
 
Methods inherited from class org.zkoss.zul.impl.LabelImageElement
getImage, getImageContent, getImgTag, getSrc, isImageAssigned, newExtraCtrl, setImage, setImageContent, setSrc
 
Methods inherited from class org.zkoss.zul.impl.LabelElement
getLabel, setLabel
 
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, 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, isChildable, isListenerAvailable, isVisible, onChildAdded, onChildRemoved, onDrawNewChild, onWrongValue, redraw, removeAttribute, removeAttribute, removeChild, response, sessionDidActivate, sessionWillPassivate, setAttribute, setAttribute, setComponentDefinition, setId, setMold, setPage, setVariable, setVisible, smartUpdate, smartUpdate, smartUpdate, toString, unsetVariable
 
Methods inherited from class java.lang.Object
finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Caption

public Caption()

Caption

public Caption(java.lang.String label)

Caption

public Caption(java.lang.String label,
               java.lang.String src)
Method Detail

getCompoundLabel

public java.lang.String getCompoundLabel()
Returns a compound label, which is the catenation of parent's title, if the parent is Window, and LabelElement.getLabel().

Note: this is designed to used for component templating. Application developers rarely need to access this method.

It is mainly used for component implementation.


isLegend

public boolean isLegend()
Returns whether the legend mold shall be used.

Note: this is designed to used for component templating. Application developers rarely need to access this method.

It is mainly used for component implementation.


isClosableVisible

public boolean isClosableVisible()
Returns whether to display the closable button.

Default: it returns true if the parent is window and Window.isClosable() is true.

It is mainly used for component implementation.


getSclass

public java.lang.String getSclass()
Returns the style class.

Default: return caption if the parent is groupbox, or title otherwise (say, the parent is window)

Overrides:
getSclass in class org.zkoss.zk.ui.HtmlBasedComponent

getOuterAttrs

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

setParent

public void setParent(org.zkoss.zk.ui.Component parent)
Specified by:
setParent in interface org.zkoss.zk.ui.Component
Overrides:
setParent in class org.zkoss.zk.ui.AbstractComponent

invalidate

public void invalidate()
Specified by:
invalidate in interface org.zkoss.zk.ui.Component
Overrides:
invalidate in class org.zkoss.zk.ui.AbstractComponent


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