org.drools.guvnor.client.widgets.drools.decoratedgrid
Class AbstractMergableGridWidget<M,T>

java.lang.Object
  extended by com.google.gwt.user.client.ui.UIObject
      extended by com.google.gwt.user.client.ui.Widget
          extended by org.drools.guvnor.client.widgets.drools.decoratedgrid.AbstractMergableGridWidget<M,T>
All Implemented Interfaces:
com.google.gwt.event.logical.shared.HasAttachHandlers, com.google.gwt.event.shared.EventHandler, com.google.gwt.event.shared.HasHandlers, com.google.gwt.user.client.EventListener, com.google.gwt.user.client.ui.HasVisibility, com.google.gwt.user.client.ui.IsWidget, AppendRowEvent.Handler, CellStateChangedEvent.Handler, ColumnResizeEvent.Handler, CopyRowsEvent.Handler, DeleteColumnEvent.Handler, DeleteRowEvent.Handler, InsertInternalColumnEvent.Handler<T>, InsertRowEvent.Handler, MoveColumnsEvent.Handler, PasteRowsEvent.Handler, SetColumnVisibilityEvent.Handler, SetInternalModelEvent.Handler<M,T>, SortDataEvent.Handler, ToggleMergingEvent.Handler, UpdateColumnDataEvent.Handler, UpdateColumnDefinitionEvent.Handler, UpdateSelectedCellsEvent.Handler
Direct Known Subclasses:
AbstractVerticalMergableGridWidget, ScorecardAttributeGridWidget

public abstract class AbstractMergableGridWidget<M,T>
extends com.google.gwt.user.client.ui.Widget
implements ToggleMergingEvent.Handler, DeleteRowEvent.Handler, InsertRowEvent.Handler, AppendRowEvent.Handler, CopyRowsEvent.Handler, PasteRowsEvent.Handler, DeleteColumnEvent.Handler, SetInternalModelEvent.Handler<M,T>, InsertInternalColumnEvent.Handler<T>, SetColumnVisibilityEvent.Handler, UpdateColumnDataEvent.Handler, UpdateColumnDefinitionEvent.Handler, ColumnResizeEvent.Handler, MoveColumnsEvent.Handler, SortDataEvent.Handler, UpdateSelectedCellsEvent.Handler, CellStateChangedEvent.Handler

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 AbstractMergableGridWidget.CellSelectionDetail
          Container for a details of a selected cell
static class AbstractMergableGridWidget.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  AbstractCellFactory<T> cellFactory
           
protected  AbstractCellValueFactory<T,?> cellValueFactory
           
protected  List<DynamicColumn<T>> columns
           
protected  DynamicData data
           
protected  CellTableDropDownDataValueMapProvider dropDownManager
           
protected  com.google.gwt.event.shared.EventBus eventBus
           
protected  boolean isReadOnly
           
protected  AbstractMergableGridWidget.MOVE_DIRECTION rangeDirection
           
protected  CellValue<?> rangeExtentCell
           
protected  CellValue<?> rangeOriginCell
           
protected  ResourcesProvider<T> resources
           
protected static RowGroupingChangeEvent ROW_GROUPING_EVENT
           
protected  RowMapper rowMapper
           
protected  TreeSet<CellValue<? extends Comparable<?>>> selections
           
protected  String selectorGroupedCellsHtml
           
protected  String selectorUngroupedCellsHtml
           
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
AbstractMergableGridWidget(ResourcesProvider<T> resources, AbstractCellFactory<T> cellFactory, AbstractCellValueFactory<T,?> cellValueFactory, CellTableDropDownDataValueMapProvider dropDownManager, boolean isReadOnly, com.google.gwt.event.shared.EventBus eventBus)
          A grid of cells.
 
Method Summary
protected  void clearSelection()
           
protected  boolean isGroupWidgetClicked(com.google.gwt.user.client.Event event, com.google.gwt.dom.client.Element target)
           
 void onAppendRow(AppendRowEvent event)
           
 void onCellStateChanged(CellStateChangedEvent event)
           
 void onColumnResize(ColumnResizeEvent event)
           
 void onCopyRows(CopyRowsEvent event)
           
 void onDeleteColumn(DeleteColumnEvent event)
           
 void onDeleteRow(DeleteRowEvent event)
           
 void onInsertInternalColumn(InsertInternalColumnEvent<T> event)
           
 void onInsertRow(InsertRowEvent event)
           
 void onMoveColumns(MoveColumnsEvent event)
           
 void onPasteRows(PasteRowsEvent event)
           
 void onSetColumnVisibility(SetColumnVisibilityEvent event)
           
 void onSetInternalModel(SetInternalModelEvent<M,T> event)
           
 void onSortData(SortDataEvent event)
           
 void onToggleMerging(ToggleMergingEvent event)
           
 void onUpdateColumnData(UpdateColumnDataEvent event)
           
 void onUpdateColumnDefinition(UpdateColumnDefinitionEvent event)
           
 void onUpdateSelectedCells(UpdateSelectedCellsEvent event)
           
 void setColumns(List<DynamicColumn<T>> columns)
           
 void setData(DynamicData data)
           
 
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, resolvePotentialElement, 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
 

