class CustomDualListField<D, T> extends DualListField<D, T> {
public CustomDualListField(ListStore<D> fromStore, ListStore<D> toStore,
ValueProvider<? super D, T> valueProvider, Cell<T> cell) {
super(fromStore, toStore, valueProvider, cell);
}
private boolean enabled = true;
@Override
public void setEnabled(boolean enabled) {
this.enabled = enabled;
setEnableDnd(enabled);
super.setEnabled(enabled);
}
@Override
protected void onAllLeft() {
if (!enabled) {
return;
}
super.onAllLeft();
}
@Override
protected void onAllRight() {
if (!enabled) {
return;
}
super.onAllRight();
}
@Override
protected void onRight() {
if (!enabled) {
return;
}
super.onRight();
}
@Override
protected void onLeft() {
if (!enabled) {
return;
}
super.onLeft();
}
}