org.drools.guvnor.client.modeldriven.ui
Class TemplateDataCellValueFactory

java.lang.Object
  extended by org.drools.guvnor.client.widgets.decoratedgrid.AbstractCellValueFactory<TemplateDataColumn>
      extended by org.drools.guvnor.client.modeldriven.ui.TemplateDataCellValueFactory

public class TemplateDataCellValueFactory
extends AbstractCellValueFactory<TemplateDataColumn>

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
TemplateDataCellValueFactory(SuggestionCompletionEngine sce)
          Construct a Cell Value Factory for a specific Template data editor
 
Method Summary
 String convertValueToString(TemplateDataColumn column, CellValue<?> cv)
          Serialise value to a String
protected  DTDataTypes52 getDataType(TemplateDataColumn column)
           
 CellValue<? extends Comparable<?>> makeCellValue(TemplateDataColumn column, int iRow, int iCol, String initialValue)
          Make a CellValue applicable for the column.
 
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

TemplateDataCellValueFactory

public TemplateDataCellValueFactory(SuggestionCompletionEngine sce)
Construct a Cell Value Factory for a specific Template data editor

Parameters:
sce - SuggestionCompletionEngine to assist with drop-downs
Method Detail

convertValueToString

public String convertValueToString(TemplateDataColumn column,
                                   CellValue<?> cv)
Serialise value to a String

Parameters:
column - The model column
cv - CellValue for which value will be serialised
Returns:
String representation of value

makeCellValue

public CellValue<? extends Comparable<?>> makeCellValue(TemplateDataColumn column,
                                                        int iRow,
                                                        int iCol,
                                                        String initialValue)
Make a CellValue applicable for the column. This is used by legacy UI Models (Template Data Editor and legacy Guided Decision Tables) that store values in a two-dimensional array of Strings.

Parameters:
column - The model column
iRow - Row coordinate for initialisation
iCol - Column coordinate for initialisation
initialValue - The initial value of the cell
Returns:
A CellValue

getDataType

protected DTDataTypes52 getDataType(TemplateDataColumn column)
Specified by:
getDataType in class AbstractCellValueFactory<TemplateDataColumn>


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