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

java.lang.Object
  extended by org.drools.guvnor.client.widgets.decoratedgrid.AbstractCellValueFactory<T>
Direct Known Subclasses:
DecisionTableCellValueFactory, TemplateDataCellValueFactory

public abstract class AbstractCellValueFactory<T>
extends Object

A Factory to create CellValues applicable to given columns.


Field Summary
protected static DateConverter DATE_CONVERTOR
           
protected  SuggestionCompletionEngine sce
           
 
Constructor Summary
AbstractCellValueFactory(SuggestionCompletionEngine sce)
           
 
Method Summary
protected abstract  DTDataTypes getDataType(T column)
           
static void injectDateConvertor(DateConverter dc)
          Override the default, GWT-centric, Date conversion utility class.
 CellValue<? extends Comparable<?>> makeCellValue(T column, int iRow, int iCol)
          Make an empty CellValue applicable for the column
protected  CellValue<Boolean> makeNewBooleanCellValue(int iRow, int iCol)
           
protected  CellValue<Boolean> makeNewBooleanCellValue(int iRow, int iCol, Boolean initialValue)
           
protected  CellValue<Date> makeNewDateCellValue(int iRow, int iCol)
           
protected  CellValue<Date> makeNewDateCellValue(int iRow, int iCol, Date initialValue)
           
protected  CellValue<String> makeNewDialectCellValue(int iRow, int iCol)
           
protected  CellValue<String> makeNewDialectCellValue(int iRow, int iCol, String initialValue)
           
protected  CellValue<BigDecimal> makeNewNumericCellValue(int iRow, int iCol)
           
protected  CellValue<BigDecimal> makeNewNumericCellValue(int iRow, int iCol, BigDecimal initialValue)
           
protected  CellValue<String> makeNewStringCellValue(int iRow, int iCol)
           
protected  CellValue<String> makeNewStringCellValue(int iRow, int iCol, Object initialValue)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DATE_CONVERTOR

protected static DateConverter DATE_CONVERTOR

sce

protected SuggestionCompletionEngine sce
Constructor Detail

AbstractCellValueFactory

public AbstractCellValueFactory(SuggestionCompletionEngine sce)
Method Detail

injectDateConvertor

public static void injectDateConvertor(DateConverter dc)
Override the default, GWT-centric, Date conversion utility class. Only use to hook-in a JVM Compatible implementation for tests

Parameters:
dc -

makeCellValue

public CellValue<? extends Comparable<?>> makeCellValue(T column,
                                                        int iRow,
                                                        int iCol)
Make an empty CellValue applicable for the column

Parameters:
column - The model column
iRow - Row coordinate for initialisation
iCol - Column coordinate for initialisation
Returns:
A CellValue

getDataType

protected abstract DTDataTypes getDataType(T column)

makeNewBooleanCellValue

protected CellValue<Boolean> makeNewBooleanCellValue(int iRow,
                                                     int iCol)

makeNewBooleanCellValue

protected CellValue<Boolean> makeNewBooleanCellValue(int iRow,
                                                     int iCol,
                                                     Boolean initialValue)

makeNewDateCellValue

protected CellValue<Date> makeNewDateCellValue(int iRow,
                                               int iCol)

makeNewDateCellValue

protected CellValue<Date> makeNewDateCellValue(int iRow,
                                               int iCol,
                                               Date initialValue)

makeNewDialectCellValue

protected CellValue<String> makeNewDialectCellValue(int iRow,
                                                    int iCol)

makeNewDialectCellValue

protected CellValue<String> makeNewDialectCellValue(int iRow,
                                                    int iCol,
                                                    String initialValue)

makeNewNumericCellValue

protected CellValue<BigDecimal> makeNewNumericCellValue(int iRow,
                                                        int iCol)

makeNewNumericCellValue

protected CellValue<BigDecimal> makeNewNumericCellValue(int iRow,
                                                        int iCol,
                                                        BigDecimal initialValue)

makeNewStringCellValue

protected CellValue<String> makeNewStringCellValue(int iRow,
                                                   int iCol)

makeNewStringCellValue

protected CellValue<String> makeNewStringCellValue(int iRow,
                                                   int iCol,
                                                   Object initialValue)


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