org.gcube.portlets.user.tdw.shared.model
Class ColumnDefinition

java.lang.Object
  extended by org.gcube.portlets.user.tdw.shared.model.ColumnDefinition
All Implemented Interfaces:
Serializable

public class ColumnDefinition
extends Object
implements Serializable

Describes a column in the widget model.

Author:
"Federico De Faveri defaveri@isti.cnr.it"
See Also:
Serialized Form

Field Summary
protected  boolean editable
           
protected  String id
           
protected  ColumnKey key
           
protected  String label
           
protected  int position
           
protected  ColumnType type
           
protected  ValueType valueType
           
protected  boolean visible
           
protected  int width
           
 
Constructor Summary
ColumnDefinition()
           
ColumnDefinition(String id, String label)
          Creates a new column definition with type ColumnType USER.
ColumnDefinition(String id, String label, ValueType valueType, int width, boolean editable, boolean visible, ColumnType type)
          Creates a new column definition.
 
Method Summary
 String getId()
           
 ColumnKey getKey()
           
 String getLabel()
           
 int getPosition()
           
 ColumnType getType()
           
 ValueType getValueType()
           
 int getWidth()
           
 boolean isEditable()
           
 boolean isVisible()
           
 void setEditable(boolean editable)
           
 void setIndex(int index)
           
 void setPosition(int position)
           
 void setType(ColumnType type)
           
 void setValueType(ValueType valueType)
           
 void setVisible(boolean visible)
           
 void setWidth(int width)
           
 String toString()
          
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

id

protected String id

label

protected String label

valueType

protected ValueType valueType

width

protected int width

editable

protected boolean editable

visible

protected boolean visible

type

protected ColumnType type

position

protected int position

key

protected ColumnKey key
Constructor Detail

ColumnDefinition

public ColumnDefinition()

ColumnDefinition

public ColumnDefinition(String id,
                        String label)
Creates a new column definition with type ColumnType USER.

Parameters:
id - the column id.
label - the column label.

ColumnDefinition

public ColumnDefinition(String id,
                        String label,
                        ValueType valueType,
                        int width,
                        boolean editable,
                        boolean visible,
                        ColumnType type)
Creates a new column definition.

Parameters:
id - the column id.
label - the column label.
valueType - the type of column values.
width - the column width.
editable - flag for editability.
visible - flag for visibility.
type - the column type.
Method Detail

getId

public String getId()
Returns:
the id

getLabel

public String getLabel()
Returns:
the label

getValueType

public ValueType getValueType()
Returns:
the valueType

setValueType

public void setValueType(ValueType valueType)
Parameters:
valueType - the valueType to set

getPosition

public int getPosition()
Returns:
the position

setPosition

public void setPosition(int position)
Parameters:
position - the position to set

isEditable

public boolean isEditable()
Returns:
the editable

setEditable

public void setEditable(boolean editable)
Parameters:
editable - the editable to set

getWidth

public int getWidth()
Returns:
the width

setWidth

public void setWidth(int width)
Parameters:
width - the width to set

isVisible

public boolean isVisible()
Returns:
the visible

setVisible

public void setVisible(boolean visible)
Parameters:
visible - the visible to set

getType

public ColumnType getType()
Returns:
the type

setType

public void setType(ColumnType type)
Parameters:
type - the type to set

getKey

public ColumnKey getKey()
Returns:
the key

setIndex

public void setIndex(int index)
Parameters:
index - to set

toString

public String toString()

Overrides:
toString in class Object


Copyright © 2013. All Rights Reserved.