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() . 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
Source File: Header.java    From core with 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 2
Source File: CheckBoxView.java    From gwt-material-demo with 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 File: InfiniteDataTableView.java    From gwt-material-demo with Apache License 2.0 6 votes vote down vote up
@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 4
Source File: DeleteTool.java    From geowe-core with GNU General Public License v3.0 5 votes vote down vote up
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 5
Source File: CheckBoxView.java    From gwt-material-demo with 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 6
Source File: PathAnimatorView.java    From gwt-material-demo with Apache License 2.0 5 votes vote down vote up
@UiHandler("withShadow")
void withShadow(ValueChangeEvent<Boolean> e) {
    if (e.getValue()) {
        animator.setShadow(3);
    } else {
        animator.setShadow(0);
    }
}
 
Example 7
Source File: PathAnimatorView.java    From gwt-material-demo with Apache License 2.0 5 votes vote down vote up
@UiHandler("withBorder")
void withBorder(ValueChangeEvent<Boolean> e) {
    if (e.getValue()) {
        animator.setStyleProperty("border", "4px solid");
    } else {
        animator.clearStyleProperty("border");
    }
}
 
Example 8
Source File: PathAnimatorView.java    From gwt-material-demo with Apache License 2.0 5 votes vote down vote up
@UiHandler("withBackground")
void withBackground(ValueChangeEvent<Boolean> e) {
    if (e.getValue()) {
        animator.setBackgroundColor(Color.RED);
    } else {
        animator.setBackgroundColor(Color.WHITE);
    }
}
 
Example 9
Source File: FrozenDataTableView.java    From gwt-material-demo with Apache License 2.0 5 votes vote down vote up
@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 10
Source File: FrozenDataTableView.java    From gwt-material-demo with Apache License 2.0 5 votes vote down vote up
@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 11
Source File: StandardDataTableView.java    From gwt-material-demo with Apache License 2.0 5 votes vote down vote up
@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 12
Source File: StandardDataTableView.java    From gwt-material-demo with Apache License 2.0 5 votes vote down vote up
@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 13
Source File: StandardDataTableView.java    From gwt-material-demo with Apache License 2.0 5 votes vote down vote up
@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 14
Source File: LockCurrentExtentTool.java    From geowe-core with GNU General Public License v3.0 5 votes vote down vote up
@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 15
Source File: ToggleTool.java    From geowe-core with GNU General Public License v3.0 5 votes vote down vote up
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 16
Source File: AppController.java    From EasyML with 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 17
Source File: GwtRadionButtonImplConnector.java    From consulo with Apache License 2.0 4 votes vote down vote up
@Override
public void onValueChange(ValueChangeEvent<Boolean> event) {
  getState().myChecked = event.getValue();
  getRpcProxy(CheckBoxRpc.class).setValue(event.getValue());
  getConnection().sendPendingVariableChanges();
}
 
Example 18
Source File: TimePickersView.java    From gwt-material-demo with Apache License 2.0 4 votes vote down vote up
@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
Source File: UTCDateTimeRangeController.java    From gwt-traction with Apache License 2.0 4 votes vote down vote up
@Override
public void onValueChange(ValueChangeEvent<Boolean> event) {
    boolean allDay = event.getValue();
    startTime.setVisible(!allDay);
    endTime.setVisible(!allDay);
}
 
Example 20
Source File: GwtCheckBoxImplConnector.java    From consulo with Apache License 2.0 4 votes vote down vote up
@Override
public void onValueChange(ValueChangeEvent<Boolean> event) {
  getState().myChecked = event.getValue();
  getRpcProxy(CheckBoxRpc.class).setValue(event.getValue());
  getConnection().getServerRpcQueue().flush();
}