Class ColumnDescription

java.lang.Object
com.groiss.gui.table.ColumnDescription
All Implemented Interfaces:
Serializable, Cloneable

public class ColumnDescription extends Object implements 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 Details

    • ColumnDescription

      public ColumnDescription(String id, Object name)
      Creates a new column description.
      Parameters:
      id - the id of the column for referencing it
      name - 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 it
      name - the name for showing it in table header and column picker
      description - the description which will be used as tooltip text in the column picker
      visible - if true the column is visible by default, otherwise it is invisible
      editable - if true the column allows direct editing, otherwise not
      edit - if true the column can be edited directly, otherwise not
  • Method Details

    • setId

      public void setId(String id)
      Sets the id.
      Parameters:
      id - the id to set
    • getId

      public String getId()
      Returns the id.
      Returns:
      the id
    • setName

      public void setName(Object name)
      Sets the name.
      Parameters:
      name - the name to set
    • getName

      public Object getName()
      Returns the name.
      Returns:
      the name
    • setDescription

      public void setDescription(String description)
      Sets the description.
      Parameters:
      description - the description to set
    • getDescription

      public String 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

      public String toString()
      Overrides:
      toString in class Object
    • 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

      public String getJavaScriptClass()
    • setJavaScripClass

      public void setJavaScripClass(String column)
    • getRow

      public int getRow()
    • setRow

      public void setRow(int row)
    • getFormFields

      public String getFormFields()
    • setFormFields

      public void setFormFields(String formfields)
    • 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

      public String getType()
    • setType

      public void setType(String type)
    • getIcon

      public String getIcon()
    • setIcon

      public void setIcon(String icon)
    • toJson

      public JSONObject toJson()
    • toJson

      public JSONObject toJson(boolean replaceUnhideable)
    • getField

      public String getField()
    • setField

      public void setField(String field)
    • clone

      protected Object clone() throws CloneNotSupportedException
      Overrides:
      clone in class Object
      Throws:
      CloneNotSupportedException