Java Code Examples for com.google.gwt.event.logical.shared.ValueChangeEvent#getValue()

The following examples show how to use com.google.gwt.event.logical.shared.ValueChangeEvent#getValue() . These examples are extracted from open source projects. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
@UiHandler("cbCategories")
void onCategories(ValueChangeEvent<Boolean> e) {
    if(e.getValue()) {
        GWT.log("Categories checked");

        table.setUseCategories(true);
        table.clearRowsAndCategories(true);
        loadCategories();
    } else {
        GWT.log("Categories not checked");

        table.setUseCategories(false);
        table.getView().setRedraw(true);
        table.getView().refresh();
    }
}
 
Example 2
Source Project: gwt-material-demo   File: CheckBoxView.java    License: Apache License 2.0 6 votes vote down vote up
@UiHandler("cbBoxAll")
void onCheckAll(ValueChangeEvent<Boolean> e) {
    if(e.getValue()) {
        cbBlue.setValue(true);
        cbRed.setValue(true);
        cbCyan.setValue(true);
        cbGreen.setValue(true);
        cbBrown.setValue(true);
    } else {
        cbBlue.setValue(false);
        cbRed.setValue(false);
        cbCyan.setValue(false);
        cbGreen.setValue(false);
        cbBrown.setValue(false);
    }
}
 
Example 3
Source Project: core   File: Header.java    License: GNU Lesser General Public License v2.1 6 votes vote down vote up
@Override
public void onValueChange(ValueChangeEvent<String> event) {
    String historyToken = event.getValue();
    if(historyToken.equals(currentHighlightedSection))
        return;
    else
        currentHighlightedSection = historyToken;

    if(historyToken.indexOf("/")!=-1)
    {
        highlight(historyToken.substring(0, historyToken.indexOf("/")));
    }
    else
    {
        highlight(historyToken);
    }
}
 
Example 4
Source Project: EasyML   File: AppController.java    License: Apache License 2.0 5 votes vote down vote up
@Override
public void onValueChange(ValueChangeEvent<String> event) {
	final String token = event.getValue();
	logger.info("value change:" + token);

	loginController.go(token);
}
 
Example 5
private ValueChangeHandler<Boolean> getMultiDeletionHandler() {
	return new ValueChangeHandler<Boolean>() {
		@Override
		public void onValueChange(ValueChangeEvent<Boolean> event) {

			if (event.getValue()) {
				VectorLayer layer = (VectorLayer) getLayer();

				if (layer.getSelectedFeatures() != null) {
					confirm(Arrays.asList(layer.getSelectedFeatures()));
				}
			}
		}
	};
}
 
Example 6
protected ValueChangeHandler<Boolean> getSelectChangeHandler() {
	return new ValueChangeHandler<Boolean>() {
		@Override
		public void onValueChange(final ValueChangeEvent<Boolean> event) {

			if (event.getValue()) {
				activeControls(controls);
			} else {
				deactiveControls(controls);
			}
		}
	};
}
 
Example 7
@Override
protected ValueChangeHandler<Boolean> getSelectChangeHandler() {
	return new ValueChangeHandler<Boolean>() {
		@Override
		public void onValueChange(final ValueChangeEvent<Boolean> event) {

			if (event.getValue()) {
				confirmSetMaxExtent(event.getValue());
			} else {
				confirmClearMaxExtent(event.getValue());
			}
		}
	};
}
 
Example 8
@UiHandler("cbCategories")
void onCategories(ValueChangeEvent<Boolean> e) {
    if (e.getValue()) {
        table.setUseCategories(true);
    } else {
        table.setUseCategories(false);
    }
    table.getView().setRedraw(true);
    table.getView().refresh();
}
 
Example 9
@UiHandler("cbStickyHeader")
void onStickyHeader(ValueChangeEvent<Boolean> e) {
    if (e.getValue()) {
        table.setUseStickyHeader(true);
    } else {
        table.setUseStickyHeader(false);
    }
    table.getView().setRedraw(true);
    table.getView().refresh();
}
 
Example 10
@UiHandler("cbRowExpansion")
void onRowExpansion(ValueChangeEvent<Boolean> e) {
    if (e.getValue()) {
        table.setUseRowExpansion(true);
    } else {
        table.setUseRowExpansion(false);
    }
    table.getView().setRedraw(true);
    table.getView().refresh();
}
 
Example 11
@UiHandler("cbCategories")
void onCategories(ValueChangeEvent<Boolean> e) {
    if (e.getValue()) {
        table.setUseCategories(true);
    } else {
        table.setUseCategories(false);
    }
    table.getView().setRedraw(true);
    table.getView().refresh();
}
 
Example 12
@UiHandler("cbRowExpansion")
void onRowExpansion(ValueChangeEvent<Boolean> e) {
    if (e.getValue()) {
        table.setUseRowExpansion(true);
    } else {
        table.setUseRowExpansion(false);
    }
    table.getView().setRedraw(true);
    table.getView().refresh();
}
 
Example 13
@UiHandler("withBackground")
void withBackground(ValueChangeEvent<Boolean> e) {
    if (e.getValue()) {
        animator.setBackgroundColor(Color.RED);
    } else {
        animator.setBackgroundColor(Color.WHITE);
    }
}
 
Example 14
@UiHandler("withBorder")
void withBorder(ValueChangeEvent<Boolean> e) {
    if (e.getValue()) {
        animator.setStyleProperty("border", "4px solid");
    } else {
        animator.clearStyleProperty("border");
    }
}
 
Example 15
@UiHandler("withShadow")
void withShadow(ValueChangeEvent<Boolean> e) {
    if (e.getValue()) {
        animator.setShadow(3);
    } else {
        animator.setShadow(0);
    }
}
 
Example 16
Source Project: gwt-material-demo   File: CheckBoxView.java    License: Apache License 2.0 5 votes vote down vote up
@UiHandler("cbBox")
void onCheckBox(ValueChangeEvent<Boolean> e) {
    if(e.getValue()) {
        cbBox.setText("CheckBox 1: true");
    } else {
        cbBox.setText("CheckBox 1: false");
    }
}
 
Example 17
@Override
public void onValueChange(ValueChangeEvent<Boolean> event) {
  getState().myChecked = event.getValue();
  getRpcProxy(CheckBoxRpc.class).setValue(event.getValue());
  getConnection().sendPendingVariableChanges();
}
 
Example 18
@UiHandler("tpValue")
void onTimePickerValue(ValueChangeEvent<Date> e) {
    DateTimeFormat dtf = DateTimeFormat.getFormat("hh:mm a");
    Date time = e.getValue();
    MaterialToast.fireToast("Value : " + dtf.format(time));
}
 
Example 19
@Override
public void onValueChange(ValueChangeEvent<Boolean> event) {
    boolean allDay = event.getValue();
    startTime.setVisible(!allDay);
    endTime.setVisible(!allDay);
}
 
Example 20
@Override
public void onValueChange(ValueChangeEvent<Boolean> event) {
  getState().myChecked = event.getValue();
  getRpcProxy(CheckBoxRpc.class).setValue(event.getValue());
  getConnection().getServerRpcQueue().flush();
}