Guvnor web application Drools 6.0.0-SNAPSHOT

org.drools.guvnor.client.widgets.drools.decoratedgrid
Class DynamicBaseColumn

java.lang.Object
  extended by org.drools.guvnor.client.widgets.drools.decoratedgrid.DynamicBaseColumn
All Implemented Interfaces:
com.google.gwt.cell.client.HasCell<DynamicDataRow,CellValue<? extends Comparable<?>>>
Direct Known Subclasses:
DynamicColumn

public abstract class DynamicBaseColumn
extends Object
implements com.google.gwt.cell.client.HasCell<DynamicDataRow,CellValue<? extends Comparable<?>>>

A representation of a column in a table. The column may maintain view data for each cell on demand. New view data, if needed, is created by the cell's onBrowserEvent method, stored in the Column, and passed to future calls to Cell's Cell.onBrowserEvent(com.google.gwt.cell.client.Cell.Context, com.google.gwt.dom.client.Element, C, com.google.gwt.dom.client.NativeEvent, com.google.gwt.cell.client.ValueUpdater) and Cell.render(com.google.gwt.cell.client.Cell.Context, C, com.google.gwt.safehtml.shared.SafeHtmlBuilder) methods. Forked GWT2.1.1's Column class to make Cell non-final.


Field Summary
protected  DecoratedGridCellValueAdaptor<? extends Comparable<?>> cell
          The Cell responsible for rendering items in the column.
protected  com.google.gwt.cell.client.FieldUpdater<DynamicDataRow,CellValue<? extends Comparable<?>>> fieldUpdater
          The FieldUpdater used for updating values in the column.
 
Constructor Summary
DynamicBaseColumn(DecoratedGridCellValueAdaptor<? extends Comparable<?>> cell)
          Construct a new Column with a given Cell.
 
Method Summary
 DecoratedGridCellValueAdaptor<? extends Comparable<?>> getCell()
          Returns the Cell responsible for rendering items in the column.
 com.google.gwt.cell.client.FieldUpdater<DynamicDataRow,CellValue<? extends Comparable<?>>> getFieldUpdater()
          Returns the FieldUpdater used for updating values in the column.
abstract  CellValue<? extends Comparable<?>> getValue(DynamicDataRow object)
          Returns the column value from within the underlying data object.
 void onBrowserEvent(com.google.gwt.cell.client.Cell.Context context, com.google.gwt.dom.client.Element elem, DynamicDataRow object, com.google.gwt.dom.client.NativeEvent event)
          Handle a browser event that took place within the column.
 void render(com.google.gwt.cell.client.Cell.Context context, DynamicDataRow object, com.google.gwt.safehtml.shared.SafeHtmlBuilder sb)
          Render the object into the cell.
 void setCell(DecoratedGridCellValueAdaptor<? extends Comparable<?>> cell)
          Set the cell used to render the column
 void setFieldUpdater(com.google.gwt.cell.client.FieldUpdater<DynamicDataRow,CellValue<? extends Comparable<?>>> fieldUpdater)
          Set the FieldUpdater used for updating values in the column.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

cell

protected DecoratedGridCellValueAdaptor<? extends Comparable<?>> cell
The Cell responsible for rendering items in the column.


fieldUpdater

protected com.google.gwt.cell.client.FieldUpdater<DynamicDataRow,CellValue<? extends Comparable<?>>> fieldUpdater
The FieldUpdater used for updating values in the column.

Constructor Detail

DynamicBaseColumn

public DynamicBaseColumn(DecoratedGridCellValueAdaptor<? extends Comparable<?>> cell)
Construct a new Column with a given Cell.

Parameters:
cell - the Cell used by this Column
Method Detail

getCell

public DecoratedGridCellValueAdaptor<? extends Comparable<?>> getCell()
Returns the Cell responsible for rendering items in the column.

Specified by:
getCell in interface com.google.gwt.cell.client.HasCell<DynamicDataRow,CellValue<? extends Comparable<?>>>
Returns:
a Cell

getFieldUpdater

public com.google.gwt.cell.client.FieldUpdater<DynamicDataRow,CellValue<? extends Comparable<?>>> getFieldUpdater()
Returns the FieldUpdater used for updating values in the column.

Specified by:
getFieldUpdater in interface com.google.gwt.cell.client.HasCell<DynamicDataRow,CellValue<? extends Comparable<?>>>
Returns:
an instance of FieldUpdater
See Also:
setFieldUpdater(FieldUpdater)

getValue

public abstract CellValue<? extends Comparable<?>> getValue(DynamicDataRow object)
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<?>>>

onBrowserEvent

public void onBrowserEvent(com.google.gwt.cell.client.Cell.Context context,
                           com.google.gwt.dom.client.Element elem,
                           DynamicDataRow object,
                           com.google.gwt.dom.client.NativeEvent event)
Handle a browser event that took place within the column.

Parameters:
context - the cell context
elem - the parent Element
object - the base object to be updated
event - the native browser event

render

public void render(com.google.gwt.cell.client.Cell.Context context,
                   DynamicDataRow object,
                   com.google.gwt.safehtml.shared.SafeHtmlBuilder sb)
Render the object into the cell.

Parameters:
context - the cell context
object - the object to render
sb - the buffer to render into

setCell

public void setCell(DecoratedGridCellValueAdaptor<? extends Comparable<?>> cell)
Set the cell used to render the column

Parameters:
cell -

setFieldUpdater

public void setFieldUpdater(com.google.gwt.cell.client.FieldUpdater<DynamicDataRow,CellValue<? extends Comparable<?>>> fieldUpdater)
Set the FieldUpdater used for updating values in the column.

Parameters:
fieldUpdater - the field updater
See Also:
getFieldUpdater()

Guvnor web application Drools 6.0.0-SNAPSHOT

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