org.drools.guvnor.client.decisiontable.widget
Class DecisionTableCellValueFactory

java.lang.Object
  extended by org.drools.guvnor.client.widgets.decoratedgrid.AbstractCellValueFactory<DTColumnConfig>
      extended by org.drools.guvnor.client.decisiontable.widget.DecisionTableCellValueFactory

public class DecisionTableCellValueFactory
extends AbstractCellValueFactory<DTColumnConfig>

A Factory to create CellValues applicable to given columns.


Field Summary
 
Fields inherited from class org.drools.guvnor.client.widgets.decoratedgrid.AbstractCellValueFactory
DATE_CONVERTOR, sce
 
Constructor Summary
DecisionTableCellValueFactory(SuggestionCompletionEngine sce, TypeSafeGuidedDecisionTable model)
          Construct a Cell Value Factory for a specific Decision Table
 
Method Summary
 DTCellValue convertToDTModelCell(DTColumnConfig column, CellValue<?> cell)
          Convert a type-safe UI CellValue into a type-safe Model CellValue
protected  DTDataTypes getDataType(DTColumnConfig column)
           
 CellValue<? extends Comparable<?>> makeCellValue(DTColumnConfig column, int iRow, int iCol, DTCellValue dcv)
          Make a CellValue applicable for the column
protected  CellValue<BigDecimal> makeNewRowNumberCellValue(int iRow, int iCol)
           
 
Methods inherited from class org.drools.guvnor.client.widgets.decoratedgrid.AbstractCellValueFactory
injectDateConvertor, makeCellValue, makeNewBooleanCellValue, makeNewBooleanCellValue, makeNewDateCellValue, makeNewDateCellValue, makeNewDialectCellValue, makeNewDialectCellValue, makeNewNumericCellValue, makeNewNumericCellValue, makeNewStringCellValue, makeNewStringCellValue
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DecisionTableCellValueFactory

public DecisionTableCellValueFactory(SuggestionCompletionEngine sce,
                                     TypeSafeGuidedDecisionTable model)
Construct a Cell Value Factory for a specific Decision Table

Parameters:
sce - SuggestionCompletionEngine to assist with drop-downs
model - The Decision Table model to assist data-type derivation
Method Detail

convertToDTModelCell

public DTCellValue convertToDTModelCell(DTColumnConfig 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:

makeCellValue

public CellValue<? extends Comparable<?>> makeCellValue(DTColumnConfig column,
                                                        int iRow,
                                                        int iCol,
                                                        DTCellValue dcv)
Make a CellValue applicable for the column

Parameters:
column - The model column
iRow - Row coordinate for initialisation
iCol - Column coordinate for initialisation
dcv - The Model cell containing the value
Returns:
A CellValue

getDataType

protected DTDataTypes getDataType(DTColumnConfig column)
Specified by:
getDataType in class AbstractCellValueFactory<DTColumnConfig>

makeNewRowNumberCellValue

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


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