Interface ILineitem<I extends IAnyGroup>
-
- All Superinterfaces:
IAnyGroup<ILineitem<I>>
,IChildable<ILineitem<I>,I>
,IComponent<ILineitem<I>>
,IHtmlBasedComponent<ILineitem<I>>
,IXulElement<ILineitem<I>>
public interface ILineitem<I extends IAnyGroup> extends IXulElement<ILineitem<I>>, IChildable<ILineitem<I>,I>, IAnyGroup<ILineitem<I>>
ImmutableLineitem
componentLineitem is the child of Linelayout, it can contain up to 2 components inside.
- Author:
- katherine
- See Also:
Lineitem
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static class
ILineitem.Builder<I extends IAnyGroup>
Builds instances of typeILineitem
.static class
ILineitem.Updater
Builds an updater of typeILineitem
forUiAgent.smartUpdate(Locator, SmartUpdater)
.
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description java.lang.String
getBackSpace()
Returns the spacing with the next lineitem.java.lang.String
getFrontSpace()
Returns the spacing with the previous lineitem.java.lang.String
getPointIconSclass()
Returns the iconSclass name of this point.Image
getPointImageContent()
Returns the content set bywithPointImageContent(org.zkoss.image.Image)
.java.lang.String
getPointImageSrc()
Returns the source URI of the point image.java.lang.String
getPointStyle()
Returns the CSS style for the point.default java.lang.String
getWidgetClass()
Returns the client widget class.default boolean
isOpposite()
Returns whether the first child is displayed in the first area(left/top).default boolean
isPointVisible()
Returns whether the point is visible.static <I extends IAnyGroup>
ILineitem<I>of(I... children)
Returns the instance with the given any group children (only up to two children).static <I extends IAnyGroup>
ILineitem<I>of(java.lang.Iterable<? extends I> children)
Returns the instance with the given any group children (only up to two children).static <I extends IAnyGroup>
ILineitem<I>ofId(java.lang.String id)
Returns the instance with the given id.static <I extends IAnyGroup>
ILineitem<I>ofPointIconSclass(java.lang.String pointIconSclass)
Returns the instance with the given pointIconSclass.static <I extends IAnyGroup>
ILineitem<I>ofPointImageSrc(java.lang.String src)
Returns the instance with the given pointImageSrc.ILineitem<I>
withBackSpace(java.lang.String backSpace)
Returns a copy ofthis
immutable component with the specifiedbackSpace
.ILineitem<I>
withFrontSpace(java.lang.String frontSpace)
Returns a copy ofthis
immutable component with the specifiedfrontSpace
.ILineitem<I>
withOpposite(boolean opposite)
Returns a copy ofthis
immutable component with the specifiedopposite
.ILineitem<I>
withPointIconSclass(java.lang.String pointIconSclass)
Returns a copy ofthis
immutable component with the specifiedpointIconSclass
.default ILineitem<I>
withPointImageContent(java.awt.image.RenderedImage image)
Returns a copy ofthis
immutable component with the specifiedimage
.ILineitem<I>
withPointImageContent(Image pointImageContent)
Returns a copy ofthis
immutable component with the specifiedpointImageContent
.ILineitem<I>
withPointImageSrc(java.lang.String pointImageSrc)
Returns a copy ofthis
immutable component with the specifiedpointImageSrc
.ILineitem<I>
withPointStyle(java.lang.String pointStyle)
Returns a copy ofthis
immutable component with the specifiedpointStyle
.ILineitem<I>
withPointVisible(boolean pointVisible)
Returns a copy ofthis
immutable component with the specifiedpointVisible
.-
Methods inherited from interface org.zkoss.stateless.sul.IChildable
getChildren, withChildren, withChildren
-
Methods inherited from interface org.zkoss.stateless.sul.IComponent
getAction, getActions, getClientAttributes, getId, getMold, 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, withWidgetOverrides
-
Methods inherited from interface org.zkoss.stateless.sul.IHtmlBasedComponent
getClientAction, getDraggable, getDroppable, getHeight, getHflex, getLeft, getRenderdefer, getSclass, getStyle, getTabindex, getTooltiptext, getTop, getVflex, getWidth, getZclass, getZIndex, isFocus, withClientAction, withDraggable, withDroppable, withFocus, withHeight, withHflex, withLeft, withRenderdefer, withSclass, withStyle, withTabindex, withTabindex, withTooltiptext, withTop, withVflex, withWidth, withZclass, withZIndex
-
Methods inherited from interface org.zkoss.stateless.sul.IXulElement
getContext, getCtrlKeys, getPopup, getTooltip, withContext, withCtrlKeys, withPopup, withTooltip
-
-
-
-
Method Detail
-
getWidgetClass
default java.lang.String getWidgetClass()
Returns the client widget class.Default:
"zkmax.layout.Lineitem"
- Specified by:
getWidgetClass
in interfaceIComponent<I extends IAnyGroup>
-
getPointStyle
@Nullable java.lang.String getPointStyle()
Returns the CSS style for the point.Default:
null
-
withPointStyle
ILineitem<I> withPointStyle(@Nullable java.lang.String pointStyle)
Returns a copy ofthis
immutable component with the specifiedpointStyle
.Sets the pointStyle.
- Parameters:
pointStyle
- Sets the pointStyle.Default:
null
.- Returns:
- A modified copy of the
this
object
-
getPointIconSclass
@Nullable java.lang.String getPointIconSclass()
Returns the iconSclass name of this point.
-
withPointIconSclass
ILineitem<I> withPointIconSclass(@Nullable java.lang.String pointIconSclass)
Returns a copy ofthis
immutable component with the specifiedpointIconSclass
.Sets the pointIconSclass name of the point.
- Parameters:
pointIconSclass
- Sets the pointStyle.Default:
null
.- Returns:
- A modified copy of the
this
object
-
getFrontSpace
@Nullable java.lang.String getFrontSpace()
Returns the spacing with the previous lineitem.
-
withFrontSpace
ILineitem<I> withFrontSpace(@Nullable java.lang.String frontSpace)
Returns a copy ofthis
immutable component with the specifiedfrontSpace
.Sets the spacing with the previous lineitem.
- Parameters:
frontSpace
- the spacing with the previous lineitem. (such as "5px" or "5em"). If null or empty (""), the default spacing is used (i.e., controlled by CSS alone).Default:
null
.- Returns:
- A modified copy of the
this
object
-
getBackSpace
@Nullable java.lang.String getBackSpace()
Returns the spacing with the next lineitem.
-
withBackSpace
ILineitem<I> withBackSpace(@Nullable java.lang.String backSpace)
Returns a copy ofthis
immutable component with the specifiedbackSpace
.Sets the spacing with the next lineitem.
- Parameters:
backSpace
- the spacing with the next lineitem. (such as "5px" or "5em"). If null or empty (""), the default spacing is used (i.e., controlled by CSS alone).Default:
null
.- Returns:
- A modified copy of the
this
object
-
isPointVisible
default boolean isPointVisible()
Returns whether the point is visible.Default:
true
.
-
withPointVisible
ILineitem<I> withPointVisible(boolean pointVisible)
Returns a copy ofthis
immutable component with the specifiedpointVisible
.Sets whether the point is visible.
- Parameters:
pointVisible
- Whether the point is visible.Default:
true
.- Returns:
- A modified copy of the
this
object
-
isOpposite
default boolean isOpposite()
Returns whether the first child is displayed in the first area(left/top).Default: false.
-
withOpposite
ILineitem<I> withOpposite(boolean opposite)
Returns a copy ofthis
immutable component with the specifiedopposite
.Sets whether the first child is displayed in the first area(left/top).
- Parameters:
opposite
- Whether the first child is displayed in the first area(left/top).Default:
true
.- Returns:
- A modified copy of the
this
object
-
getPointImageSrc
@Nullable java.lang.String getPointImageSrc()
Returns the source URI of the point image.Default:
null
.
-
withPointImageSrc
ILineitem<I> withPointImageSrc(@Nullable java.lang.String pointImageSrc)
Returns a copy ofthis
immutable component with the specifiedpointImageSrc
.Sets the source URI of the point image.
Note: the
withPointImageContent(org.zkoss.image.Image)
is higher priority if both methods are specified.- Parameters:
pointImageSrc
- The source URI of the point image.Default:
null
.- Returns:
- A modified copy of the
this
object
-
getPointImageContent
@Nullable Image getPointImageContent()
Returns the content set bywithPointImageContent(org.zkoss.image.Image)
.Note: it won't fetch what is set through by
withPointImageSrc(String)
. It simply returns what is passed towithPointImageContent(org.zkoss.image.Image)
.
-
withPointImageContent
ILineitem<I> withPointImageContent(@Nullable Image pointImageContent)
Returns a copy ofthis
immutable component with the specifiedpointImageContent
.Sets the content directly.
Default:
null
.Calling this method implies
withPointImageSrc
is useless. In other words, ThewithPointImageContent(org.zkoss.image.Image)
priority is higher than calling thewithPointImageSrc(String)
, if any.- Parameters:
pointImageContent
- The image to display.- Returns:
- A modified copy of
this
object - See Also:
withPointImageSrc(String)
-
withPointImageContent
default ILineitem<I> withPointImageContent(@Nullable java.awt.image.RenderedImage image)
Returns a copy ofthis
immutable component with the specifiedimage
.Sets the content directly with the rendered image. It actually encodes the rendered image to an PNG image (
Image
) withImages.encode(java.lang.String, java.awt.image.RenderedImage, float, boolean)
, and then invokewithPointImageContent(org.zkoss.image.Image)
}.If you want more control such as different format, quality, and naming, you can use
Images
directly.- Parameters:
image
- The image to display.- Returns:
- A modified copy of
this
object
-
of
static <I extends IAnyGroup> ILineitem<I> of(java.lang.Iterable<? extends I> children)
Returns the instance with the given any group children (only up to two children).- Parameters:
children
- The children belong to any group- See Also:
IAnyGroup
-
of
static <I extends IAnyGroup> ILineitem<I> of(I... children)
Returns the instance with the given any group children (only up to two children).- Parameters:
children
- The children belong to any group- See Also:
IAnyGroup
-
ofPointIconSclass
static <I extends IAnyGroup> ILineitem<I> ofPointIconSclass(java.lang.String pointIconSclass)
Returns the instance with the given pointIconSclass.- Parameters:
pointIconSclass
- The sclass name of the point icon.
-
ofPointImageSrc
static <I extends IAnyGroup> ILineitem<I> ofPointImageSrc(java.lang.String src)
Returns the instance with the given pointImageSrc.- Parameters:
src
- The source URI of the point background image.
-
-