|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.zkoss.zk.ui.AbstractComponent
org.zkoss.zk.ui.HtmlBasedComponent
org.zkoss.zul.impl.XulElement
org.zkoss.zkex.zul.Fisheye
public class Fisheye
A fisheye item.
Default getZclass(): z-fisheye.
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from class org.zkoss.zk.ui.HtmlBasedComponent |
|---|
HtmlBasedComponent.ExtraCtrl |
| Nested classes/interfaces inherited from class org.zkoss.zk.ui.AbstractComponent |
|---|
AbstractComponent.Children |
| Field Summary |
|---|
| Fields inherited from class org.zkoss.zk.ui.HtmlBasedComponent |
|---|
_zclass, RS_NO_DISPLAY, RS_NO_HEIGHT, RS_NO_WIDTH |
| Fields inherited from class org.zkoss.zk.ui.AbstractComponent |
|---|
_visible |
| 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 | |
|---|---|
Fisheye()
|
|
Fisheye(java.lang.String label,
java.lang.String image)
|
|
| Method Summary | |
|---|---|
void |
beforeParentChanged(Component parent)
Default: does nothing. |
java.lang.String |
getImage()
Returns the image URI. |
java.lang.String |
getLabel()
Returns the label (never null). |
java.lang.String |
getOuterAttrs()
Returns the exterior attributes for generating the enclosing HTML tag; never return null. |
protected java.lang.String |
getRealStyle()
Returns the real style that will be generated to client (when HtmlBasedComponent.getOuterAttrs() is called). |
protected int |
getRealStyleFlags()
Returns a combination of HtmlBasedComponent.RS_NO_WIDTH and HtmlBasedComponent.RS_NO_HEIGHT. |
java.lang.String |
getZclass()
Returns the ZK Cascading Style class(es) for this component. |
boolean |
isChildable()
Not childable. |
void |
setHeight(java.lang.String height)
This method is unsupported. |
void |
setImage(java.lang.String image)
Sets the image URI. |
void |
setLabel(java.lang.String label)
Sets the label. |
void |
setWidth(java.lang.String width)
This method is unsupported. |
| Methods inherited from class org.zkoss.zul.impl.XulElement |
|---|
getAction, getActionAttrs, getAllOnClickAttrs, getContext, getCtrlKeys, getInnerAttrs, getPopup, getTooltip, setAction, setContext, setContext, setCtrlKeys, setPopup, setPopup, setTooltip, setTooltip |
| Methods inherited from class org.zkoss.zk.ui.HtmlBasedComponent |
|---|
focus, getAllOnClickAttrs, getDraggable, getDroppable, getHeight, getLeft, getMoldSclass, getRealSclass, getSclass, getStyle, getTooltiptext, getTop, getWidth, getZindex, getZIndex, newExtraCtrl, redraw, setClass, setDraggable, setDroppable, setFocus, setLeft, setMoldSclass, setSclass, setStyle, setTooltiptext, setTop, setZclass, setZindex, setZIndex |
| Methods inherited from class java.lang.Object |
|---|
finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface org.zkoss.zul.impl.api.XulElement |
|---|
getAction, getContext, getCtrlKeys, getPopup, getTooltip, setAction, setContext, setContext, setCtrlKeys, setPopup, setPopup, setTooltip, setTooltip |
| Methods inherited from interface org.zkoss.zk.ui.api.HtmlBasedComponent |
|---|
focus, getHeight, getLeft, getSclass, getStyle, getTooltiptext, getTop, getWidth, getZindex, getZIndex, setDraggable, setDroppable, setFocus, setLeft, setSclass, setStyle, setTooltiptext, setTop, setZclass, setZindex, setZIndex |
| Constructor Detail |
|---|
public Fisheye()
public Fisheye(java.lang.String label,
java.lang.String image)
| Method Detail |
|---|
public java.lang.String getLabel()
Default: "".
getLabel in interface Fisheyepublic void setLabel(java.lang.String label)
setLabel in interface Fisheyepublic java.lang.String getImage()
Default: null.
getImage in interface Fisheyepublic void setImage(java.lang.String image)
setImage in interface Fisheyeprotected java.lang.String getRealStyle()
HtmlBasedComponentHtmlBasedComponent.getOuterAttrs() is called).
Default: this method will append width, height and others
to HtmlBasedComponent.setStyle(java.lang.String) (never null).
Use HtmlBasedComponent.getRealStyleFlags() to control what attributes to
exclude.
getRealStyle in class HtmlBasedComponentpublic java.lang.String getZclass()
HtmlBasedComponentDefault: null (the default value depends on element).
HtmlBasedComponent.setZclass(java.lang.String)) will completely replace the default style
of a component. In other words, the default style of a component
is associated with the default value of HtmlBasedComponent.getZclass().
Once it is changed, the default style won't be applied at all.
If you want to perform small adjustments, use HtmlBasedComponent.setSclass(java.lang.String)
instead.
getZclass in interface HtmlBasedComponentgetZclass in class HtmlBasedComponentHtmlBasedComponent.getSclass(),
HtmlBasedComponent.getRealSclass()protected int getRealStyleFlags()
HtmlBasedComponentHtmlBasedComponent.RS_NO_WIDTH and HtmlBasedComponent.RS_NO_HEIGHT.
Default: return 0.
getRealStyleFlags in class HtmlBasedComponentpublic void setWidth(java.lang.String width)
Fisheyebar.setItemWidth(int) instead.
setWidth in interface HtmlBasedComponentsetWidth in class HtmlBasedComponentpublic void setHeight(java.lang.String height)
Fisheyebar.setItemHeight(int) instead.
setHeight in interface HtmlBasedComponentsetHeight in class HtmlBasedComponentpublic java.lang.String getOuterAttrs()
HtmlBasedComponentUsed only by component developers.
Default: Generates the tooltip text, style, sclass, draggable
and droppable attribute if necessary.
In other words, the corresponding attribute is generated if
HtmlBasedComponent.getTooltiptext(), HtmlBasedComponent.getRealStyle(),
HtmlBasedComponent.getSclass(), HtmlBasedComponent.getDraggable(), HtmlBasedComponent.getDroppable()
are defined.
You have to call both HtmlBasedComponent.getOuterAttrs() and
HtmlBasedComponent.getInnerAttrs() to generate complete attributes.
For simple components that all attributes are put on the outest HTML element, all you need is as follows.
<xx id="${self.uuid}"${self.outerAttrs}${self.innerAttrs}>
If you want to put attributes in a nested HTML element, you
shall use the following pattern. Notice: if HtmlBasedComponent.getInnerAttrs()
in a different tag, the tag must be named with "${self.uuid}!real".
<xx id="${self.uuid}"${self.outerAttrs}>
<yy id="${self.uuid}!real"${self.innerAttrs}>...
Note: This class handles non-deferrable event listeners automatically.
However, you have to invoke AbstractComponent.appendAsapAttr(java.lang.StringBuffer, java.lang.String) for each event
the component handles in HtmlBasedComponent.getOuterAttrs() as follows.
appendAsapAttr(sb, Events.ON_OPEN);
appendAsapAttr(sb, Events.ON_CHANGE);
Theorectically, you could put any attributes in either
HtmlBasedComponent.getInnerAttrs() or HtmlBasedComponent.getOuterAttrs().
However, zkau.js assumes all attributes are put at the outer one.
If you want something different, you have to provide your own
setAttr (refer to how checkbox is implemented).
getOuterAttrs in class XulElementpublic void beforeParentChanged(Component parent)
AbstractComponent
beforeParentChanged in interface ComponentCtrlbeforeParentChanged in class AbstractComponentparent - the new parent. If null, it means detachment.ComponentCtrl.beforeParentChanged(org.zkoss.zk.ui.Component)public boolean isChildable()
isChildable in interface ComponentisChildable in class AbstractComponent
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||