|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.google.gwt.user.client.ui.UIObject
com.google.gwt.user.client.ui.Widget
org.drools.guvnor.client.widgets.decoratedgrid.MergableGridWidget<T>
public abstract class MergableGridWidget<T>
An abstract grid of data. Implementations can choose the orientation to render "rows" and "columns" (e.g. some may transpose the normal meaning to provide a horizontal implementation of normally vertical tabular data)
Nested Class Summary | |
---|---|
static class |
MergableGridWidget.CellSelectionDetail
Container for a details of a selected cell |
static class |
MergableGridWidget.MOVE_DIRECTION
|
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 |
Field Summary | |
---|---|
protected boolean |
bDragOperationPrimed
|
protected List<DynamicColumn<T>> |
columns
|
protected DynamicData |
data
|
protected static Constants |
messages
|
protected MergableGridWidget.MOVE_DIRECTION |
rangeDirection
|
protected CellValue<?> |
rangeExtentCell
|
protected CellValue<?> |
rangeOriginCell
|
protected static DecisionTableResources |
resource
|
protected TreeSet<CellValue<? extends Comparable<?>>> |
selections
|
protected static String |
selectorGroupedCellsHtml
|
protected static String |
selectorUngroupedCellsHtml
|
protected static DecisionTableResources.DecisionTableStyle |
style
|
protected com.google.gwt.dom.client.TableElement |
table
|
protected com.google.gwt.dom.client.TableSectionElement |
tbody
|
Fields inherited from class com.google.gwt.user.client.ui.UIObject |
---|
DEBUG_ID_PREFIX |
Constructor Summary | |
---|---|
MergableGridWidget()
A grid of cells. |
Method Summary | |
---|---|
com.google.gwt.event.shared.HandlerRegistration |
addRowGroupingChangeHandler(RowGroupingChangeHandler handler)
Add a handler for RowGroupingChangeEvents |
com.google.gwt.event.shared.HandlerRegistration |
addSelectedCellChangeHandler(SelectedCellChangeHandler handler)
Add a handler for SelectedCellChangeEvents |
protected void |
clearSelection()
|
protected abstract void |
createEmptyRowElement(int index)
|
protected abstract void |
createRowElement(int index,
DynamicDataRow rowData)
|
void |
deleteColumn(DynamicColumn<T> column,
boolean bRedraw)
Delete a column |
void |
deleteRow(DynamicDataRow row)
Delete the given row. |
protected abstract void |
deleteRowElement(int index)
|
List<DynamicColumn<T>> |
getColumns()
Return grid's columns |
DynamicData |
getData()
Return grid's data. |
List<CellValue<?>> |
getSelectedCells()
Return an immutable list of selected cells |
void |
insertColumnBefore(DynamicColumn<T> columnBefore,
DynamicColumn<T> newColumn,
List<CellValue<? extends Comparable<?>>> columnData,
boolean bRedraw)
Insert a column before another |
DynamicDataRow |
insertRowBefore(DynamicDataRow rowBefore,
List<CellValue<? extends Comparable<?>>> rowData)
Insert the given row before the provided index. |
protected boolean |
isGroupWidgetClicked(com.google.gwt.user.client.Event event,
com.google.gwt.dom.client.Element target)
|
abstract void |
redraw()
Redraw the whole table |
abstract void |
redrawColumn(int index)
Redraw table column. |
abstract void |
redrawColumns(int startRedrawIndex,
int endRedrawIndex)
Redraw table columns. |
protected abstract void |
redrawRows(int startRedrawIndex,
int endRedrawIndex)
Redraw table rows. |
protected abstract void |
removeRowElement(int index)
|
boolean |
toggleMerging()
Toggle the state of DecoratedGridWidget merging. |
void |
update(Object value)
|
Methods inherited from class com.google.gwt.user.client.ui.Widget |
---|
addAttachHandler, addBitlessDomHandler, addDomHandler, addHandler, asWidget, asWidgetOrNull, createHandlerManager, delegateEvent, doAttachChildren, doDetachChildren, fireEvent, getHandlerCount, getLayoutData, getParent, isAttached, isOrWasAttached, onAttach, onBrowserEvent, onDetach, onLoad, onUnload, removeFromParent, setLayoutData, sinkEvents |
Methods inherited from class com.google.gwt.user.client.ui.UIObject |
---|
addStyleDependentName, addStyleName, ensureDebugId, ensureDebugId, ensureDebugId, getAbsoluteLeft, getAbsoluteTop, getElement, getOffsetHeight, getOffsetWidth, getStyleElement, getStyleName, getStyleName, getStylePrimaryName, getStylePrimaryName, getTitle, isVisible, isVisible, onEnsureDebugId, removeStyleDependentName, removeStyleName, setElement, setElement, setHeight, setPixelSize, setSize, setStyleDependentName, setStyleName, setStyleName, setStyleName, setStyleName, setStylePrimaryName, setStylePrimaryName, setTitle, setVisible, setVisible, setWidth, sinkBitlessEvent, toString, unsinkEvents |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Methods inherited from interface com.google.gwt.event.shared.HasHandlers |
---|
fireEvent |
Field Detail |
---|
protected TreeSet<CellValue<? extends Comparable<?>>> selections
protected com.google.gwt.dom.client.TableElement table
protected com.google.gwt.dom.client.TableSectionElement tbody
protected static final Constants messages
protected static final DecisionTableResources resource
protected static final DecisionTableResources.DecisionTableStyle style
protected static final String selectorGroupedCellsHtml
protected static final String selectorUngroupedCellsHtml
protected List<DynamicColumn<T>> columns
protected DynamicData data
protected CellValue<?> rangeOriginCell
protected CellValue<?> rangeExtentCell
protected MergableGridWidget.MOVE_DIRECTION rangeDirection
protected boolean bDragOperationPrimed
Constructor Detail |
---|
public MergableGridWidget()
Method Detail |
---|
public com.google.gwt.event.shared.HandlerRegistration addRowGroupingChangeHandler(RowGroupingChangeHandler handler)
addRowGroupingChangeHandler
in interface HasRowGroupingChangeHandlers
handler
- the handler
public com.google.gwt.event.shared.HandlerRegistration addSelectedCellChangeHandler(SelectedCellChangeHandler handler)
addSelectedCellChangeHandler
in interface HasSelectedCellChangeHandlers
handler
- the handler
public void deleteColumn(DynamicColumn<T> column, boolean bRedraw)
column
- Column to deletebRedraw
- Should grid be redrawnpublic void deleteRow(DynamicDataRow row)
row
- public List<DynamicColumn<T>> getColumns()
public DynamicData getData()
getFlattenedData()
should be used in
preference if the ungrouped data is needed (e.g. when persisting the
model).
public List<CellValue<?>> getSelectedCells()
public void insertColumnBefore(DynamicColumn<T> columnBefore, DynamicColumn<T> newColumn, List<CellValue<? extends Comparable<?>>> columnData, boolean bRedraw)
columnBefore
- The column before which the new column should be insertednewColumn
- Column definitioncolumnData
- Data for columnbRedraw
- Should grid be redrawnpublic DynamicDataRow insertRowBefore(DynamicDataRow rowBefore, List<CellValue<? extends Comparable<?>>> rowData)
rowBefore
- The row before which the new row should be insertedrowData
- The row of data to insertpublic abstract void redraw()
public abstract void redrawColumn(int index)
index
- Start column index (inclusive)public abstract void redrawColumns(int startRedrawIndex, int endRedrawIndex)
startRedrawIndex
- Start column index (inclusive)endRedrawIndex
- End column index (inclusive)public boolean toggleMerging()
public void update(Object value)
update
in interface com.google.gwt.cell.client.ValueUpdater<Object>
protected void clearSelection()
protected abstract void createEmptyRowElement(int index)
protected abstract void createRowElement(int index, DynamicDataRow rowData)
protected abstract void deleteRowElement(int index)
protected boolean isGroupWidgetClicked(com.google.gwt.user.client.Event event, com.google.gwt.dom.client.Element target)
protected abstract void redrawRows(int startRedrawIndex, int endRedrawIndex)
startRedrawIndex
- Start row index (inclusive)endRedrawIndex
- End row index (inclusive)protected abstract void removeRowElement(int index)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |