org.zkoss.zkex.zul
Class Fisheye

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.zkex.zul.Fisheye
All Implemented Interfaces:
java.io.Serializable, java.lang.Cloneable, HtmlBasedComponent, Component, Scope, ComponentCtrl, Fisheye, XulElement

public class Fisheye
extends XulElement
implements Fisheye

A fisheye item.

Default getZclass(): z-fisheye.

Since:
3.5.0
Author:
jumperchen
See Also:
Serialized Form

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 org.zkoss.zk.ui.AbstractComponent
addAnnotation, addAnnotation, addEventHandler, addEventListener, addForward, addForward, addForward, addForward, addMoved, addSharedAnnotationMap, addSharedEventHandlerMap, appendAsapAttr, appendAsapAttr, appendChild, applyProperties, beforeChildAdded, beforeChildRemoved, clone, containsVariable, detach, disableClientUpdate, equals, getAnnotatedProperties, getAnnotatedPropertiesBy, getAnnotation, getAnnotation, getAnnotations, getAnnotations, getAttribute, getAttribute, getAttributes, getAttributes, getChildren, getCommand, getDefinition, getDesktop, getEventHandler, getEventHandlerNames, getExtraCtrl, getFellow, getFellowIfAny, getFellows, getFirstChild, getId, getLastChild, getListenerIterator, getMold, getMoldURI, getNamespace, getNextSibling, getPage, getParent, getPreviousSibling, getRoot, getSpaceOwner, getUuid, getVariable, hasFellow, insertBefore, invalidate, isAsapRequired, isInvalidated, isListenerAvailable, isVisible, newChildren, onChildAdded, onChildRemoved, onDrawNewChild, onPageAttached, onPageDetached, onWrongValue, removeAttribute, removeAttribute, removeChild, removeEventListener, removeForward, removeForward, response, sessionDidActivate, sessionWillPassivate, setAttribute, setAttribute, setComponentDefinition, setId, setMold, setPage, setPageBefore, setParent, setVariable, setVisible, smartUpdate, smartUpdate, smartUpdate, smartUpdateDeferred, smartUpdateValues, toString, unsetVariable
 
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
 
Methods inherited from interface org.zkoss.zk.ui.Component
addEventListener, addForward, addForward, addForward, addForward, appendChild, applyProperties, clone, containsVariable, detach, getAttribute, getAttribute, getAttributes, getAttributes, getChildren, getDefinition, getDesktop, getFellow, getFellowIfAny, getFellows, getFirstChild, getId, getLastChild, getListenerIterator, getMold, getNamespace, getNextSibling, getPage, getParent, getPreviousSibling, getRoot, getSpaceOwner, getUuid, getVariable, insertBefore, invalidate, isInvalidated, isListenerAvailable, isVisible, redraw, removeAttribute, removeAttribute, removeChild, removeEventListener, removeForward, removeForward, setAttribute, setAttribute, setId, setMold, setPage, setPageBefore, setParent, setVariable, setVisible, unsetVariable
 

Constructor Detail

Fisheye

public Fisheye()

Fisheye

public Fisheye(java.lang.String label,
               java.lang.String image)
Method Detail

getLabel

public java.lang.String getLabel()
Returns the label (never null).

Default: "".

Specified by:
getLabel in interface Fisheye

setLabel

public void setLabel(java.lang.String label)
Sets the label.

Specified by:
setLabel in interface Fisheye

getImage

public java.lang.String getImage()
Returns the image URI.

Default: null.

Specified by:
getImage in interface Fisheye

setImage

public void setImage(java.lang.String image)
Sets the image URI.

Specified by:
setImage in interface Fisheye

getRealStyle

protected java.lang.String getRealStyle()
Description copied from class: HtmlBasedComponent
Returns the real style that will be generated to client (when HtmlBasedComponent.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.

Overrides:
getRealStyle in class HtmlBasedComponent

getZclass

public java.lang.String getZclass()
Description copied from class: HtmlBasedComponent
Returns the ZK Cascading Style class(es) for this component. It usually depends on the implementation of the mold (@{link #getMold}).

Default: 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.

Specified by:
getZclass in interface HtmlBasedComponent
Overrides:
getZclass in class HtmlBasedComponent
See Also:
HtmlBasedComponent.getSclass(), HtmlBasedComponent.getRealSclass()

getRealStyleFlags

protected int getRealStyleFlags()
Description copied from class: HtmlBasedComponent
Returns a combination of HtmlBasedComponent.RS_NO_WIDTH and HtmlBasedComponent.RS_NO_HEIGHT.

Default: return 0.

Overrides:
getRealStyleFlags in class HtmlBasedComponent

setWidth

public void setWidth(java.lang.String width)
This method is unsupported. Please use Fisheyebar.setItemWidth(int) instead.

Specified by:
setWidth in interface HtmlBasedComponent
Overrides:
setWidth in class HtmlBasedComponent

setHeight

public void setHeight(java.lang.String height)
This method is unsupported. Please use Fisheyebar.setItemHeight(int) instead.

Specified by:
setHeight in interface HtmlBasedComponent
Overrides:
setHeight in class HtmlBasedComponent

getOuterAttrs

public java.lang.String getOuterAttrs()
Description copied from class: HtmlBasedComponent
Returns the exterior attributes for generating the enclosing HTML tag; never return null.

Used 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).

Overrides:
getOuterAttrs in class XulElement

beforeParentChanged

public void beforeParentChanged(Component parent)
Description copied from class: AbstractComponent
Default: does nothing.

Specified by:
beforeParentChanged in interface ComponentCtrl
Overrides:
beforeParentChanged in class AbstractComponent
Parameters:
parent - the new parent. If null, it means detachment.
See Also:
ComponentCtrl.beforeParentChanged(org.zkoss.zk.ui.Component)

isChildable

public boolean isChildable()
Not childable.

Specified by:
isChildable in interface Component
Overrides:
isChildable in class AbstractComponent


Copyright &copy; 2005-2009 Potix Corporation. All Rights Reserved. SourceForge.net Logo