org.drools.guvnor.client.widgets.drools.decoratedgrid
Class AbstractCellValueFactory<C,V>

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

public abstract class AbstractCellValueFactory<C,V>
extends Object

A Factory to create CellValues applicable to given columns.


Field Summary
protected  org.drools.ide.common.client.modeldriven.SuggestionCompletionEngine sce
           
 
Constructor Summary
AbstractCellValueFactory(org.drools.ide.common.client.modeldriven.SuggestionCompletionEngine sce)
           
 
Method Summary
abstract  List<CellValue<? extends Comparable<?>>> convertColumnData(C column, List<V> columnData)
          Convert a column of domain data to that suitable for the UI
protected abstract  CellValue<? extends Comparable<?>> convertModelCellValue(C column, V cell)
          Convert a Model cell to one that can be used in the UI
protected abstract  V convertToModelCell(C column, CellValue<?> cell)
          Convert a type-safe UI CellValue into a type-safe Model CellValue
abstract  List<V> makeColumnData(C column)
          Construct a new column of data for the underlying model
protected abstract  V makeModelCellValue(C column)
          Make a Model cell for the given column
protected  CellValue<BigDecimal> makeNewBigDecimalCellValue(BigDecimal initialValue)
           
protected  CellValue<BigInteger> makeNewBigIntegerCellValue(BigInteger initialValue)
           
protected  CellValue<Boolean> makeNewBooleanCellValue()
           
protected  CellValue<Boolean> makeNewBooleanCellValue(Boolean initialValue)
           
protected  CellValue<Byte> makeNewByteCellValue(Byte initialValue)
           
protected  CellValue<Date> makeNewDateCellValue()
           
protected  CellValue<Date> makeNewDateCellValue(Date initialValue)
           
protected  CellValue<String> makeNewDialectCellValue()
           
protected  CellValue<String> makeNewDialectCellValue(String initialValue)
           
protected  CellValue<Double> makeNewDoubleCellValue(Double initialValue)
           
protected  CellValue<Float> makeNewFloatCellValue(Float initialValue)
           
protected  CellValue<Integer> makeNewIntegerCellValue(Integer initialValue)
           
protected  CellValue<Long> makeNewLongCellValue(Long initialValue)
           
protected  CellValue<BigDecimal> makeNewNumericCellValue()
           
protected  CellValue<BigDecimal> makeNewNumericCellValue(BigDecimal initialValue)
           
protected  CellValue<Short> makeNewShortCellValue(Short initialValue)
           
protected  CellValue<String> makeNewStringCellValue()
           
protected  CellValue<String> makeNewStringCellValue(Object initialValue)
           
abstract  List<V> makeRowData()
          Construct a new row of data for the underlying model
abstract  DynamicDataRow makeUIRowData()
          Construct a new row of data for the MergableGridWidget
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

sce

protected org.drools.ide.common.client.modeldriven.SuggestionCompletionEngine sce
Constructor Detail

AbstractCellValueFactory

public AbstractCellValueFactory(org.drools.ide.common.client.modeldriven.SuggestionCompletionEngine sce)
Method Detail

makeRowData

public abstract List<V> makeRowData()
Construct a new row of data for the underlying model

Returns:

makeUIRowData

public abstract DynamicDataRow makeUIRowData()
Construct a new row of data for the MergableGridWidget

Returns:

makeColumnData

public abstract List<V> makeColumnData(C column)
Construct a new column of data for the underlying model

Parameters:
column -
Returns:

convertColumnData

public abstract List<CellValue<? extends Comparable<?>>> convertColumnData(C column,
                                                                           List<V> columnData)
Convert a column of domain data to that suitable for the UI

Parameters:
column -
columnData -
Returns:

makeModelCellValue

protected abstract V makeModelCellValue(C column)
Make a Model cell for the given column

Parameters:
column -
Returns:

convertModelCellValue

protected abstract CellValue<? extends Comparable<?>> convertModelCellValue(C column,
                                                                            V cell)
Convert a Model cell to one that can be used in the UI

Parameters:
cell -
Returns:

convertToModelCell

protected abstract V convertToModelCell(C column,
                                        CellValue<?> cell)
Convert a type-safe UI CellValue into a type-safe Model CellValue

Parameters:
column - Model column from which data-type can be derived
cell - UI CellValue to convert into Model CellValue
Returns:

makeNewBooleanCellValue

protected CellValue<Boolean> makeNewBooleanCellValue()

makeNewBooleanCellValue

protected CellValue<Boolean> makeNewBooleanCellValue(Boolean initialValue)

makeNewDateCellValue

protected CellValue<Date> makeNewDateCellValue()

makeNewDateCellValue

protected CellValue<Date> makeNewDateCellValue(Date initialValue)

makeNewDialectCellValue

protected CellValue<String> makeNewDialectCellValue()

makeNewDialectCellValue

protected CellValue<String> makeNewDialectCellValue(String initialValue)

makeNewNumericCellValue

protected CellValue<BigDecimal> makeNewNumericCellValue()

makeNewNumericCellValue

protected CellValue<BigDecimal> makeNewNumericCellValue(BigDecimal initialValue)

makeNewBigDecimalCellValue

protected CellValue<BigDecimal> makeNewBigDecimalCellValue(BigDecimal initialValue)

makeNewBigIntegerCellValue

protected CellValue<BigInteger> makeNewBigIntegerCellValue(BigInteger initialValue)

makeNewByteCellValue

protected CellValue<Byte> makeNewByteCellValue(Byte initialValue)

makeNewDoubleCellValue

protected CellValue<Double> makeNewDoubleCellValue(Double initialValue)

makeNewFloatCellValue

protected CellValue<Float> makeNewFloatCellValue(Float initialValue)

makeNewIntegerCellValue

protected CellValue<Integer> makeNewIntegerCellValue(Integer initialValue)

makeNewLongCellValue

protected CellValue<Long> makeNewLongCellValue(Long initialValue)

makeNewShortCellValue

protected CellValue<Short> makeNewShortCellValue(Short initialValue)

makeNewStringCellValue

protected CellValue<String> makeNewStringCellValue()

makeNewStringCellValue

protected CellValue<String> makeNewStringCellValue(Object initialValue)


Copyright © 2001-2012 JBoss by Red Hat. All Rights Reserved.