Interface ILabelImageElement<I extends ILabelImageElement>
- All Superinterfaces:
IChildrenOfInputgroup<I>,IComponent<I>,IHtmlBasedComponent<I>,ILabelElement<I>,IXulElement<I>
- All Known Subinterfaces:
IA<I>,IAuxheader<I>,IAvatar,IBreadcrumbitem,IButton,IButtonBase<I>,ICaption<I>,ICarouselitem<I>,ICheckbox,ICheckboxBase<I>,IChip,IColumn<I>,ICombobutton,IComboitem,IFileupload,IFisheye,IFooter<I>,IFooterElement<I>,IHeaderElement<I>,IListcell<I>,IListfooter<I>,IListheader<I>,IMenu,IMenuitem,INav,INavitem,IOrgnode<I>,IRadio,ITab,IToolbarbutton,ITreecell<I>,ITreecol<I>,ITreefooter<I>
LabelImageElement interface
To turn on the preload image facility for this component, you have to specify
withPreloadImage(boolean) to true.
Or configure it from zk.xml by setting library properties. For example,
<library-property/>
<name>org.zkoss.zul.image.preload</name/>
<value>true</value/>
</library-property/>
Note: with zk.xml setting, it will affect to all subcomponents, which are
extended from ILabelImageElement- Author:
- katherine
-
Method Summary
Modifier and TypeMethodDescriptiondefault StringReturns the URI of the hover image.default StringReturns the icon font CSS class name.default String[]Returns the icon font CSS class name String array.default StringReturns the iconTooltip font.default String[]Returns the iconTooltip font String array.default StringgetImage()Returns the image URI.default booleanReturns whether to preload the image.withHoverImage(String hoverImage) Returns a copy ofthisimmutable component with the specifiedhoverImageURI.withIconSclass(String iconSclass) Returns a copy ofthisimmutable component with the specifiediconSclass.withIconSclasses(String[] iconSclasses) Returns a copy ofthisimmutable component with the specifiediconSclassesString array.withIconTooltip(String iconTooltip) Returns a copy ofthisimmutable component with the specifiediconTooltip.withIconTooltips(String[] iconTooltips) Returns a copy ofthisimmutable component with the specifiediconTooltipsString array.Returns a copy ofthisimmutable component with the specifiedimageURI.withPreloadImage(boolean preloadImage) Returns a copy ofthisimmutable component with the specifiedpreloadImageURI.Methods inherited from interface org.zkoss.stateless.sul.IComponent
getAction, getActions, getClientAttributes, getId, getMold, getWidgetClass, getWidgetListeners, getWidgetOverrides, isVisible, withAction, withAction, withAction, withAction, withAction, withAction, withAction, withAction, withAction, withAction, withAction, withActions, withActions, withClientAttribute, withClientAttributes, withId, withMold, withVisible, withWidgetClass, withWidgetListener, withWidgetListeners, withWidgetOverride, withWidgetOverridesMethods inherited from interface org.zkoss.stateless.sul.IHtmlBasedComponent
getClientAction, getDraggable, getDroppable, getHeight, getHflex, getLeft, getRenderdefer, getSclass, getSkeleton, getStyle, getTabindex, getTooltiptext, getTop, getVflex, getWidth, getZclass, getZIndex, isFocus, withClientAction, withDraggable, withDroppable, withFocus, withHeight, withHflex, withLeft, withRenderdefer, withSclass, withSkeleton, withStyle, withTabindex, withTabindex, withTooltiptext, withTop, withVflex, withWidth, withZclass, withZIndexMethods inherited from interface org.zkoss.stateless.sul.ILabelElement
getLabel, withLabelMethods inherited from interface org.zkoss.stateless.sul.IXulElement
getContext, getCtrlKeys, getPopup, getTooltip, withContext, withCtrlKeys, withPopup, withTooltip
-
Method Details
-
getIconSclass
Returns the icon font CSS class name. -
withIconSclass
Returns a copy ofthisimmutable component with the specifiediconSclass.Sets the CSS class name for the icon font.
- Parameters:
iconSclass- A CSS class name for the icon font.- Returns:
- A modified copy of the
thisobject
-
getIconSclasses
Returns the icon font CSS class name String array. -
withIconSclasses
Returns a copy ofthisimmutable component with the specifiediconSclassesString array.Sets the CSS class name for the icon font.
- Parameters:
iconSclasses- A CSS class name for the icon font.- Returns:
- A modified copy of the
thisobject
-
getIconTooltip
Returns the iconTooltip font. -
withIconTooltip
Returns a copy ofthisimmutable component with the specifiediconTooltip.Sets the iconTooltip.
- Parameters:
iconTooltip- A content String for iconTooltip font.- Returns:
- A modified copy of the
thisobject
-
getIconTooltips
Returns the iconTooltip font String array. -
withIconTooltips
Returns a copy ofthisimmutable component with the specifiediconTooltipsString array.Sets the iconTooltip.
- Parameters:
iconTooltips- A content String array for iconTooltip font.- Returns:
- A modified copy of the
thisobject
-
getImage
Returns the image URI.Default:
null. -
withImage
Returns a copy ofthisimmutable component with the specifiedimageURI.Sets the image URI. The image would hide if specify to
null- Returns:
- A modified copy of the
thisobject
-
getHoverImage
Returns the URI of the hover image. The hover image is used when the mouse is moving over this component.Default:
null. -
withHoverImage
Returns a copy ofthisimmutable component with the specifiedhoverImageURI.Sets the image URI. The hover image is used when the mouse is moving over this component.
- Returns:
- A modified copy of the
thisobject
-
isPreloadImage
default boolean isPreloadImage()Returns whether to preload the image.Default:
false, if the"org.zkoss.zul.image.preload"library property is not set in zk.xml. -
withPreloadImage
Returns a copy ofthisimmutable component with the specifiedpreloadImageURI.Sets to
trueto enable to preload the image. Note: the priority of this attribute is higher than zk.xml if both preload image are specified.- Returns:
- A modified copy of the
thisobject
-