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>>
ImmutableLineitemcomponentLineitem 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 classILineitem.Builder<I extends IAnyGroup>Builds instances of typeILineitem.static classILineitem.UpdaterBuilds an updater of typeILineitemforUiAgent.smartUpdate(Locator, SmartUpdater).
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description java.lang.StringgetBackSpace()Returns the spacing with the next lineitem.java.lang.StringgetFrontSpace()Returns the spacing with the previous lineitem.java.lang.StringgetPointIconSclass()Returns the iconSclass name of this point.org.zkoss.image.ImagegetPointImageContent()Returns the content set bywithPointImageContent(org.zkoss.image.Image).java.lang.StringgetPointImageSrc()Returns the source URI of the point image.java.lang.StringgetPointStyle()Returns the CSS style for the point.default java.lang.StringgetWidgetClass()Returns the client widget class.default booleanisOpposite()Returns whether the first child is displayed in the first area(left/top).default booleanisPointVisible()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 ofthisimmutable component with the specifiedbackSpace.ILineitem<I>withFrontSpace(java.lang.String frontSpace)Returns a copy ofthisimmutable component with the specifiedfrontSpace.ILineitem<I>withOpposite(boolean opposite)Returns a copy ofthisimmutable component with the specifiedopposite.ILineitem<I>withPointIconSclass(java.lang.String pointIconSclass)Returns a copy ofthisimmutable component with the specifiedpointIconSclass.default ILineitem<I>withPointImageContent(java.awt.image.RenderedImage image)Returns a copy ofthisimmutable component with the specifiedimage.ILineitem<I>withPointImageContent(org.zkoss.image.Image pointImageContent)Returns a copy ofthisimmutable component with the specifiedpointImageContent.ILineitem<I>withPointImageSrc(java.lang.String pointImageSrc)Returns a copy ofthisimmutable component with the specifiedpointImageSrc.ILineitem<I>withPointStyle(java.lang.String pointStyle)Returns a copy ofthisimmutable component with the specifiedpointStyle.ILineitem<I>withPointVisible(boolean pointVisible)Returns a copy ofthisimmutable 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:
getWidgetClassin 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 ofthisimmutable component with the specifiedpointStyle.Sets the pointStyle.
- Parameters:
pointStyle- Sets the pointStyle.Default:
null.- Returns:
- A modified copy of the
thisobject
-
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 ofthisimmutable component with the specifiedpointIconSclass.Sets the pointIconSclass name of the point.
- Parameters:
pointIconSclass- Sets the pointStyle.Default:
null.- Returns:
- A modified copy of the
thisobject
-
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 ofthisimmutable 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
thisobject
-
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 ofthisimmutable 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
thisobject
-
isPointVisible
default boolean isPointVisible()
Returns whether the point is visible.Default:
true.
-
withPointVisible
ILineitem<I> withPointVisible(boolean pointVisible)
Returns a copy ofthisimmutable 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
thisobject
-
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 ofthisimmutable 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
thisobject
-
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 ofthisimmutable 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
thisobject
-
getPointImageContent
@Nullable org.zkoss.image.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 org.zkoss.image.Image pointImageContent)
Returns a copy ofthisimmutable component with the specifiedpointImageContent.Sets the content directly.
Default:
null.Calling this method implies
withPointImageSrcis 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
thisobject - See Also:
withPointImageSrc(String)
-
withPointImageContent
default ILineitem<I> withPointImageContent(@Nullable java.awt.image.RenderedImage image)
Returns a copy ofthisimmutable 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
Imagesdirectly.- Parameters:
image- The image to display.- Returns:
- A modified copy of
thisobject
-
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.
-
-