Package com.groiss.gui.table
Class ColumnDescription
java.lang.Object
com.groiss.gui.table.ColumnDescription
- All Implemented Interfaces:
Serializable
,Cloneable
This class represents the description of a column within a table, i.e. it defines the properties for
a column like its name or if the column is visible by default. It depends on the table implementation if
all properties are interpreted.
- See Also:
-
Constructor Summary
ConstructorDescriptionColumnDescription
(String id, Object name) Creates a new column description.ColumnDescription
(String id, Object name, String description, boolean visible, boolean editable, boolean edit) Creates a new column description. -
Method Summary
Modifier and TypeMethodDescriptionprotected Object
clone()
int
int
Returns the description.getField()
getIcon()
getId()
Returns the id.getName()
Returns the name.int
getRow()
int
getType()
boolean
isEdit()
Return true if this column can be edited, false otherwise.boolean
Returns true if direct editing is possible for this column, false otherwise.boolean
boolean
Returns true if this column is used in a filter.boolean
boolean
boolean
boolean
Returns true if this column should be visible, false otherwise.boolean
void
setColSpan
(int colSpan) void
setColumnSet
(int columnSet) void
setDescription
(String description) Sets the description.void
setEdit
(boolean edit) Sets if this column can be edited.void
setEditable
(boolean editable) Sets if direct editing should be possible for this column.void
void
setFilterable
(boolean filterable) void
setFiltered
(boolean filtered) void
setFormFields
(String formfields) void
setGroupable
(boolean groupable) void
void
Sets the id.void
setJavaScripClass
(String column) void
setLocalizeValue
(boolean l) void
Sets the name.void
setRow
(int row) void
setRowSpan
(int rowSpan) void
setSortable
(boolean sortable) void
void
setUnhideable
(boolean unhideable) void
setVisible
(boolean visible) Sets if this column will be visible.toJson()
toJson
(boolean replaceUnhideable) toString()
-
Constructor Details
-
ColumnDescription
Creates a new column description.- Parameters:
id
- the id of the column for referencing itname
- the name for showing it in table header and column picker
-
ColumnDescription
public ColumnDescription(String id, Object name, String description, boolean visible, boolean editable, boolean edit) Creates a new column description.- Parameters:
id
- the id of the column for referencing itname
- the name for showing it in table header and column pickerdescription
- the description which will be used as tooltip text in the column pickervisible
- if true the column is visible by default, otherwise it is invisibleeditable
- if true the column allows direct editing, otherwise notedit
- if true the column can be edited directly, otherwise not
-
-
Method Details
-
setId
Sets the id.- Parameters:
id
- the id to set
-
getId
Returns the id.- Returns:
- the id
-
setName
Sets the name.- Parameters:
name
- the name to set
-
getName
Returns the name.- Returns:
- the name
-
setDescription
Sets the description.- Parameters:
description
- the description to set
-
getDescription
Returns the description.- Returns:
- the description
-
setVisible
public void setVisible(boolean visible) Sets if this column will be visible.- Parameters:
visible
- pass true if the column should be visible, false otherwise
-
isVisible
public boolean isVisible()Returns true if this column should be visible, false otherwise. -
isFiltered
public boolean isFiltered()Returns true if this column is used in a filter. -
setFiltered
public void setFiltered(boolean filtered) -
setEditable
public void setEditable(boolean editable) Sets if direct editing should be possible for this column.- Parameters:
editable
- pass ture if editing should be possible, false otherwise
-
isEditable
public boolean isEditable()Returns true if direct editing is possible for this column, false otherwise.- Returns:
- the editable
-
setEdit
public void setEdit(boolean edit) Sets if this column can be edited.- Parameters:
edit
- pass true if this column can be edited, false otherwise
-
isEdit
public boolean isEdit()Return true if this column can be edited, false otherwise.- Returns:
- the edit
-
localizeValue
public boolean localizeValue() -
setLocalizeValue
public void setLocalizeValue(boolean l) -
toString
-
getRowSpan
public int getRowSpan() -
setRowSpan
public void setRowSpan(int rowSpan) -
getColSpan
public int getColSpan() -
setColSpan
public void setColSpan(int colSpan) -
isUnhideable
public boolean isUnhideable() -
setUnhideable
public void setUnhideable(boolean unhideable) -
isSortable
public boolean isSortable() -
setSortable
public void setSortable(boolean sortable) -
getJavaScriptClass
-
setJavaScripClass
-
getRow
public int getRow() -
setRow
public void setRow(int row) -
getFormFields
-
setFormFields
-
getColumnSet
public int getColumnSet() -
setColumnSet
public void setColumnSet(int columnSet) -
isFilterable
public boolean isFilterable() -
setFilterable
public void setFilterable(boolean filterable) -
isGroupable
public boolean isGroupable() -
setGroupable
public void setGroupable(boolean groupable) -
getType
-
setType
-
getIcon
-
setIcon
-
toJson
-
toJson
-
getField
-
setField
-
clone
- Overrides:
clone
in classObject
- Throws:
CloneNotSupportedException
-