org.drools.guvnor.client.widgets.decoratedgrid
Class DynamicColumn<T>

java.lang.Object
  extended by org.drools.guvnor.client.widgets.decoratedgrid.DynamicBaseColumn
      extended by org.drools.guvnor.client.widgets.decoratedgrid.DynamicColumn<T>
Type Parameters:
T - The type of domain columns represented
All Implemented Interfaces:
com.google.gwt.cell.client.HasCell<DynamicDataRow,CellValue<? extends Comparable<?>>>, com.google.gwt.event.logical.shared.HasValueChangeHandlers<SortConfiguration>, com.google.gwt.event.shared.HasHandlers

public class DynamicColumn<T>
extends DynamicBaseColumn
implements com.google.gwt.event.logical.shared.HasValueChangeHandlers<SortConfiguration>

A column that retrieves it's cell value from an indexed position in a List holding the row data. Normally the row type is defined as a statically typed Class and columns retrieve their cell values from discrete members. A Decision Table's row contains dynamic (i.e. a List) of elements.


Field Summary
 
Fields inherited from class org.drools.guvnor.client.widgets.decoratedgrid.DynamicBaseColumn
cell, fieldUpdater
 
Constructor Summary
DynamicColumn(T modelColumn, DecoratedGridCellValueAdaptor<? extends Comparable<?>> cell, int columnIndex)
           
DynamicColumn(T modelColumn, DecoratedGridCellValueAdaptor<? extends Comparable<?>> cell, int columnIndex, boolean isSystemControlled, boolean isSortable)
           
 
Method Summary
 com.google.gwt.event.shared.HandlerRegistration addValueChangeHandler(com.google.gwt.event.logical.shared.ValueChangeHandler<SortConfiguration> handler)
           
 boolean equals(Object o)
           
 void fireEvent(com.google.gwt.event.shared.GwtEvent<?> event)
           
 int getColumnIndex()
           
 T getModelColumn()
           
 SortConfiguration getSortConfiguration()
           
 SortDirection getSortDirection()
           
 int getSortIndex()
           
 CellValue<?> getValue(DynamicDataRow object)
          Returns the column value from within the underlying data object.
 int getWidth()
           
 int hashCode()
           
 boolean isSortable()
           
 boolean isSystemControlled()
           
 boolean isVisible()
           
 void setColumnIndex(int columnIndex)
           
 void setSortable(boolean isSortable)
           
 void setSortDirection(SortDirection sortDirection)
           
 void setSortIndex(int sortIndex)
           
 void setSystemControlled(boolean isSystemControlled)
           
 void setVisible(boolean isVisible)
           
 void setWidth(int width)
           
 
Methods inherited from class org.drools.guvnor.client.widgets.decoratedgrid.DynamicBaseColumn
getCell, getFieldUpdater, onBrowserEvent, render, setCell, setFieldUpdater
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DynamicColumn

public DynamicColumn(T modelColumn,
                     DecoratedGridCellValueAdaptor<? extends Comparable<?>> cell,
                     int columnIndex)

DynamicColumn

public DynamicColumn(T modelColumn,
                     DecoratedGridCellValueAdaptor<? extends Comparable<?>> cell,
                     int columnIndex,
                     boolean isSystemControlled,
                     boolean isSortable)
Method Detail

addValueChangeHandler

public com.google.gwt.event.shared.HandlerRegistration addValueChangeHandler(com.google.gwt.event.logical.shared.ValueChangeHandler<SortConfiguration> handler)
Specified by:
addValueChangeHandler in interface com.google.gwt.event.logical.shared.HasValueChangeHandlers<SortConfiguration>

equals

public boolean equals(Object o)
Overrides:
equals in class Object

fireEvent

public void fireEvent(com.google.gwt.event.shared.GwtEvent<?> event)
Specified by:
fireEvent in interface com.google.gwt.event.shared.HasHandlers

getColumnIndex

public int getColumnIndex()

getModelColumn

public T getModelColumn()

getSortConfiguration

public SortConfiguration getSortConfiguration()

getSortDirection

public SortDirection getSortDirection()

getSortIndex

public int getSortIndex()

getValue

public CellValue<?> getValue(DynamicDataRow object)
Description copied from class: DynamicBaseColumn
Returns the column value from within the underlying data object.

Specified by:
getValue in interface com.google.gwt.cell.client.HasCell<DynamicDataRow,CellValue<? extends Comparable<?>>>
Specified by:
getValue in class DynamicBaseColumn

getWidth

public int getWidth()

hashCode

public int hashCode()
Overrides:
hashCode in class Object

isSortable

public boolean isSortable()

isSystemControlled

public boolean isSystemControlled()

isVisible

public boolean isVisible()

setColumnIndex

public void setColumnIndex(int columnIndex)

setSortable

public void setSortable(boolean isSortable)

setSortDirection

public void setSortDirection(SortDirection sortDirection)

setSortIndex

public void setSortIndex(int sortIndex)

setSystemControlled

public void setSystemControlled(boolean isSystemControlled)

setVisible

public void setVisible(boolean isVisible)

setWidth

public void setWidth(int width)


Copyright © 2001-2011 JBoss Inc.. All Rights Reserved.