Class KanbanColumn
java.lang.Object
io.jmix.kanbanflowui.kit.component.KanbanColumn
- All Implemented Interfaces:
HasKanbanColumns
,Serializable
A class representing
JmixKanban
column properties.- See Also:
-
Nested Class Summary
-
Field Summary
Modifier and TypeFieldDescriptionprotected boolean
protected boolean
protected String
protected List<KanbanColumn>
protected final String
protected String
protected KanbanColumn.Orientation
protected HasKanbanColumns
protected boolean
protected boolean
protected boolean
protected Integer
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
addColumn
(KanbanColumn column) Adds a new column to the component.protected void
appendChildColumns
(List<KanbanColumn> columns, KanbanColumn column) getColor()
getColumnByDataField
(String dataField) getLabel()
protected HasKanbanColumns
getWidth()
boolean
boolean
boolean
boolean
boolean
void
removeColumn
(KanbanColumn column) Removes aKanbanColumn
from the component.void
removeColumnByDataField
(String dataField) Removes aKanbanColumn
with the givendataField
from the component.protected void
void
replaceColumn
(String dataField, KanbanColumn newColumn) Finds aKanbanColumn
with the passeddataField
and replaces it with the new one.void
setCollapsed
(boolean collapsed) Sets whether the column is collapsed.protected void
setCollapsedSilently
(boolean collapsed) void
setCollapsible
(boolean collapsible) Sets whether the column is collapsible.void
Sets the color property of the column.void
setColumns
(List<KanbanColumn> columns) Sets a list of columns for a component.void
Sets the text displayed in the column's header.void
setOrientation
(KanbanColumn.Orientation orientation) Sets the orientation of tasks in the column.protected void
setParent
(HasKanbanColumns parent) void
setReorder
(boolean reorder) Sets whether a column can be reordered.void
setSelected
(boolean selected) Sets whether the current column is selected.void
setVisible
(boolean visible) Sets whether a column is visible.protected void
setVisibleSilently
(boolean visible) void
Sets the column width.withCollapsed
(boolean collapsed) withCollapsible
(boolean collapsible) withOrientation
(KanbanColumn.Orientation orientation) withReorder
(boolean reorder) withSelected
(boolean selected) withVisible
(boolean visible)
-
Field Details
-
dataField
-
label
-
collapsed
protected boolean collapsed -
collapsible
protected boolean collapsible -
visible
protected boolean visible -
reorder
protected boolean reorder -
orientation
-
selected
protected boolean selected -
width
-
color
-
parent
-
columns
-
-
Constructor Details
-
KanbanColumn
-
-
Method Details
-
getDataField
- Returns:
- the column's data source bound field that corresponds to the status field in the data source
-
getLabel
- Returns:
- text displayed in the column's header
-
setLabel
Sets the text displayed in the column's header.- Parameters:
label
- text to be displayed
-
withLabel
- Parameters:
label
- text to be displayed- Returns:
- this
- See Also:
-
isCollapsed
public boolean isCollapsed()- Returns:
- whether the column is collapsed
-
setCollapsed
public void setCollapsed(boolean collapsed) Sets whether the column is collapsed.false
by default.- Parameters:
collapsed
- whether the column is collapsed
-
setCollapsedSilently
protected void setCollapsedSilently(boolean collapsed) -
withCollapsed
- Parameters:
collapsed
- whether the column is collapsed- Returns:
- this
- See Also:
-
isCollapsible
public boolean isCollapsible()- Returns:
- whether the column is collapsible, this works in conjunction with
the
JmixKanban
property of the same name
-
setCollapsible
public void setCollapsible(boolean collapsible) Sets whether the column is collapsible.true
by default.- Parameters:
collapsible
- whether the column is collapsible
-
withCollapsible
- Parameters:
collapsible
- whether the column is collapsible- Returns:
- this
- See Also:
-
isVisible
public boolean isVisible()- Returns:
- whether a column is visible
-
setVisible
public void setVisible(boolean visible) Sets whether a column is visible.true
by default.- Parameters:
visible
- whether a column is visible
-
setVisibleSilently
protected void setVisibleSilently(boolean visible) -
withVisible
- Parameters:
visible
- whether a column is visible- Returns:
- this
- See Also:
-
isReorder
public boolean isReorder()- Returns:
- whether a column can be reordered, this works in conjunction with
the
JmixKanban.setColumnReorderingAllowed(boolean)
-
setReorder
public void setReorder(boolean reorder) Sets whether a column can be reordered.true
by default.- Parameters:
reorder
- whether a column can be reordered
-
withReorder
- Parameters:
reorder
- whether a column can be reordered- Returns:
- this
- See Also:
-
getOrientation
- Returns:
- the orientation of tasks in the column
-
setOrientation
Sets the orientation of tasks in the column.- Parameters:
orientation
- orientation to be set
-
withOrientation
- Parameters:
orientation
- orientation to be set- Returns:
- this
- See Also:
-
isSelected
public boolean isSelected()- Returns:
- whether the current column is selected
-
setSelected
public void setSelected(boolean selected) Sets whether the current column is selected. Only applicable to sub-columns when * hierarchy is tabs.true
by default for the first tab.- Parameters:
selected
- whether the current column is selected
-
withSelected
- Parameters:
selected
- whether the current column is selected- Returns:
- this
- See Also:
-
getWidth
- Returns:
- the column width
-
setWidth
Sets the column width. When this property is set a horizontal scrollbar may appear.- Parameters:
width
- width to set in pixels
-
withWidth
- Parameters:
width
- width to set in pixels- Returns:
- this
- See Also:
-
getColor
- Returns:
- color property of the column
-
setColor
Sets the color property of the column.- Parameters:
color
- HEX color code or named color to set
-
withColor
- Parameters:
color
- color to set- Returns:
- this
- See Also:
-
getColumns
- Specified by:
getColumns
in interfaceHasKanbanColumns
- Returns:
- an unmodifiable list of all
KanbanColumn
, including transitive columns
-
getOwnColumns
- Specified by:
getOwnColumns
in interfaceHasKanbanColumns
- Returns:
- an unmodifiable list of
KanbanColumn
that are direct elements of this component
-
getColumnByDataField
- Specified by:
getColumnByDataField
in interfaceHasKanbanColumns
- Parameters:
dataField
- thedataField
attribute of the column to get- Returns:
- the column corresponding to the given column
dataField
, ornull
if no column has suchdataField
- See Also:
-
removeColumn
Description copied from interface:HasKanbanColumns
Removes aKanbanColumn
from the component. Updates the client-side of the component.- Specified by:
removeColumn
in interfaceHasKanbanColumns
- Parameters:
column
- the column to be removed, notnull
-
removeColumnByDataField
Description copied from interface:HasKanbanColumns
Removes aKanbanColumn
with the givendataField
from the component.- Specified by:
removeColumnByDataField
in interfaceHasKanbanColumns
- Parameters:
dataField
- thedataField
attribute of the column
-
replaceColumn
Description copied from interface:HasKanbanColumns
Finds aKanbanColumn
with the passeddataField
and replaces it with the new one.- Specified by:
replaceColumn
in interfaceHasKanbanColumns
- Parameters:
dataField
-dataField
attribute of the column being replacednewColumn
- a column for replacement
-
addColumn
Description copied from interface:HasKanbanColumns
Adds a new column to the component.- Specified by:
addColumn
in interfaceHasKanbanColumns
- Parameters:
column
- column to add, notnull
-
setColumns
Description copied from interface:HasKanbanColumns
Sets a list of columns for a component.- Specified by:
setColumns
in interfaceHasKanbanColumns
- Parameters:
columns
- list of columns to set
-
getParent
-
setParent
-
removerParent
protected void removerParent() -
appendChildColumns
-