public class Style extends AbstractComponent
Note: a style component can appear anywhere in a ZUML page, but it affects all components in the same desktop.
There are two formats when used in a ZUML page:
Method 1: Specify the URL of the CSS file
<style src="my.css"/>
Method 2: Specify the CSS directly
<style>
.mycls {
border: 1px outset #777;
}
</style>
Note: if the src and content properties are both set, the later one overrides the previous one.
AbstractComponent.Children
APPLICATION_SCOPE, COMPONENT_SCOPE, DESKTOP_SCOPE, PAGE_SCOPE, REQUEST_SCOPE, SESSION_SCOPE, SPACE_SCOPE
AFTER_CHILD_ADDED, AFTER_CHILD_REMOVED, AFTER_PAGE_ATTACHED, AFTER_PAGE_DETACHED, CE_BUSY_IGNORE, CE_DUPLICATE_IGNORE, CE_IMPORTANT, CE_NON_DEFERRABLE, CE_REPEAT_IGNORE
Constructor and Description |
---|
Style() |
Style(java.lang.String src) |
Style(java.lang.String src,
java.lang.String media) |
Modifier and Type | Method and Description |
---|---|
java.lang.String |
getContent()
Returns the content of the style element.
|
java.lang.String |
getMedia()
Returns the media dependencies for this style sheet.
|
java.lang.String |
getSrc()
Returns the URI of an external style sheet.
|
protected boolean |
isChildable()
Not childable.
|
boolean |
isDynamic()
Deprecated.
As of release 5.0.0, it is decided automatically.
|
protected void |
renderProperties(ContentRenderer renderer)
Called by (
ComponentCtrl.redraw(java.io.Writer) ) to render the
properties, excluding the enclosing tag and children. |
void |
setContent(java.lang.String content)
Sets the content of the style element.
|
void |
setDynamic(boolean dynamic)
Deprecated.
As of release 5.0.0, it is decided automatically.
|
void |
setMedia(java.lang.String media)
Sets the media dependencies for this style sheet.
|
void |
setSrc(java.lang.String src)
Sets the URI of an external style sheet.
|
boolean |
setVisible(boolean visible)
Not allowed.
|
addAnnotation, addAnnotation, addCallback, addClientEvent, addEventHandler, addEventListener, addEventListener, addForward, addForward, addForward, addForward, addMoved, addRedrawCallback, addScopeListener, addShadowRoot, addShadowRootBefore, addSharedEventHandlerMap, appendChild, applyProperties, beforeChildAdded, beforeChildRemoved, beforeParentChanged, clone, detach, didActivate, didActivate, didDeserialize, didDeserialize, disableBindingAnnotation, disableClientUpdate, enableBindingAnnotation, equals, getAnnotatedProperties, getAnnotatedPropertiesBy, getAnnotation, getAnnotation, getAnnotations, getAnnotations, getAnnotations, getAttribute, getAttribute, getAttribute, getAttributeOrFellow, getAttributes, getAttributes, getAuService, getAutag, getCallback, getChildren, getClientAttribute, getClientDataAttribute, getClientEvents, getDefaultMold, getDefinition, getDesktop, getEventHandler, getEventHandlerNames, getEventListenerMap, getEventListeners, getExtraCtrl, getFellow, getFellow, getFellowIfAny, getFellowIfAny, getFellows, getFirstChild, getId, getLastChild, getListenerIterator, getMold, getNextSibling, getPage, getParent, getPreviousSibling, getPropertyAccess, getRedrawCallback, getRoot, getShadowFellowIfAny, getShadowRoots, getShadowVariable, getShadowVariable, getShadowVariable0, getSpaceOwner, getSpecialRendererOutput, getStubonly, getSubBindingAnnotationCount, getTemplate, getTemplateNames, getUuid, getWidgetAttribute, getWidgetAttributeNames, getWidgetClass, getWidgetListener, getWidgetListenerNames, getWidgetOverride, getWidgetOverrideNames, hasAttribute, hasAttribute, hasAttribute, hasAttributeOrFellow, hasBindingAnnotation, hasFellow, hasFellow, hasSubBindingAnnotation, insertBefore, invalidate, isInvalidated, isListenerAvailable, isVisible, onChildAdded, onChildRemoved, onPageAttached, onPageDetached, onWrongValue, query, queryAll, redraw, redrawChildren, removeAttribute, removeAttribute, removeAttribute, removeCallback, removeChild, removeEventListener, removeForward, removeForward, removeRedrawCallback, removeScopeListener, removeShadowRoot, render, render, render, replace, response, response, response, service, service, sessionDidActivate, sessionWillPassivate, setAttribute, setAttribute, setAttribute, setAuService, setAutag, setClientAttribute, setClientDataAttribute, setDefinition, setDefinition, setId, setMold, setPage, setPageBefore, setParent, setStubonly, setStubonly, setSubBindingAnnotationCount, setTemplate, setVisibleDirectly, setWidgetAttribute, setWidgetClass, setWidgetListener, setWidgetOverride, smartUpdate, smartUpdate, smartUpdate, smartUpdate, smartUpdate, smartUpdate, smartUpdate, smartUpdate, smartUpdate, smartUpdateWidgetListener, smartUpdateWidgetOverride, toString, updateByClient, updateSubBindingAnnotationCount, willPassivate, willPassivate, willSerialize, willSerialize
public Style()
public Style(java.lang.String src)
src
- the URI of an external style sheet.public Style(java.lang.String src, java.lang.String media)
src
- the URI of an external style sheet.media
- the media dependencies for the style sheet.public void setDynamic(boolean dynamic)
public boolean isDynamic()
public java.lang.String getSrc()
Default: null.
public void setSrc(java.lang.String src)
Calling this method implies setContent(null).
In other words, the last invocation of setSrc(java.lang.String)
overrides
the previous setContent(java.lang.String)
, if any.
src
- the URI of an external style sheetsetContent(java.lang.String)
public java.lang.String getMedia()
Default: null.
Refer to media-depedent style sheet for details.
public void setMedia(java.lang.String media)
Refer to media-depedent style sheet for details.
media
- the media dependencies for this style sheetpublic java.lang.String getContent()
Default: null.
Deriving class can override this method to return whatever it prefers (ignored if null).
public void setContent(java.lang.String content)
Calling this method implies setSrc(null).
In other words, the last invocation of setContent(java.lang.String)
overrides
the previous setSrc(java.lang.String)
, if any.
setSrc(java.lang.String)
protected void renderProperties(ContentRenderer renderer) throws java.io.IOException
AbstractComponent
ComponentCtrl.redraw(java.io.Writer)
) to render the
properties, excluding the enclosing tag and children.
Default: it renders AbstractComponent.getId()
if it was assigned,
and event names if listened (and listed in AbstractComponent.getClientEvents()
).
Note: it doesn't render AbstractComponent.getWidgetClass()
, AbstractComponent.getUuid()
and AbstractComponent.getMold()
, which are caller's job.
renderProperties
in class AbstractComponent
java.io.IOException
public boolean setVisible(boolean visible)
setVisible
in interface Component
setVisible
in class AbstractComponent
protected boolean isChildable()
isChildable
in class AbstractComponent
Copyright © 2005-2018 Potix Corporation. All Rights Reserved.