qx.ui.table.celleditor
Class Dynamic

java.lang.Object
  extended by qx.core.Object
      extended by qx.core.Target
          extended by qx.ui.table.celleditor.Dynamic
All Implemented Interfaces:
ICellEditorFactory

public class Dynamic
extends Target
implements ICellEditorFactory

A cell editor factory which can dynamically exchange the cell editor based on information retrieved at runtime. This is useful when different rows in a column should have different cellEditors based on cell content or row metadata. A typical example would be a spreadsheet that has different kind of data in one column.


Constructor Summary
Dynamic()
           
Dynamic(java.lang.Object cellEditorFactoryFunction)
           
 
Method Summary
 Widget createCellEditor(java.lang.Object cellInfo)
          Creates the cell editor based on the cellEditorFactory instance returned by the function stored in the cellEditorFactoryFunction property.
 java.lang.Object getCellEditorFactoryFunction()
          Returns the (computed) value of the property cellEditorFactoryFunction.
 java.lang.Object getCellEditorValue(Widget cellEditor)
          Retrieves the value the cell editor based on the current cellEditorFactory instance.
 void initCellEditorFactoryFunction(java.lang.Object arg)
          Calls the apply method and dispatches the change event of the property cellEditorFactoryFunction with the default value defined by the class developer.
 void resetCellEditorFactoryFunction()
          Resets the user value of the property cellEditorFactoryFunction.
 void setCellEditorFactoryFunction(java.lang.Object arg)
          Sets the user value of the property cellEditorFactoryFunction.
 
Methods inherited from class qx.core.Target
_dispatchEvent, addChangeSelectionListener, addChangeValueListener, addEventListener, addExecuteListener, addJavaEventListener, createDispatchChangeEvent, createDispatchDataEvent, createDispatchEvent, dispatchEvent, hasEventListeners, removeEventListener
 
Methods inherited from class qx.core.Object
_disposeFields, _disposeObjectDeep, _disposeObjects, base, dispose, get, getDisposed, isDisposed, reset, self, set, toHashCode, toString_
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Dynamic

public Dynamic()

Dynamic

public Dynamic(java.lang.Object cellEditorFactoryFunction)
Method Detail

createCellEditor

public Widget createCellEditor(java.lang.Object cellInfo)

Creates the cell editor based on the cellEditorFactory instance returned by the function stored in the cellEditorFactoryFunction property. Passes the cellInfo map to the function.

Specified by:
createCellEditor in interface ICellEditorFactory

getCellEditorFactoryFunction

public java.lang.Object getCellEditorFactoryFunction()

Returns the (computed) value of the property cellEditorFactoryFunction.

For further details take a look at the property definition: cellEditorFactoryFunction.


getCellEditorValue

public java.lang.Object getCellEditorValue(Widget cellEditor)

Retrieves the value the cell editor based on the current cellEditorFactory instance.

Specified by:
getCellEditorValue in interface ICellEditorFactory

initCellEditorFactoryFunction

public void initCellEditorFactoryFunction(java.lang.Object arg)

Calls the apply method and dispatches the change event of the property cellEditorFactoryFunction with the default value defined by the class developer. This function can only be called from the constructor of a class.

For further details take a look at the property definition: cellEditorFactoryFunction.


resetCellEditorFactoryFunction

public void resetCellEditorFactoryFunction()

Resets the user value of the property cellEditorFactoryFunction.

The computed value falls back to the next available value e.g. appearance, init or inheritance value depeneding on the property configuration and value availability.

For further details take a look at the property definition: cellEditorFactoryFunction.


setCellEditorFactoryFunction

public void setCellEditorFactoryFunction(java.lang.Object arg)

Sets the user value of the property cellEditorFactoryFunction.

For further details take a look at the property definition: cellEditorFactoryFunction.



Copyright © 2008 1&1. All Rights Reserved.