public interface Macro extends AfterCompose, IdSpace, DynamicPropertied
Component
to represent
a macro component.Modifier and Type | Method and Description |
---|---|
java.lang.String |
getMacroURI()
Returns the macro URI.
|
boolean |
isInline()
Returns whether this is an inline macro.
|
void |
recreate()
Detaches all child components and then recreate them.
|
boolean |
setInlineParent(Component parent,
Component beforeSibling)
Sets the parent to the given one and insert the children of
the inline macro right before the given sibling (beforeSibling).
|
void |
setMacroURI(java.lang.String uri)
Sets the macro URI.
|
afterCompose
getFellow, getFellow, getFellowIfAny, getFellowIfAny, getFellows, hasFellow, hasFellow
addScopeListener, getAttribute, getAttribute, getAttributes, hasAttribute, hasAttribute, removeAttribute, removeAttribute, removeScopeListener, setAttribute, setAttribute
getDynamicProperty, hasDynamicProperty, setDynamicProperty
void setMacroURI(java.lang.String uri)
Note: this method calls recreate()
automatically
if uri is changed.
uri
- the URI of this macro. If null, the default is used.java.lang.String getMacroURI()
If setMacroURI(java.lang.String)
wasn't called, it returns the URI
defined in the macro definition.
void recreate()
It is used if you have assigned new values to dynamic properties and want to re-create child components to reflect the new values. Note: it is convenient but the performance is better if you can manipulate only the child components that need to be changed. Refer to ZK Developer's Reference for details.
boolean isInline()
ComponentDefinition.newInstance(org.zkoss.zk.ui.Page, java.lang.String)
.boolean setInlineParent(Component parent, Component beforeSibling)
This method is used only internally.
Notice that when AbstractComponent.insertBefore(org.zkoss.zk.ui.Component, org.zkoss.zk.ui.Component)
is called to insert an inline macro (isInline()
),
the invocation will be forwarded to this method.
It is called only isInline()
is true.
parent
- the parentbeforeSibling
- a child of the parent that the macro component
will be inserted beforejava.lang.IllegalStateException
- if isInline()
is false.Copyright © 2005-2011 Potix Corporation. All Rights Reserved.