Class AbstractLegend<T extends AbstractLegend<T>>
java.lang.Object
io.jmix.chartsflowui.kit.component.model.ChartObservableObject
io.jmix.chartsflowui.kit.component.model.legend.AbstractLegend<T>
- Type Parameters:
T
- origin legend class type
- All Implemented Interfaces:
HasBorder<T>
,HasPosition<T>
,HasShadow<T>
,HasPadding<T>
,Serializable
- Direct Known Subclasses:
Legend
,ScrollableLegend
public abstract class AbstractLegend<T extends AbstractLegend<T>>
extends ChartObservableObject
implements HasShadow<T>, HasPosition<T>, HasBorder<T>, HasPadding<T>
Base class for legend component.
- See Also:
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic enum
Legend marker and text aligning.static class
Component to configure the emphasis state.static enum
The position of the selector button, which can be placed at the end or start of the legend component.static class
The text label style of the selector button, which is displayed by default.static class
Text font style for legend component.Nested classes/interfaces inherited from class io.jmix.chartsflowui.kit.component.model.ChartObservableObject
ChartObservableObject.ObjectChangeEvent
-
Field Summary
Modifier and TypeFieldDescriptionprotected AbstractLegend.Align
protected Color
protected Color
protected Integer
protected Integer
protected String
protected AbstractLegend.Emphasis
protected String
protected JsFunction
protected String
protected String
protected String
protected Color
protected Integer
protected Color
protected Integer
protected Integer
protected ItemStyle
protected Integer
protected String
protected LineStyle
protected Orientation
protected Padding
protected String
protected SelectedMode
protected Boolean
protected Integer
protected Integer
protected AbstractLegend.SelectorLabel
protected AbstractLegend.Position
protected Integer
protected Color
protected Integer
protected Integer
protected Boolean
protected Integer
protected AbstractLegend.TextStyle
protected Tooltip
protected String
protected final LegendType
protected String
protected Integer
protected Integer
Fields inherited from class io.jmix.chartsflowui.kit.component.model.ChartObservableObject
children, dirty, listener
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
addSelectedSeries
(String seriesName, Boolean select) getAlign()
getIcon()
getId()
getLeft()
getRight()
getShow()
getTop()
getType()
getWidth()
getZ()
void
removeSelectedSeries
(String seriesName) void
setAlign
(AbstractLegend.Align align) void
setBackgroundColor
(Color backgroundColor) void
setBorderColor
(Color borderColor) Sets a border color or replaces an existing one.void
setBorderRadius
(Integer borderRadius) Sets a border radius of the text fragment or replaces an existing one.void
setBorderWidth
(Integer borderWidth) Sets a border width or replaces an existing one.void
Sets a distance between component and the bottom side of the container.
Possible values are: A pixel value like"20"
.void
setEmphasis
(AbstractLegend.Emphasis emphasis) void
setFormatter
(String formatter) void
setFormatterFunction
(JsFunction formatterFunction) void
setFormatterFunction
(String formatterFunction) void
void
void
void
setInactiveBorderColor
(Color inactiveBorderColor) void
setInactiveBorderWidth
(Integer inactiveBorderWidth) void
setInactiveColor
(Color inactiveColor) void
setItemGap
(Integer itemGap) void
setItemHeight
(Integer itemHeight) void
setItemStyle
(ItemStyle itemStyle) void
setItemWidth
(Integer itemWidth) void
Sets a distance between component and the left side of the container.
Possible values are: A pixel value like"20"
.void
setLineStyle
(LineStyle lineStyle) void
setOrientation
(Orientation orientation) void
setPadding
(Integer padding) Sets padding on each of the four sides or replaces an existing one.void
setPadding
(Integer vertical, Integer horizontal) Sets the top/bottom and left/right paddings or replaces an existing one.void
setPadding
(Integer top, Integer right, Integer bottom, Integer left) Sets each of the four paddings separately.void
Sets a distance between component and the right side of the container.
Possible values are: A pixel value like"20"
.void
setSelectedMode
(SelectedMode selectedMode) void
setSelectedSeries
(Map<String, Boolean> selectedSeries) void
setSelector
(Boolean selector) void
setSelectorButtonGap
(Integer selectorButtonGap) void
setSelectorItemGap
(Integer selectorItemGap) void
setSelectorLabel
(AbstractLegend.SelectorLabel selectorLabel) void
setSelectorPosition
(AbstractLegend.Position selectorPosition) void
setShadowBlur
(Integer shadowBlur) Sets depth of shadow blur or replaces an existing one.void
setShadowColor
(Color shadowColor) Sets a color for shadow or replaces an existing one.void
setShadowOffsetX
(Integer shadowOffsetX) Sets horizontal offset for shadow or replaces an existing one.void
setShadowOffsetY
(Integer shadowOffsetY) Sets vertical offset for shadow or replaces an existing one.void
void
setSymbolRotate
(Integer symbolRotate) void
setTextStyle
(AbstractLegend.TextStyle textStyle) void
setTooltip
(Tooltip tooltip) void
Sets a distance between component and the top side of the container.
Possible values are: A pixel value like"20"
.void
void
void
withAlign
(AbstractLegend.Align align) withBackgroundColor
(Color backgroundColor) withEmphasis
(AbstractLegend.Emphasis emphasis) withFormatter
(String formatter) withFormatterFunction
(JsFunction formatterFunction) withFormatterFunction
(String formatterFunction) withHeight
(String height) withInactiveBorderColor
(Color inactiveBorderColor) withInactiveBorderWidth
(Integer inactiveBorderWidth) withInactiveColor
(Color inactiveColor) withItemGap
(Integer itemGap) withItemHeight
(Integer itemHeight) withItemStyle
(ItemStyle itemStyle) withItemWidth
(Integer itemWidth) withLineStyle
(LineStyle lineStyle) withOrientation
(Orientation orientation) withSelectedMode
(SelectedMode selectedMode) withSelectedSeries
(String seriesName, Boolean select) withSelectedSeries
(Map<String, Boolean> selectedSeries) withSelector
(Boolean selector) withSelectorButtonGap
(Integer selectorButtonGap) withSelectorItemGap
(Integer selectorItemGap) withSelectorLabel
(AbstractLegend.SelectorLabel selectorLabel) withSelectorPosition
(AbstractLegend.Position selectorPosition) withSymbolRotate
(Integer symbolRotate) withTextStyle
(AbstractLegend.TextStyle textStyle) withTooltip
(Tooltip tooltip) withZLevel
(Integer zLevel) Methods inherited from class io.jmix.chartsflowui.kit.component.model.ChartObservableObject
addChild, fireChangeEvent, getChildren, isDirty, isDirtyInDepth, markAsDirty, markAsDirtyInDepth, removeChild, setChartObjectChangeListener, unmarkDirtyInDepth
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface io.jmix.chartsflowui.kit.component.model.HasBorder
withBorderColor, withBorderRadius, withBorderWidth
Methods inherited from interface io.jmix.chartsflowui.kit.component.model.shared.HasPadding
withPadding, withPadding, withPadding
Methods inherited from interface io.jmix.chartsflowui.kit.component.model.HasPosition
withBottom, withLeft, withRight, withTop
Methods inherited from interface io.jmix.chartsflowui.kit.component.model.HasShadow
withShadowBlur, withShadowColor, withShadowOffsetX, withShadowOffsetY
-
Field Details
-
type
-
id
-
show
-
zLevel
-
z
-
left
-
top
-
right
-
bottom
-
width
-
height
-
orientation
-
align
-
padding
-
itemGap
-
itemWidth
-
itemHeight
-
itemStyle
-
lineStyle
-
symbolRotate
-
formatter
-
formatterFunction
-
selectedMode
-
inactiveColor
-
inactiveBorderColor
-
inactiveBorderWidth
-
selectedSeries
-
textStyle
-
tooltip
-
icon
-
backgroundColor
-
borderColor
-
borderWidth
-
borderRadius
-
shadowBlur
-
shadowColor
-
shadowOffsetX
-
shadowOffsetY
-
emphasis
-
selector
-
selectorLabel
-
selectorPosition
-
selectorItemGap
-
selectorButtonGap
-
-
Constructor Details
-
AbstractLegend
-
-
Method Details
-
getType
-
getId
-
setId
-
withId
-
getShow
-
setShow
-
withShow
-
getZLevel
-
setZLevel
-
withZLevel
-
getZ
-
setZ
-
withZ
-
getLeft
- Specified by:
getLeft
in interfaceHasPosition<T extends AbstractLegend<T>>
- Returns:
- distance between component and the left side of the container
-
setLeft
Description copied from interface:HasPosition
Sets a distance between component and the left side of the container.
Possible values are:-
A pixel value like
"20"
. -
Percentage value relative to container width like
"20%"
. -
Predefined values like
"left"
,"center"
,"right"
.
- Specified by:
setLeft
in interfaceHasPosition<T extends AbstractLegend<T>>
- Parameters:
left
- distance to set
-
A pixel value like
-
getTop
- Specified by:
getTop
in interfaceHasPosition<T extends AbstractLegend<T>>
- Returns:
- distance between component and the top side of the container
-
setTop
Description copied from interface:HasPosition
Sets a distance between component and the top side of the container.
Possible values are:-
A pixel value like
"20"
. -
Percentage value relative to container width like
"20%"
. -
Predefined values like
"top"
,"middle"
,"bottom"
.
- Specified by:
setTop
in interfaceHasPosition<T extends AbstractLegend<T>>
- Parameters:
top
- distance to set
-
A pixel value like
-
getRight
- Specified by:
getRight
in interfaceHasPosition<T extends AbstractLegend<T>>
- Returns:
- distance between component and the right side of the container
-
setRight
Description copied from interface:HasPosition
Sets a distance between component and the right side of the container.
Possible values are:-
A pixel value like
"20"
. -
Percentage value relative to container width like
"20%"
.
- Specified by:
setRight
in interfaceHasPosition<T extends AbstractLegend<T>>
- Parameters:
right
- distance to set
-
A pixel value like
-
getBottom
- Specified by:
getBottom
in interfaceHasPosition<T extends AbstractLegend<T>>
- Returns:
- distance between component and the bottom side of the container
-
setBottom
Description copied from interface:HasPosition
Sets a distance between component and the bottom side of the container.
Possible values are:-
A pixel value like
"20"
. -
Percentage value relative to container width like
"20%"
.
- Specified by:
setBottom
in interfaceHasPosition<T extends AbstractLegend<T>>
- Parameters:
bottom
- distance to set
-
A pixel value like
-
getWidth
-
setWidth
-
withWidth
-
getHeight
-
setHeight
-
withHeight
-
getOrientation
-
getAlign
-
setAlign
-
withAlign
-
getPadding
- Specified by:
getPadding
in interfaceHasPadding<T extends AbstractLegend<T>>
- Returns:
- space around content
-
setPadding
Description copied from interface:HasPadding
Sets padding on each of the four sides or replaces an existing one. The unit is px.- Specified by:
setPadding
in interfaceHasPadding<T extends AbstractLegend<T>>
- Parameters:
padding
- padding to set
-
setPadding
Description copied from interface:HasPadding
Sets the top/bottom and left/right paddings or replaces an existing one. The unit is px.- Specified by:
setPadding
in interfaceHasPadding<T extends AbstractLegend<T>>
- Parameters:
vertical
- top and bottom padding to sethorizontal
- left and right padding to set
-
setPadding
Description copied from interface:HasPadding
Sets each of the four paddings separately. The unit is px.- Specified by:
setPadding
in interfaceHasPadding<T extends AbstractLegend<T>>
- Parameters:
top
- top padding to setright
- right padding to setbottom
- bottom padding to setleft
- left padding to set
-
getItemGap
-
setItemGap
-
withItemGap
-
getItemWidth
-
setItemWidth
-
withItemWidth
-
getItemHeight
-
setItemHeight
-
withItemHeight
-
getItemStyle
-
getLineStyle
-
getSymbolRotate
-
setSymbolRotate
-
withSymbolRotate
-
getFormatter
-
setFormatter
-
withFormatter
-
getFormatterFunction
-
setFormatterFunction
-
withFormatterFunction
-
getSelectedMode
-
getInactiveColor
-
getInactiveBorderColor
-
getInactiveBorderWidth
-
setInactiveBorderWidth
-
withInactiveBorderWidth
-
getSelectedSeries
-
setSelectedSeries
-
addSelectedSeries
-
removeSelectedSeries
-
withSelectedSeries
-
withSelectedSeries
-
getTextStyle
-
setTextStyle
-
withTextStyle
-
getTooltip
-
setTooltip
-
withTooltip
-
getIcon
-
setIcon
-
withIcon
-
getBackgroundColor
-
getBorderColor
- Specified by:
getBorderColor
in interfaceHasBorder<T extends AbstractLegend<T>>
- Returns:
- border color
-
getBorderWidth
- Specified by:
getBorderWidth
in interfaceHasBorder<T extends AbstractLegend<T>>
- Returns:
- border width in pixels
-
setBorderWidth
Description copied from interface:HasBorder
Sets a border width or replaces an existing one.- Specified by:
setBorderWidth
in interfaceHasBorder<T extends AbstractLegend<T>>
- Parameters:
borderWidth
- border width in pixels
-
getBorderRadius
- Specified by:
getBorderRadius
in interfaceHasBorder<T extends AbstractLegend<T>>
- Returns:
- border radius of the text fragment
-
setBorderRadius
Description copied from interface:HasBorder
Sets a border radius of the text fragment or replaces an existing one.- Specified by:
setBorderRadius
in interfaceHasBorder<T extends AbstractLegend<T>>
- Parameters:
borderRadius
- border radius to set in pixels
-
getShadowBlur
- Specified by:
getShadowBlur
in interfaceHasShadow<T extends AbstractLegend<T>>
- Returns:
- depth of shadow blur
-
setShadowBlur
Description copied from interface:HasShadow
Sets depth of shadow blur or replaces an existing one.- Specified by:
setShadowBlur
in interfaceHasShadow<T extends AbstractLegend<T>>
- Parameters:
shadowBlur
- depth of shadow blur
-
getShadowColor
- Specified by:
getShadowColor
in interfaceHasShadow<T extends AbstractLegend<T>>
- Returns:
- shadow color
-
getShadowOffsetX
- Specified by:
getShadowOffsetX
in interfaceHasShadow<T extends AbstractLegend<T>>
- Returns:
- horizontal offset for shadow in pixels
-
setShadowOffsetX
Description copied from interface:HasShadow
Sets horizontal offset for shadow or replaces an existing one.- Specified by:
setShadowOffsetX
in interfaceHasShadow<T extends AbstractLegend<T>>
- Parameters:
shadowOffsetX
- offset to set in pixels
-
getShadowOffsetY
- Specified by:
getShadowOffsetY
in interfaceHasShadow<T extends AbstractLegend<T>>
- Returns:
- vertical offset for shadow in pixels
-
setShadowOffsetY
Description copied from interface:HasShadow
Sets vertical offset for shadow or replaces an existing one.- Specified by:
setShadowOffsetY
in interfaceHasShadow<T extends AbstractLegend<T>>
- Parameters:
shadowOffsetY
- offset to set in pixels
-
getEmphasis
-
setEmphasis
-
withEmphasis
-
getSelector
-
setSelector
-
withSelector
-
getSelectorLabel
-
setSelectorLabel
-
withSelectorLabel
-
getSelectorPosition
-
setSelectorPosition
-
withSelectorPosition
-
getSelectorItemGap
-
setSelectorItemGap
-
withSelectorItemGap
-
getSelectorButtonGap
-
setSelectorButtonGap
-
withSelectorButtonGap
-