Greg Sheremeta has uploaded a new change for review. Change subject: webadmin: delete EnabledDisabledCheckboxCell ......................................................................
webadmin: delete EnabledDisabledCheckboxCell (Patch 4ac of 12) Removed barely used EnabledDisabledCheckboxCell and replaced usage with CheckboxCell. No functional changes -- just a refactor. Change-Id: Ia3a4a6c73e464d442cbca5610d58b284c94a8763 Signed-off-by: Greg Sheremeta <gsher...@redhat.com> --- M frontend/webadmin/modules/gwt-common/src/main/java/org/ovirt/engine/ui/common/widget/table/column/AbstractCheckboxColumn.java D frontend/webadmin/modules/gwt-common/src/main/java/org/ovirt/engine/ui/common/widget/table/column/EnabledDisabledCheckboxCell.java 2 files changed, 4 insertions(+), 49 deletions(-) git pull ssh://gerrit.ovirt.org:29418/ovirt-engine refs/changes/22/38722/1 diff --git a/frontend/webadmin/modules/gwt-common/src/main/java/org/ovirt/engine/ui/common/widget/table/column/AbstractCheckboxColumn.java b/frontend/webadmin/modules/gwt-common/src/main/java/org/ovirt/engine/ui/common/widget/table/column/AbstractCheckboxColumn.java index e9fd3b6..b9750a9 100644 --- a/frontend/webadmin/modules/gwt-common/src/main/java/org/ovirt/engine/ui/common/widget/table/column/AbstractCheckboxColumn.java +++ b/frontend/webadmin/modules/gwt-common/src/main/java/org/ovirt/engine/ui/common/widget/table/column/AbstractCheckboxColumn.java @@ -2,6 +2,7 @@ import java.util.Comparator; +import org.ovirt.engine.ui.common.widget.table.cell.CheckboxCell; import org.ovirt.engine.ui.common.widget.table.cell.RadioboxCell; import com.google.gwt.cell.client.Cell.Context; @@ -25,11 +26,11 @@ private static final SafeHtml TAG_CLOSE = SafeHtmlUtils.fromTrustedString("/>"); //$NON-NLS-1$ public AbstractCheckboxColumn() { - super(new EnabledDisabledCheckboxCell()); + super(new CheckboxCell(true, false)); } public AbstractCheckboxColumn(boolean centered) { - super(new EnabledDisabledCheckboxCell()); + super(new CheckboxCell(true, false)); this.centered = centered; } @@ -39,7 +40,7 @@ } public AbstractCheckboxColumn(boolean multipleSelectionAllowed, FieldUpdater<T, Boolean> fieldUpdater) { - super(multipleSelectionAllowed ? new EnabledDisabledCheckboxCell() : new RadioboxCell(true, false)); + super(multipleSelectionAllowed ? new CheckboxCell(true, false) : new RadioboxCell(true, false)); this.multipleSelectionAllowed = multipleSelectionAllowed; setFieldUpdater(fieldUpdater); } diff --git a/frontend/webadmin/modules/gwt-common/src/main/java/org/ovirt/engine/ui/common/widget/table/column/EnabledDisabledCheckboxCell.java b/frontend/webadmin/modules/gwt-common/src/main/java/org/ovirt/engine/ui/common/widget/table/column/EnabledDisabledCheckboxCell.java deleted file mode 100644 index 1230787..0000000 --- a/frontend/webadmin/modules/gwt-common/src/main/java/org/ovirt/engine/ui/common/widget/table/column/EnabledDisabledCheckboxCell.java +++ /dev/null @@ -1,46 +0,0 @@ -package org.ovirt.engine.ui.common.widget.table.column; - -import org.ovirt.engine.ui.common.idhandler.CellWithElementId; -import org.ovirt.engine.ui.common.widget.table.cell.EventHandlingCell; -import org.ovirt.engine.ui.common.widget.table.cell.EventHandlingCellMixin; -import org.ovirt.engine.ui.uicommonweb.models.EntityModel; - -import com.google.gwt.cell.client.CheckboxCell; -import com.google.gwt.user.client.DOM; -import com.google.gwt.view.client.CellPreviewEvent; - -/** - * Base class for all Cells that would otherwise extend GWT CheckboxCell. - * Supports rendering Element ids via the oVirt Element-ID framework. - */ -public class EnabledDisabledCheckboxCell extends CheckboxCell implements EventHandlingCell, CellWithElementId<Boolean> { - - private String elementIdPrefix = DOM.createUniqueId(); // default - private String columnId; - - public EnabledDisabledCheckboxCell() { - super(true, false); - } - - @Override - public boolean handlesEvent(CellPreviewEvent<EntityModel> event) { - return EventHandlingCellMixin.inputHandlesClick(event); - } - - public void setElementIdPrefix(String elementIdPrefix) { - this.elementIdPrefix = elementIdPrefix; - } - - public void setColumnId(String columnId) { - this.columnId = columnId; - } - - public String getElementIdPrefix() { - return elementIdPrefix; - } - - public String getColumnId() { - return columnId; - } - -} -- To view, visit https://gerrit.ovirt.org/38722 To unsubscribe, visit https://gerrit.ovirt.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ia3a4a6c73e464d442cbca5610d58b284c94a8763 Gerrit-PatchSet: 1 Gerrit-Project: ovirt-engine Gerrit-Branch: master Gerrit-Owner: Greg Sheremeta <gsher...@redhat.com> _______________________________________________ Engine-patches mailing list Engine-patches@ovirt.org http://lists.ovirt.org/mailman/listinfo/engine-patches