com.gwtext.client.widgets.grid
Class UserCustomCellEditor

java.lang.Object
  extended by com.gwtext.client.core.JsObject
      extended by com.gwtext.client.widgets.grid.UserCustomCellEditor

public class UserCustomCellEditor
extends JsObject

Custom cell editor. This class will create a custom editor called by ColumnModel.getCellEditor. By default, the cell editor can be set in ColumnModel on a per column basis. In cases where values or different editors are needed depending on column and rows, this class is used to in ColumnModel.setUserCustomEditor


Field Summary
 
Fields inherited from class com.gwtext.client.core.JsObject
jsObj
 
Constructor Summary
UserCustomCellEditor()
          Empty constructor
UserCustomCellEditor(com.google.gwt.core.client.JavaScriptObject jsObject)
          Constructor based on the JavaScriptObject passed
 
Method Summary
protected  void createFunctionality()
          New functionality added to the extjs.
 GridEditor getCellEditor(int colIndex, int rowIndex)
          This method return null by default.
protected  com.google.gwt.core.client.JavaScriptObject getPluginCustomEditorJ(int colIndex, int rowIndex)
          Method called in Javascript to get the javascript instance of a GridEditor based on the column and row index
 boolean isCellEditable(int colIndex, int rowIndex)
          This method is called to find out if the cell is editable This method should be overwritten; by default, it returns false.
 
Methods inherited from class com.gwtext.client.core.JsObject
getJsObj, getProperties, isCreated, setJsObj
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

UserCustomCellEditor

public UserCustomCellEditor(com.google.gwt.core.client.JavaScriptObject jsObject)
Constructor based on the JavaScriptObject passed

Parameters:
jsObject - the instance of UserCustomCellEditor in javascript

UserCustomCellEditor

public UserCustomCellEditor()
Empty constructor

Method Detail

createFunctionality

protected void createFunctionality()
New functionality added to the extjs. This is a new "class" for custom cell editors.


getPluginCustomEditorJ

protected com.google.gwt.core.client.JavaScriptObject getPluginCustomEditorJ(int colIndex,
                                                                             int rowIndex)
Method called in Javascript to get the javascript instance of a GridEditor based on the column and row index

Parameters:
colIndex - the column index
rowIndex - the row index
Returns:
the javascript object instance of GridEditor

getCellEditor

public GridEditor getCellEditor(int colIndex,
                                int rowIndex)
This method return null by default. This means that whatever is currently set as the GridEditor for the column in extjs is what is return. Overwrite this method to change the GridEditor whenever a cell is clicked.

Parameters:
colIndex - the column index
rowIndex - the row index
Returns:
the GridEditor to use for that column and row index

isCellEditable

public boolean isCellEditable(int colIndex,
                              int rowIndex)
This method is called to find out if the cell is editable This method should be overwritten; by default, it returns false. This method is called only if the isCellEditable from ColumnModel returns false. Otherwise, there is no need to call isCellEditable from the UserCustomCellEditor.

Parameters:
colIndex - the column index
rowIndex - the row index
Returns:
true if the cell is editable; otherwise, false.