com.google.gwt.widgetideas.table.client
Class ListCellEditor<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.ListCellEditor<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 ListCellEditor<R>
extends InlineCellEditor<R>

A cell editor that lists its options in a drop down box.


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
ListCellEditor()
          Constructor.
ListCellEditor(com.google.gwt.user.client.ui.ListBox listBox)
          Constructor.
ListCellEditor(com.google.gwt.user.client.ui.ListBox listBox, 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.
 com.google.gwt.user.client.ui.ListBox getListBox()
          Get the ListBox of options.
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

ListCellEditor

public ListCellEditor()
Constructor.


ListCellEditor

public ListCellEditor(com.google.gwt.user.client.ui.ListBox listBox)
Constructor.

Parameters:
listBox - a custom ListBox to use

ListCellEditor

public ListCellEditor(com.google.gwt.user.client.ui.ListBox listBox,
                      InlineCellEditor.InlineCellEditorImages images)
Constructor.

Parameters:
listBox - a custom ListBox 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)

getListBox

public com.google.gwt.user.client.ui.ListBox getListBox()
Get the ListBox of options.

Returns:
the listBox

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