org.drools.guvnor.client.decisiontable.cells
Class AbstractPopupEditCell<C,V>
java.lang.Object
com.google.gwt.cell.client.AbstractCell<C>
com.google.gwt.cell.client.AbstractEditableCell<C,V>
org.drools.guvnor.client.decisiontable.cells.AbstractPopupEditCell<C,V>
- All Implemented Interfaces:
- com.google.gwt.cell.client.Cell<C>
- Direct Known Subclasses:
- PopupDateEditCell, PopupDropDownEditCell, PopupNumericEditCell, PopupTextEditCell
public abstract class AbstractPopupEditCell<C,V>
- extends com.google.gwt.cell.client.AbstractEditableCell<C,V>
A Popup Editor.
Nested classes/interfaces inherited from interface com.google.gwt.cell.client.Cell |
com.google.gwt.cell.client.Cell.Context |
Field Summary |
protected com.google.gwt.cell.client.Cell.Context |
lastContext
|
protected com.google.gwt.dom.client.Element |
lastParent
|
protected C |
lastValue
|
protected int |
offsetX
|
protected int |
offsetY
|
protected com.google.gwt.user.client.ui.PopupPanel |
panel
|
protected com.google.gwt.text.shared.SafeHtmlRenderer<String> |
renderer
|
protected com.google.gwt.cell.client.ValueUpdater<C> |
valueUpdater
|
protected com.google.gwt.user.client.ui.VerticalPanel |
vPanel
|
Method Summary |
protected abstract void |
commit()
Commit the change to the underlying model. |
boolean |
isEditing(com.google.gwt.cell.client.Cell.Context context,
com.google.gwt.dom.client.Element parent,
C value)
|
void |
onBrowserEvent(com.google.gwt.cell.client.Cell.Context context,
com.google.gwt.dom.client.Element parent,
C value,
com.google.gwt.dom.client.NativeEvent event,
com.google.gwt.cell.client.ValueUpdater<C> valueUpdater)
|
protected void |
onEnterKeyDown(com.google.gwt.cell.client.Cell.Context context,
com.google.gwt.dom.client.Element parent,
C value,
com.google.gwt.dom.client.NativeEvent event,
com.google.gwt.cell.client.ValueUpdater<C> valueUpdater)
|
protected abstract void |
startEditing(com.google.gwt.cell.client.Cell.Context context,
com.google.gwt.dom.client.Element parent,
C value)
Initiate editing within the "Popup". |
Methods inherited from class com.google.gwt.cell.client.AbstractEditableCell |
clearViewData, getViewData, setViewData |
Methods inherited from class com.google.gwt.cell.client.AbstractCell |
dependsOnSelection, getConsumedEvents, handlesSelection, render, resetFocus, setValue |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
offsetX
protected int offsetX
offsetY
protected int offsetY
lastContext
protected com.google.gwt.cell.client.Cell.Context lastContext
lastParent
protected com.google.gwt.dom.client.Element lastParent
lastValue
protected C lastValue
panel
protected final com.google.gwt.user.client.ui.PopupPanel panel
vPanel
protected final com.google.gwt.user.client.ui.VerticalPanel vPanel
renderer
protected final com.google.gwt.text.shared.SafeHtmlRenderer<String> renderer
valueUpdater
protected com.google.gwt.cell.client.ValueUpdater<C> valueUpdater
AbstractPopupEditCell
public AbstractPopupEditCell()
- Boiler-plate and scaffolding for a general "Popup". Subclasses should
call this default constructor and append their specific child controls
for the "Popup" to
vPanel
.
- Parameters:
renderer
-
isEditing
public boolean isEditing(com.google.gwt.cell.client.Cell.Context context,
com.google.gwt.dom.client.Element parent,
C value)
- Specified by:
isEditing
in interface com.google.gwt.cell.client.Cell<C>
- Specified by:
isEditing
in class com.google.gwt.cell.client.AbstractEditableCell<C,V>
onBrowserEvent
public void onBrowserEvent(com.google.gwt.cell.client.Cell.Context context,
com.google.gwt.dom.client.Element parent,
C value,
com.google.gwt.dom.client.NativeEvent event,
com.google.gwt.cell.client.ValueUpdater<C> valueUpdater)
- Specified by:
onBrowserEvent
in interface com.google.gwt.cell.client.Cell<C>
- Overrides:
onBrowserEvent
in class com.google.gwt.cell.client.AbstractCell<C>
commit
protected abstract void commit()
- Commit the change to the underlying model. Implementations should use the
protected
valueUpdater
initialised in onBrowseEvent to pass
new values to the model. Implementations should also invoke
setValue
to write the new value back to the Cell's HTML
onEnterKeyDown
protected void onEnterKeyDown(com.google.gwt.cell.client.Cell.Context context,
com.google.gwt.dom.client.Element parent,
C value,
com.google.gwt.dom.client.NativeEvent event,
com.google.gwt.cell.client.ValueUpdater<C> valueUpdater)
- Overrides:
onEnterKeyDown
in class com.google.gwt.cell.client.AbstractCell<C>
startEditing
protected abstract void startEditing(com.google.gwt.cell.client.Cell.Context context,
com.google.gwt.dom.client.Element parent,
C value)
- Initiate editing within the "Popup". Implementations should populate the
child controls within the "Popup" before showing the Popup
panel
- Parameters:
parent
- value
-
Copyright © 2001-2012 JBoss by Red Hat. All Rights Reserved.