Interface Column<C extends Column<C>>
- All Superinterfaces:
Comparable<C>,Component<C>,Copyable<C>,CustomCssComponent<C>,Serializable
- All Known Subinterfaces:
ConditionalColumn<C>,DateColumn<C>,DerivedColumn<C>,DynamicColumn<C>,EmbeddedListColumn<C>,EnumColumn<C>,LinkColumn<C>,MoneyColumn<C>,ProgressColumn<C>,RsqlRuleColumn<C>,SpelRuleColumn<C>,ThumbnailColumn<C>
- All Known Implementing Classes:
AbstractColumn,DefaultColumn,DefaultConditionalColumn,DefaultDateColumn,DefaultDerivedColumn,DefaultDynamicColumn,DefaultEmbeddedListColumn,DefaultEnumArrayColumn,DefaultEnumColumn,DefaultLinkColumn,DefaultMoneyColumn,DefaultProgressColumn,DefaultRSQLRuleColumn,DefaultSpelRuleColumn,DefaultThumbnailColumn
Represents the metadata for a column component.
- Author:
- Nick Crum (ncrum)
-
Nested Class Summary
Nested Classes -
Field Summary
Fields inherited from interface com.broadleafcommerce.metadata.dsl.core.CustomCssComponent
CSS_ATTRIBUTE -
Method Summary
Modifier and TypeMethodDescriptiondefault CaddCellCssClass(String cssClass) Add a CSS class that will only be applied to the cells of the column.default CaddCellCssClass(String... cssClasses) Add a CSS class that will only be applied to the cells of the column.default CaddCellCssClass(Collection<String> cssClasses) Add a CSS class that will only be applied to the cells of the column.default CaddHeaderCssClass(String cssClass) Add a CSS class that will only be applied to the header of the column.default CaddHeaderCssClass(String... cssClasses) Add a CSS class that will only be applied to the header of the column.default CaddHeaderCssClass(Collection<String> cssClasses) Add a CSS class that will only be applied to the header of the column.default CSets the alignment of the column.default CAligns the column data to the "center".default CAligns the column data to the "left".default CAligns the column data to the "right".default CClear all CSS classes that will only be applied to the cells of the column.default CClear all CSS classes that will only be applied to the header of the column.default CcolSpan(int colSpan) Sets the number of column lengths this column spans.default CSets the number of column lengths this column spans.default CfilterAndSortAlias(String filterAndSortAlias) The alias name that is used instead of the original property name.getAlign()Defines the alignment of column data as either "left", "center", or "right".Defines the number of column lengths this column spans.Returns the CSS classes that will be applied to the data cells of the column.Returns the CSS classes that should be applied to the header of the column.getName()The name of the property this column will display.getWidth()Defines a fixed width for this column.booleanWhether or not the column is sortable.default CSets the name of the property this column displays.default CSets this column to not be sortable.default CremoveCellCssClass(String cssClass) Remove a CSS class that will only be applied to the cells of the column.default CremoveCellCssClass(String... cssClasses) Remove a CSS class that will only be applied to the cells of the column.default CremoveCellCssClass(Collection<String> cssClasses) Remove a CSS class that will only be applied to the cells of the column.default CremoveHeaderCssClass(String cssClass) Remove a CSS class that will only be applied to the header of the column.default CremoveHeaderCssClass(String... cssClasses) Remove a CSS class that will only be applied to the header of the column.default CremoveHeaderCssClass(Collection<String> cssClasses) Remove a CSS class that will only be applied to the header of the column.voidSets the alignment.voidsetColSpan(String colSpan) Sets the column span.voidSets the name.voidsetSortable(boolean sortable) Sets whether or not sortable.voidSets the width of the column.default Csortable()Sets this column to be sortable.default Csortable(boolean isSortable) Sets this column to be sortable or not.default CSets a fixed width for this column.Methods inherited from interface java.lang.Comparable
compareToMethods inherited from interface com.broadleafcommerce.metadata.dsl.core.Component
addAction, addAction, addComponent, addEndpoint, addEndpoint, apply, attribute, augmentationKey, classifier, clearConditionals, clearEndpoints, conditional, conditionals, description, description, findAction, findAction, findActions, findAttribute, findAttribute, findComponent, findComponent, findComponents, findEndpoint, findEndpoint, findEndpoint, findEndpoints, get, get, getAction, getAction, getActions, getActionsList, getAttribute, getAttribute, getAttributes, getAugmentationKey, getClassifier, getComponent, getComponent, getComponents, getComponentsList, getConditionals, getDescription, getEndpoint, getEndpoint, getEndpoints, getEndpointsList, getId, getLabel, getOrder, getScope, getType, hasAction, hasAttribute, hasComponent, hasEndpoint, id, isAugmentable, isTranslatable, label, label, notTranslatable, order, removeAction, removeAttribute, removeComponent, removeEndpoint, scope, self, setActions, setAttributes, setAugmentationKey, setClassifier, setComponents, setConditionals, setDescription, setEndpoints, setId, setLabel, setOrder, setScope, setTranslatable, setType, translatable, translatable, typeMethods inherited from interface com.broadleafcommerce.metadata.dsl.core.CustomCssComponent
addCssClass, addCssClass, addCssClass, clearCssClasses, getCssClasses, removeCssClass, removeCssClass, removeCssClass
-
Method Details
-
getAlign
String getAlign()Defines the alignment of column data as either "left", "center", or "right". Default is "left" if not set.- Returns:
- the alignment
-
getColSpan
String getColSpan()Defines the number of column lengths this column spans. Useful for making a name or description column span multiple column lengths.- Returns:
- the col span
-
getName
String getName()The name of the property this column will display.- Returns:
- the name
-
isSortable
boolean isSortable()Whether or not the column is sortable.- Returns:
- whether or not sortable.
-
getWidth
String getWidth()Defines a fixed width for this column. By default, all columns are auto-sized according to their content.Supports width values compatible with the CSS width property, for example:
- 100px
- 100
- 4rem
- 3em
- 50%
- Returns:
- the width
-
setAlign
Sets the alignment.- Parameters:
align- the alignment
-
setColSpan
Sets the column span.- Parameters:
colSpan- the col span
-
setName
Sets the name.- Parameters:
name- the name
-
setSortable
void setSortable(boolean sortable) Sets whether or not sortable.- Parameters:
sortable- whether or not sortable
-
setWidth
Sets the width of the column.- Parameters:
width- the width
-
align
Sets the alignment of the column. This affects the alignment of the data within the column, for example, you could align the data to the "left", "center", or "right".- Parameters:
align- the alignment- Returns:
- this
-
alignLeft
Aligns the column data to the "left".- Returns:
- this
-
alignRight
Aligns the column data to the "right".- Returns:
- this
-
alignCenter
Aligns the column data to the "center".- Returns:
- this
-
colSpan
Sets the number of column lengths this column spans. Useful for name or description columns that need to be longer relative to the other data columns.- Parameters:
colSpan- the col span- Returns:
- this
-
colSpan
Sets the number of column lengths this column spans. Useful for name or description columns that need to be longer relative to the other data columns.- Parameters:
colSpan- the col span- Returns:
- this
-
name
Sets the name of the property this column displays.- Parameters:
name- the name- Returns:
- this
-
sortable
Sets this column to be sortable or not.- Parameters:
isSortable- whether or not sortable- Returns:
- this
-
sortable
Sets this column to be sortable.- Returns:
- this
-
notSortable
Sets this column to not be sortable.- Returns:
- this
-
width
Sets a fixed width for this column. By default, all columns are auto-sized according to their content.Supports width values compatible with the CSS width property, for example:
- 100px
- 100
- 4rem
- 3em
- 50%
- Parameters:
width- the width- Returns:
- this;
-
filterAndSortAlias
The alias name that is used instead of the original property name. For example, if the business domain contains property "address.postalCode", but the JPA entity has "postalCode" the alias should be "postalCode" to make the sorting and filtering by this column work correctly.- Parameters:
filterAndSortAlias- the alias name that should be used instead of the original property name- Returns:
- this
-
addHeaderCssClass
Add a CSS class that will only be applied to the header of the column. UseCustomCssComponent.addCssClass(String)to add a CSS class that will be applied to both the header and cells.- Parameters:
cssClass- the CSS class to add- Returns:
- this component
-
addHeaderCssClass
Add a CSS class that will only be applied to the header of the column. UseCustomCssComponent.addCssClass(String[])to add a CSS class that will be applied to both the header and cells.- Parameters:
cssClasses- the CSS classes to add- Returns:
- this component
-
addHeaderCssClass
Add a CSS class that will only be applied to the header of the column. UseCustomCssComponent.addCssClass(Collection)to add a CSS class that will be applied to both the header and cells.- Parameters:
cssClasses- the CSS classes to add- Returns:
- this component
-
removeHeaderCssClass
Remove a CSS class that will only be applied to the header of the column.- Parameters:
cssClass- the CSS class to remove- Returns:
- this component
-
removeHeaderCssClass
Remove a CSS class that will only be applied to the header of the column.- Parameters:
cssClasses- the CSS classes to remove- Returns:
- this component
-
removeHeaderCssClass
Remove a CSS class that will only be applied to the header of the column.- Parameters:
cssClasses- the CSS classes to remove- Returns:
- this component
-
clearHeaderCssClasses
Clear all CSS classes that will only be applied to the header of the column.- Returns:
- this component
-
addCellCssClass
Add a CSS class that will only be applied to the cells of the column. UseCustomCssComponent.addCssClass(String)to add a CSS class that will be applied to both the header and cells.- Parameters:
cssClass- the CSS class to add- Returns:
- this component
-
addCellCssClass
Add a CSS class that will only be applied to the cells of the column. UseCustomCssComponent.addCssClass(String[])to add a CSS class that will be applied to both the header and cells.- Parameters:
cssClasses- the CSS classes to add- Returns:
- this component
-
addCellCssClass
Add a CSS class that will only be applied to the cells of the column. UseCustomCssComponent.addCssClass(Collection)to add a CSS class that will be applied to both the header and cells.- Parameters:
cssClasses- the CSS classes to add- Returns:
- this component
-
removeCellCssClass
Remove a CSS class that will only be applied to the cells of the column.- Parameters:
cssClass- the CSS class to remove- Returns:
- this component
-
removeCellCssClass
Remove a CSS class that will only be applied to the cells of the column.- Parameters:
cssClasses- the CSS classes to remove- Returns:
- this component
-
removeCellCssClass
Remove a CSS class that will only be applied to the cells of the column.- Parameters:
cssClasses- the CSS classes to remove- Returns:
- this component
-
clearCellCssClasses
Clear all CSS classes that will only be applied to the cells of the column.- Returns:
- this component
-
getDataCellCssClasses
Returns the CSS classes that will be applied to the data cells of the column. -
getHeaderCssClasses
Returns the CSS classes that should be applied to the header of the column.
-