Interface Column<C extends Column<C>>
-
- All Superinterfaces:
Comparable<C>
,Component<C>
,Copyable<C>
,Serializable
- All Known Subinterfaces:
ConditionalColumn<C>
,DateColumn<C>
,DynamicColumn<C>
,EmbeddedListColumn<C>
,EnumColumn<C>
,LinkColumn<C>
,MoneyColumn<C>
,ProgressColumn<C>
,SpelRuleColumn<C>
,ThumbnailColumn<C>
- All Known Implementing Classes:
AbstractColumn
,DefaultColumn
,DefaultConditionalColumn
,DefaultDateColumn
,DefaultDynamicColumn
,DefaultEmbeddedListColumn
,DefaultEnumArrayColumn
,DefaultEnumColumn
,DefaultLinkColumn
,DefaultMoneyColumn
,DefaultProgressColumn
,DefaultSpelRuleColumn
,DefaultThumbnailColumn
public interface Column<C extends Column<C>> extends Component<C>
Represents the metadata for a column component.- Author:
- Nick Crum (ncrum)
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static class
Column.ColumnAttributes
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description default C
align(String align)
Sets the alignment of the column.default C
alignCenter()
Aligns the column data to the "center".default C
alignLeft()
Aligns the column data to the "left".default C
alignRight()
Aligns the column data to the "right".default C
colSpan(int colSpan)
Sets the number of column lengths this column spans.default C
colSpan(String colSpan)
Sets the number of column lengths this column spans.default C
filterAndSortAlias(String filterAndSortAlias)
The alias name that is used instead of the original property name.String
getAlign()
Defines the alignment of column data as either "left", "center", or "right".String
getColSpan()
Defines the number of column lengths this column spans.String
getName()
The name of the property this column will display.String
getWidth()
Defines a fixed width for this column.boolean
isSortable()
Whether or not the column is sortable.default C
name(String name)
Sets the name of the property this column displays.default C
notSortable()
Sets this column to not be sortable.void
setAlign(String align)
Sets the alignment.void
setColSpan(String colSpan)
Sets the column span.void
setName(String name)
Sets the name.void
setSortable(boolean sortable)
Sets whether or not sortable.void
setWidth(String width)
Sets the width of the column.default C
sortable()
Sets this column to be sortable.default C
sortable(boolean isSortable)
Sets this column to be sortable or not.default C
width(String width)
Sets a fixed width for this column.-
Methods inherited from interface java.lang.Comparable
compareTo
-
Methods 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, findComponent, findComponent, findComponents, 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, type
-
-
-
-
Method Detail
-
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
void setAlign(String align)
Sets the alignment.- Parameters:
align
- the alignment
-
setColSpan
void setColSpan(String colSpan)
Sets the column span.- Parameters:
colSpan
- the col span
-
setName
void setName(String name)
Sets the name.- Parameters:
name
- the name
-
setSortable
void setSortable(boolean sortable)
Sets whether or not sortable.- Parameters:
sortable
- whether or not sortable
-
setWidth
void setWidth(String width)
Sets the width of the column.- Parameters:
width
- the width
-
align
default C align(String 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
default C alignLeft()
Aligns the column data to the "left".- Returns:
- this
-
alignRight
default C alignRight()
Aligns the column data to the "right".- Returns:
- this
-
alignCenter
default C alignCenter()
Aligns the column data to the "center".- Returns:
- this
-
colSpan
default C colSpan(String 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
default C colSpan(int 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
default C name(String name)
Sets the name of the property this column displays.- Parameters:
name
- the name- Returns:
- this
-
sortable
default C sortable(boolean isSortable)
Sets this column to be sortable or not.- Parameters:
isSortable
- whether or not sortable- Returns:
- this
-
sortable
default C sortable()
Sets this column to be sortable.- Returns:
- this
-
notSortable
default C notSortable()
Sets this column to not be sortable.- Returns:
- this
-
width
default C width(String 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
default C filterAndSortAlias(String 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
-
-