org.zkoss.zul
Class Style

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

public class Style
extends org.zkoss.zk.ui.AbstractComponent

The style component used to specify CSS styles for the owner desktop.

Note: a style component can appear anywhere in a ZUML page, but it affects all components in the same desktop.

Author:
tomyeh
See Also:
Serialized Form

Field Summary
 
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
Style()
           
Style(java.lang.String src)
           
 
Method Summary
 java.lang.String getSrc()
          Returns the URI of an external style sheet.
 boolean insertBefore(org.zkoss.zk.ui.Component child, org.zkoss.zk.ui.Component insertBefore)
          Only Label children are allowed.
 void onChildRemoved(org.zkoss.zk.ui.Component child)
           
 void redraw(java.io.Writer out)
           
 void setSrc(java.lang.String src)
          Sets the URI of an external style sheet.
 
Methods inherited from class org.zkoss.zk.ui.AbstractComponent
addAnnotation, addAnnotation, addEventHandler, addEventListener, 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, invalidate, isChildable, isListenerAvailable, isVisible, newExtraCtrl, onChildAdded, onDrawNewChild, onWrongValue, removeAttribute, removeAttribute, removeChild, removeEventListener, 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

Style

public Style()

Style

public Style(java.lang.String src)
Parameters:
src - the URI of an external style sheet.
Method Detail

getSrc

public java.lang.String getSrc()
Returns the URI of an external style sheet.

Default: null. If null, the children's (must be instances of Label) value (Label.getValue()) is used as the content of styles. If not null, the HTML LINK tag is generated to ask the browser to load the specified style sheet.

Note: If not null, the content of children are ignored.


setSrc

public void setSrc(java.lang.String src)
Sets the URI of an external style sheet.

Parameters:
src - the URI of an external style sheet, or null to use the content of children (Label.getValue()) instead.

insertBefore

public boolean insertBefore(org.zkoss.zk.ui.Component child,
                            org.zkoss.zk.ui.Component insertBefore)
Only Label children are allowed.

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

onChildRemoved

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

redraw

public void redraw(java.io.Writer out)
            throws java.io.IOException
Specified by:
redraw in interface org.zkoss.zk.ui.Component
Overrides:
redraw in class org.zkoss.zk.ui.AbstractComponent
Throws:
java.io.IOException


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