org.cruxframework.crux.widgets.client.grid
Class ColumnDefinitions

java.lang.Object
  extended by org.cruxframework.crux.widgets.client.grid.ColumnDefinitions

public class ColumnDefinitions
extends Object

Represents the columns to be rendered by a grid widget.

Author:
Gesse S. F. Dafe

Nested Class Summary
static class ColumnDefinitions.ColumnIterator<T extends ColumnDefinition>
          Iterator for the registered column definition
 
Constructor Summary
ColumnDefinitions()
           
 
Method Summary
 void add(String key, ColumnDefinition definition)
          Register a new column definition
 int getColumnIndex(String key, boolean considerInvisibleColumns)
          Gets the column definition index
 ColumnDefinition getDefinition(String key)
          Gets a registered column definition by its key
 org.cruxframework.crux.core.client.collection.FastList<ColumnDefinition> getDefinitions()
          Gets all registered columns definition
 Iterator<ColumnDefinition> getIterator()
          Creates and returns a iterator for accessing column definitions in an ordered way
 int getVisibleColumnCount()
          Gets the number of columns that will be rendered
 ColumnDefinition getVisibleColumnDefinition(int visibleIndex)
          Gets the definition of the i-th visible column
protected  void reset()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ColumnDefinitions

public ColumnDefinitions()
Method Detail

add

public void add(String key,
                ColumnDefinition definition)
Register a new column definition

Parameters:
key -
definition -

getDefinitions

public org.cruxframework.crux.core.client.collection.FastList<ColumnDefinition> getDefinitions()
Gets all registered columns definition


getDefinition

public ColumnDefinition getDefinition(String key)
Gets a registered column definition by its key

Parameters:
key -

getColumnIndex

public int getColumnIndex(String key,
                          boolean considerInvisibleColumns)
Gets the column definition index

Parameters:
key -
considerInvisibleColumns -

reset

protected void reset()

getVisibleColumnCount

public int getVisibleColumnCount()
Gets the number of columns that will be rendered

Returns:
the visible column count

getVisibleColumnDefinition

public ColumnDefinition getVisibleColumnDefinition(int visibleIndex)
Gets the definition of the i-th visible column

Parameters:
visibleIndex -
Returns:

getIterator

public Iterator<ColumnDefinition> getIterator()
Creates and returns a iterator for accessing column definitions in an ordered way



Copyright © 2015. All rights reserved.