Field Detail

selections

protected TreeSet<CellValue<? extends Comparable<?>>> selections

table

protected com.google.gwt.dom.client.TableElement table

tbody

protected com.google.gwt.dom.client.TableSectionElement tbody

resources

protected ResourcesProvider<T> resources

eventBus

protected com.google.gwt.event.shared.EventBus eventBus

selectorGroupedCellsHtml

protected String selectorGroupedCellsHtml

selectorUngroupedCellsHtml

protected String selectorUngroupedCellsHtml

columns

protected List<DynamicColumn<T>> columns

data

protected DynamicData data

rowMapper

protected RowMapper rowMapper

cellFactory

protected AbstractCellFactory<T> cellFactory

cellValueFactory

protected AbstractCellValueFactory<T,?> cellValueFactory

dropDownManager

protected CellTableDropDownDataValueMapProvider dropDownManager

rangeOriginCell

protected CellValue<?> rangeOriginCell

rangeExtentCell

protected CellValue<?> rangeExtentCell

rangeDirection

protected AbstractMergableGridWidget.MOVE_DIRECTION rangeDirection

bDragOperationPrimed

protected boolean bDragOperationPrimed

ROW_GROUPING_EVENT

protected static final RowGroupingChangeEvent ROW_GROUPING_EVENT

isReadOnly

protected final boolean isReadOnly
Constructor Detail

AbstractMergableGridWidget

public AbstractMergableGridWidget(ResourcesProvider<T> resources,
                                  AbstractCellFactory<T> cellFactory,
                                  AbstractCellValueFactory<T,?> cellValueFactory,
                                  CellTableDropDownDataValueMapProvider dropDownManager,
                                  boolean isReadOnly,
                                  com.google.gwt.event.shared.EventBus eventBus)
A grid of cells.

Method Detail

clearSelection

protected void clearSelection()

isGroupWidgetClicked

protected boolean isGroupWidgetClicked(com.google.gwt.user.client.Event event,
                                       com.google.gwt.dom.client.Element target)

setData

public void setData(DynamicData data)

setColumns

public void setColumns(List<DynamicColumn<T>> columns)

onToggleMerging

public void onToggleMerging(ToggleMergingEvent event)
Specified by:
onToggleMerging in interface ToggleMergingEvent.Handler

onDeleteRow

public void onDeleteRow(DeleteRowEvent event)
Specified by:
onDeleteRow in interface DeleteRowEvent.Handler

onInsertRow

public void onInsertRow(InsertRowEvent event)
Specified by:
onInsertRow in interface InsertRowEvent.Handler

onAppendRow

public void onAppendRow(AppendRowEvent event)
Specified by:
onAppendRow in interface AppendRowEvent.Handler

onCopyRows

public void onCopyRows(CopyRowsEvent event)
Specified by:
onCopyRows in interface CopyRowsEvent.Handler

onPasteRows

public void onPasteRows(PasteRowsEvent event)
Specified by:
onPasteRows in interface PasteRowsEvent.Handler

onDeleteColumn

public void onDeleteColumn(DeleteColumnEvent event)
Specified by:
onDeleteColumn in interface DeleteColumnEvent.Handler

onInsertInternalColumn

public void onInsertInternalColumn(InsertInternalColumnEvent<T> event)
Specified by:
onInsertInternalColumn in interface InsertInternalColumnEvent.Handler<T>

onSetInternalModel

public void onSetInternalModel(SetInternalModelEvent<M,T> event)
Specified by:
onSetInternalModel in interface SetInternalModelEvent.Handler<M,T>

onSetColumnVisibility

public void onSetColumnVisibility(SetColumnVisibilityEvent event)
Specified by:
onSetColumnVisibility in interface SetColumnVisibilityEvent.Handler

onUpdateColumnData

public void onUpdateColumnData(UpdateColumnDataEvent event)
Specified by:
onUpdateColumnData in interface UpdateColumnDataEvent.Handler

onUpdateColumnDefinition

public void onUpdateColumnDefinition(UpdateColumnDefinitionEvent event)
Specified by:
onUpdateColumnDefinition in interface UpdateColumnDefinitionEvent.Handler

onColumnResize

public void onColumnResize(ColumnResizeEvent event)
Specified by:
onColumnResize in interface ColumnResizeEvent.Handler

onMoveColumns

public void onMoveColumns(MoveColumnsEvent event)
Specified by:
onMoveColumns in interface MoveColumnsEvent.Handler

onSortData

public void onSortData(SortDataEvent event)
Specified by:
onSortData in interface SortDataEvent.Handler

onUpdateSelectedCells

public void onUpdateSelectedCells(UpdateSelectedCellsEvent event)
Specified by:
onUpdateSelectedCells in interface UpdateSelectedCellsEvent.Handler

onCellStateChanged

public void onCellStateChanged(CellStateChangedEvent event)
Specified by:
onCellStateChanged in interface CellStateChangedEvent.Handler


Copyright © 2001-2014 JBoss by Red Hat. All Rights Reserved.