com.google.gwt.widgetideas.table.client
Class TextCellEditor<R>

java.lang.Object
  extended by com.google.gwt.user.client.ui.UIObject
      extended by com.google.gwt.user.client.ui.Widget
          extended by com.google.gwt.user.client.ui.Panel
              extended by com.google.gwt.user.client.ui.SimplePanel
                  extended by com.google.gwt.user.client.ui.DecoratorPanel
                      extended by com.google.gwt.user.client.ui.PopupPanel
                          extended by com.google.gwt.widgetideas.table.client.InlineCellEditor<R>
                              extended by com.google.gwt.widgetideas.table.client.TextCellEditor<R>
Type Parameters:
R - the type of the row value associated with the editor
All Implemented Interfaces:
com.google.gwt.user.client.EventListener, com.google.gwt.user.client.EventPreview, com.google.gwt.user.client.ui.HasAnimation, com.google.gwt.user.client.ui.HasWidgets, com.google.gwt.user.client.ui.SourcesPopupEvents, AbstractCellEditor<R>

public class TextCellEditor<R>
extends InlineCellEditor<R>

A text editor used to edit a single line of text.


Nested Class Summary
 
Nested classes/interfaces inherited from class com.google.gwt.widgetideas.table.client.InlineCellEditor
InlineCellEditor.InlineCellEditorImages
 
Nested classes/interfaces inherited from class com.google.gwt.user.client.ui.PopupPanel
com.google.gwt.user.client.ui.PopupPanel.AnimationType, com.google.gwt.user.client.ui.PopupPanel.PositionCallback
 
Nested classes/interfaces inherited from class com.google.gwt.user.client.ui.UIObject
com.google.gwt.user.client.ui.UIObject.DebugIdImpl, com.google.gwt.user.client.ui.UIObject.DebugIdImplEnabled
 
Nested classes/interfaces inherited from interface com.google.gwt.widgetideas.table.client.AbstractCellEditor
AbstractCellEditor.Callback<R>, AbstractCellEditor.CellEditInfo<R>
 
Field Summary
 
Fields inherited from class com.google.gwt.widgetideas.table.client.InlineCellEditor
DEFAULT_STYLENAME
 
Fields inherited from class com.google.gwt.user.client.ui.UIObject
DEBUG_ID_PREFIX
 
Constructor Summary
TextCellEditor()
          Constructor.
TextCellEditor(com.google.gwt.user.client.ui.TextBoxBase textBox)
          Constructor.
TextCellEditor(com.google.gwt.user.client.ui.TextBoxBase textBox, InlineCellEditor.InlineCellEditorImages images)
          Constructor.
 
Method Summary
 void editCell(AbstractCellEditor.CellEditInfo<R> cellEditInfo, AbstractCellEditor.Callback<R> callback)
          Handle a request from the table to edit a cell.
protected  com.google.gwt.user.client.ui.TextBoxBase getTextBox()
           
protected  java.lang.Object getValue()
          Get the value from the editor to put into the cell.
protected  void setValue(java.lang.Object value)
          Set the value in the editor based on the value in the cell.
 
Methods inherited from class com.google.gwt.widgetideas.table.client.InlineCellEditor
accept, cancel, getAcceptWidget, getCancelWidget, getContentWidget, getLabel, onAccept, onCancel, setAcceptWidget, setCancelWidget, setLabel
 
Methods inherited from class com.google.gwt.user.client.ui.PopupPanel
addPopupListener, center, getContainerElement, getOffsetHeight, getOffsetWidth, getPopupLeft, getPopupTop, getTitle, hide, isAnimationEnabled, onDetach, onEventPreview, onKeyDownPreview, onKeyPressPreview, onKeyUpPreview, removePopupListener, setAnimationEnabled, setAnimationType, setHeight, setPopupPosition, setPopupPositionAndShow, setTitle, setVisible, setWidget, setWidth, show
 
Methods inherited from class com.google.gwt.user.client.ui.SimplePanel
add, getWidget, iterator, remove
 
Methods inherited from class com.google.gwt.user.client.ui.Panel
adopt, adopt, clear, disown, doAttachChildren, doDetachChildren, onLoad, onUnload, orphan
 
Methods inherited from class com.google.gwt.user.client.ui.Widget
getParent, isAttached, onAttach, onBrowserEvent, removeFromParent, setElement
 
Methods inherited from class com.google.gwt.user.client.ui.UIObject
addStyleDependentName, addStyleName, ensureDebugId, ensureDebugId, getAbsoluteLeft, getAbsoluteTop, getElement, getStyleElement, getStyleName, getStyleName, getStylePrimaryName, getStylePrimaryName, isVisible, isVisible, onEnsureDebugId, removeStyleDependentName, removeStyleName, setPixelSize, setSize, setStyleName, setStyleName, setStyleName, setStylePrimaryName, setStylePrimaryName, setVisible, sinkEvents, toString, unsinkEvents
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

TextCellEditor

public TextCellEditor()
Constructor.


TextCellEditor

public TextCellEditor(com.google.gwt.user.client.ui.TextBoxBase textBox)
Constructor.

Parameters:
textBox - the text box to use

TextCellEditor

public TextCellEditor(com.google.gwt.user.client.ui.TextBoxBase textBox,
                      InlineCellEditor.InlineCellEditorImages images)
Constructor.

Parameters:
textBox - the text box to use
images - the images to use for the accept/cancel buttons
Method Detail

editCell

public void editCell(AbstractCellEditor.CellEditInfo<R> cellEditInfo,
                     AbstractCellEditor.Callback<R> callback)
Description copied from interface: AbstractCellEditor
Handle a request from the table to edit a cell.

Specified by:
editCell in interface AbstractCellEditor<R>
Overrides:
editCell in class InlineCellEditor<R>
Parameters:
cellEditInfo - information about the source of the edit request
callback - callback used when editing is complete
See Also:
AbstractCellEditor.editCell(CellEditInfo, Callback)

getTextBox

protected com.google.gwt.user.client.ui.TextBoxBase getTextBox()
Returns:
the text box used in the editor

getValue

protected java.lang.Object getValue()
Description copied from class: InlineCellEditor
Get the value from the editor to put into the cell. If the value is a Widget, it will be set as a Widget in the table. If it is not a Widget, it will be set as an HTML string.

Specified by:
getValue in class InlineCellEditor<R>
Returns:
the new value to put into the cell

setValue

protected void setValue(java.lang.Object value)
Description copied from class: InlineCellEditor
Set the value in the editor based on the value in the cell.

Specified by:
setValue in class InlineCellEditor<R>
Parameters:
value - the value in the cell, either a Widget or HTML string