org.openpermis.editor.policy.gui.checklist
Enum CheckListModel.ColumnType

java.lang.Object
  extended by java.lang.Enum<CheckListModel.ColumnType>
      extended by org.openpermis.editor.policy.gui.checklist.CheckListModel.ColumnType
All Implemented Interfaces:
Serializable, Comparable<CheckListModel.ColumnType>
Enclosing class:
CheckListModel<T>

static enum CheckListModel.ColumnType
extends Enum<CheckListModel.ColumnType>

Describes the type of a column, including getters and setters.

Since:
0.1.0

Enum Constant Summary
CHECKBOX
           
ITEM
           
 
Field Summary
private  Class<?> columnClass
           
private  String columnName
           
private  boolean editable
           
private  boolean valueType
           
 
Method Summary
protected  boolean contains(List<?> list, Object item)
          Checks if the specified item is in the given list.
 Class<?> getColumnClass()
          The value class of this column.
 String getColumnName()
          The name of this column.
abstract  Object getValue(int rowIndex, List<?> itemPool, List<?> selectionList)
          Returns the value of this column at the specified row index.
protected  int indexOf(List<?> list, Object item)
          Returns the index of the specified item in the given list.
 boolean isEditable()
           
 boolean isValueType()
          Check if this column denotes a type that reflects a value.
abstract
<T> void
setValue(int rowIndex, Object value, List<T> itemPool, List<T> selectionList)
          Sets the value of this column at the specified row index.
static CheckListModel.ColumnType valueOf(String name)
          Returns the enum constant of this type with the specified name.
static CheckListModel.ColumnType[] values()
          Returns an array containing the constants of this enum type, in the order they're declared.
 
Methods inherited from class java.lang.Enum
clone, compareTo, equals, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 

Enum Constant Detail

CHECKBOX

public static final CheckListModel.ColumnType CHECKBOX

ITEM

public static final CheckListModel.ColumnType ITEM
Field Detail

columnName

private final String columnName

columnClass

private final Class<?> columnClass

editable

private final boolean editable

valueType

private final boolean valueType
Method Detail

values

public static final CheckListModel.ColumnType[] values()
Returns an array containing the constants of this enum type, in the order they're declared. This method may be used to iterate over the constants as follows:
for(CheckListModel.ColumnType c : CheckListModel.ColumnType.values())
        System.out.println(c);

Returns:
an array containing the constants of this enum type, in the order they're declared

valueOf

public static CheckListModel.ColumnType valueOf(String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)

Parameters:
name - the name of the enum constant to be returned.
Returns:
the enum constant with the specified name
Throws:
IllegalArgumentException - if this enum type has no constant with the specified name

indexOf

protected int indexOf(List<?> list,
                      Object item)
Returns the index of the specified item in the given list.

Parameters:
list - the list to find the item in.
item - the item to search for by identity.
Returns:
the index requested or -1 if there is no such item.
Since:
0.1.0

contains

protected boolean contains(List<?> list,
                           Object item)
Checks if the specified item is in the given list.

Parameters:
list - the list to search.
item - the item to check.
Returns:
true if the item is in the list, false otherwise.
Since:
0.1.0

getValue

public abstract Object getValue(int rowIndex,
                                List<?> itemPool,
                                List<?> selectionList)
Returns the value of this column at the specified row index.

Parameters:
rowIndex - the index for which to retrieve the value.
itemPool - the pool of items.
selectionList - the list of currently selected items.
Returns:
the value at the given row/column.
Since:
0.1.0

setValue

public abstract <T> void setValue(int rowIndex,
                                  Object value,
                                  List<T> itemPool,
                                  List<T> selectionList)
Sets the value of this column at the specified row index.

Parameters:
rowIndex - the index for which to set the value.
itemPool - the pool of items.
selectionList - the list of currently selected items.
Since:
0.1.0

getColumnName

public String getColumnName()
The name of this column.

Returns:
the name of this column.
Since:
0.1.0

getColumnClass

public Class<?> getColumnClass()
The value class of this column.

Returns:
the value class of this column.
Since:
0.1.0

isEditable

public boolean isEditable()
Returns:
the editable.
Since:
0.1.0

isValueType

public boolean isValueType()
Check if this column denotes a type that reflects a value.

Since:
0.4.0


PERMIS Role Based Access Control 0.4.0 (Build 15)
2009/05/20 08:15:22
Copyright (c) 2002-2007 Ergon Informatik AG