net.sf.doolin.gui.field.table
Class Column

java.lang.Object
  extended by net.sf.doolin.bus.bean.Bean
      extended by net.sf.doolin.gui.field.table.Column
All Implemented Interfaces:
Serializable, IBean

public class Column
extends Bean

Column definition.

Author:
Damien Coraboeuf
See Also:
Serialized Form

Constructor Summary
Column()
           
 
Method Summary
 Column copy()
          Creates a copy of this column.
static List<Column> filter(List<Column> allColumns)
          Filter.
 Class<?> getColumnClass()
          Class for the column.
 ColumnUpdatePolicy getColumnUpdatePolicy()
          Gets the column update policy.
 Comparator<?> getComparator()
          Returns the comparator which is used by this column.
 ColumnEditable<Object> getEditable()
          Gets the editable.
 TableCellEditor getEditor()
          Gets the editor.
 String getName()
          Gets the name.
 GUIAction getOnEditAction()
          Gets the on edit action.
 TableCellRenderer getRenderer()
          Gets the renderer.
 String getTitleExpression()
          Gets the title expression.
 String getType()
          Gets the type.
 ColumnValueFactory getValueFactory()
          Gets the value factory.
 ValueUnit getWidth()
          Gets the width.
 boolean isEditable(Object baseObject)
          Returns if the object is editable or not for this column.
 boolean isRequired()
          Checks if the display of this column is required or not.
 boolean isResizeable()
          Checks if is resizeable.
 boolean isVisible()
          Checks if is visible.
 void setColumnUpdatePolicy(ColumnUpdatePolicy columnUpdatePolicy)
          Update policy when the column cell is edited
 void setEditable(ColumnEditable<Object> editable)
          Defines if the column is editable
 void setEditor(TableCellEditor editor)
          Editor for the column
 void setName(String name)
          Name of the column
 void setOnEditAction(GUIAction onEditAction)
          Action to execute when an item is edited
 void setRenderer(TableCellRenderer renderer)
          Renderer for the column
 void setRequired(boolean required)
          Sets if the display of this column is required or not.
 void setResizeable(boolean resizeable)
          Defines if the column can be resized
 void setTitleExpression(String titleExpression)
          Sets the title expression.
 void setType(String type)
          Sets the type for the column.
 void setValueFactory(ColumnValueFactory valueFactory)
          Sets the factory for the value of the column.
 void setVisible(boolean visible)
          Sets the initial visibility of the column.
 void setWidth(ValueUnit width)
          Sets the default width of the column.
 String toString()
           
 
Methods inherited from class net.sf.doolin.bus.bean.Bean
getBeanNotificationSupport, getParentBean, notify, setParentBean
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Column

public Column()
Method Detail

filter

public static List<Column> filter(List<Column> allColumns)
Filter.

Parameters:
allColumns - the all columns
Returns:
the list< column>

copy

public Column copy()
Creates a copy of this column.

Returns:
Copy

getColumnClass

public Class<?> getColumnClass()
Class for the column.

Returns:
the column class

getColumnUpdatePolicy

public ColumnUpdatePolicy getColumnUpdatePolicy()
Gets the column update policy.

Returns:
the column update policy

getComparator

public Comparator<?> getComparator()
Returns the comparator which is used by this column.

Returns:
Comparator
See Also:
ColumnValueFactory.getComparator()

getEditable

public ColumnEditable<Object> getEditable()
Gets the editable.

Returns:
the editable

getEditor

public TableCellEditor getEditor()
Gets the editor.

Returns:
the editor

getName

public String getName()
Gets the name.

Returns:
the name

getOnEditAction

public GUIAction getOnEditAction()
Gets the on edit action.

Returns:
the on edit action

getRenderer

public TableCellRenderer getRenderer()
Gets the renderer.

Returns:
the renderer

getTitleExpression

public String getTitleExpression()
Gets the title expression.

Returns:
the title expression

getType

public String getType()
Gets the type.

Returns:
the type

getValueFactory

public ColumnValueFactory getValueFactory()
Gets the value factory.

Returns:
the value factory

getWidth

public ValueUnit getWidth()
Gets the width.

Returns:
the width

isEditable

public boolean isEditable(Object baseObject)
Returns if the object is editable or not for this column.

Parameters:
baseObject - Object to edit
Returns:
true if this object is editable or not
See Also:
ColumnEditable.isEditable(Column, Object)

isRequired

public boolean isRequired()
Checks if the display of this column is required or not.

Returns:
true if this column is required to be displayed

isResizeable

public boolean isResizeable()
Checks if is resizeable.

Returns:
true, if is resizeable

isVisible

public boolean isVisible()
Checks if is visible.

Returns:
true, if is visible

setColumnUpdatePolicy

public void setColumnUpdatePolicy(ColumnUpdatePolicy columnUpdatePolicy)
Update policy when the column cell is edited

Parameters:
columnUpdatePolicy - the new column update policy

setEditable

public void setEditable(ColumnEditable<Object> editable)
Defines if the column is editable

Parameters:
editable - the new editable

setEditor

public void setEditor(TableCellEditor editor)
Editor for the column

Parameters:
editor - the new editor

setName

public void setName(String name)
Name of the column

Parameters:
name - the new name

setOnEditAction

public void setOnEditAction(GUIAction onEditAction)
Action to execute when an item is edited

Parameters:
onEditAction - the on edit action

setRenderer

public void setRenderer(TableCellRenderer renderer)
Renderer for the column

Parameters:
renderer - the new renderer

setRequired

public void setRequired(boolean required)
Sets if the display of this column is required or not. It is set to true by default.

Parameters:
required - true if this column is required to be displayed

setResizeable

public void setResizeable(boolean resizeable)
Defines if the column can be resized

Parameters:
resizeable - the new resizeable

setTitleExpression

public void setTitleExpression(String titleExpression)
Sets the title expression.

Parameters:
titleExpression - the new title expression

setType

public void setType(String type)
Sets the type for the column.

Parameters:
type - the new type

setValueFactory

public void setValueFactory(ColumnValueFactory valueFactory)
Sets the factory for the value of the column.

Parameters:
valueFactory - the new value factory

setVisible

public void setVisible(boolean visible)
Sets the initial visibility of the column.

Parameters:
visible - the new visible

setWidth

public void setWidth(ValueUnit width)
Sets the default width of the column.

Parameters:
width - the new width

toString

public String toString()
Overrides:
toString in class Object


Copyright © 2011. All Rights Reserved.