keyNav.bind(null);
} else {
ensureInternalKeyNav().bind(editableGrid);
}
if (editableGrid != null) {
GroupingHandlerRegistration reg = new GroupingHandlerRegistration();
reg.add(editableGrid.addDomHandler(ensureInternHandler(), ClickEvent.getType()));
reg.add(editableGrid.addDomHandler(ensureInternHandler(), MouseDownEvent.getType()));
reg.add(editableGrid.addDomHandler(ensureInternHandler(), MouseUpEvent.getType()));
reg.add(editableGrid.addDomHandler(ensureInternHandler(), DoubleClickEvent.getType()));
reg.add(editableGrid.addDomHandler(ensureInternHandler(), ScrollEvent.getType()));
reg.add(editableGrid.addHandler(ensureInternHandler(), HeaderMouseDownEvent.getType()));
reg.add(editableGrid.addHandler(ensureInternHandler(), ReconfigureEvent.getType()));
reg.add(editableGrid.getColumnModel().addColumnWidthChangeHandler(ensureInternHandler()));
if (editableGrid instanceof HasExpandItemHandlers) {
@SuppressWarnings({"rawtypes", "unchecked"})
HasBeforeExpandItemHandlers<M> hasHandlers = (HasBeforeExpandItemHandlers) editableGrid;
reg.add(hasHandlers.addBeforeExpandHandler(ensureInternHandler()));
}
if (editableGrid instanceof HasCollapseItemHandlers) {
@SuppressWarnings({"rawtypes", "unchecked"})
HasBeforeCollapseItemHandlers<M> hasHandlers = (HasBeforeCollapseItemHandlers) editableGrid;
reg.add(hasHandlers.addBeforeCollapseHandler(ensureInternHandler()));
}
groupRegistration = reg;
}
}