List of usage examples for com.google.gwt.event.logical.shared ValueChangeEvent getValue
public T getValue()
From source file:gwtquery.plugins.droppable.client.testoptionssample.DraggableOptionsPanel.java
License:Apache License
@UiHandler(value = "handleCheckBox") public void onMultiSelectChange(ValueChangeEvent<Boolean> e) { if (e.getValue()) { getOptions().setHandle("#handle"); } else {/* w ww .j a v a 2s . c om*/ getOptions().setHandle(null); } }
From source file:gwtquery.plugins.droppable.client.testoptionssample.DraggableOptionsPanel.java
License:Apache License
@UiHandler(value = "opacityBox") public void onOpacityChange(ValueChangeEvent<String> e) { String opacityString = e.getValue(); Float opacity;/*from w w w .j av a 2 s .c o m*/ if (opacityString == null || opacityString.length() == 0) { opacity = null; } else { try { opacity = new Float(e.getValue()); } catch (NumberFormatException ex) { Window.alert("Please specify a correct number for opacity"); return; } } if (opacity != null && opacity > 1) { Window.alert("Opacity must be below than 1."); return; } getOptions().setOpacity(opacity); }
From source file:gwtquery.plugins.droppable.client.testoptionssample.DraggableOptionsPanel.java
License:Apache License
@UiHandler(value = "revertDurationTextBox") public void onRevertDurationChange(ValueChangeEvent<String> e) { String revertDuration = e.getValue(); Integer revertDurationInt;//from w w w.j av a 2 s.c o m if (revertDuration == null || revertDuration.length() == 0) { revertDurationInt = null; } else { try { revertDurationInt = new Integer(e.getValue()); } catch (NumberFormatException ex) { Window.alert("Please specify a correct number for the revert duration"); return; } } getOptions().setRevertDuration(revertDurationInt); }
From source file:gwtquery.plugins.droppable.client.testoptionssample.DraggableOptionsPanel.java
License:Apache License
@UiHandler(value = "scrollCheckBox") public void onScrollChange(ValueChangeEvent<Boolean> e) { boolean scroll = e.getValue(); getOptions().setScroll(scroll);//from www .j a va 2s. c om scrollSensivityBox.setEnabled(scroll); scrollSpeedBox.setEnabled(scroll); }
From source file:gwtquery.plugins.droppable.client.testoptionssample.DraggableOptionsPanel.java
License:Apache License
@UiHandler(value = "scrollSensivityBox") public void onScrollSensitivityChange(ValueChangeEvent<String> e) { Integer scrollSensitivity;/*from www .j av a2s . c o m*/ try { scrollSensitivity = new Integer(e.getValue()); } catch (NumberFormatException ex) { Window.alert("Please specify a correct number for scrollSensitivity"); return; } getOptions().setScrollSensitivity(scrollSensitivity); }
From source file:gwtquery.plugins.droppable.client.testoptionssample.DraggableOptionsPanel.java
License:Apache License
@UiHandler(value = "scrollSpeedBox") public void onScrollSpeedChange(ValueChangeEvent<String> e) { Integer scrollSpeed;//from ww w.j a v a 2 s. c om try { scrollSpeed = new Integer(e.getValue()); } catch (NumberFormatException ex) { Window.alert("Please specify a correct number for scrollSpeed"); return; } getOptions().setScrollSpeed(scrollSpeed); }
From source file:gwtquery.plugins.droppable.client.testoptionssample.DroppableOptionsPanel.java
License:Apache License
@UiHandler(value = "greedyCheckBox") public void onGreedyChange(ValueChangeEvent<Boolean> e) { getOptions().setGreedy(e.getValue()); }
From source file:gwtquery.plugins.droppable.client.testoptionssample.DroppableOptionsPanel.java
License:Apache License
@UiHandler(value = "scopeBox") public void onScopeChange(ValueChangeEvent<String> e) { $("#droppable").as(Droppable).changeScope(e.getValue()); }
From source file:ilarkesto.gwt.client.desktop.AGwtNavigator.java
License:Open Source License
@Override public void onValueChange(ValueChangeEvent<String> event) { if (isDisabled()) return;//w w w .ja va 2 s . com String token = event.getValue(); log.info("History token changed:", token); handleToken(token); }
From source file:ilarkesto.gwt.client.desktop.fields.AEditableDateRangeField.java
License:Open Source License
@Override protected IsWidget createEditorWidget() { startBox = new GoonDateBox(new DateBox.DefaultFormat(format)); startBox.getElement().setId(getId() + "_start_textBox"); startBox.getElement().getStyle().setWidth(100, Unit.PX); startBox.setMaxLength(10);/*from ww w . j a v a2 s. c o m*/ startBox.addKeyUpHandler(new EnterKeyUpHandler()); endBox = new GoonDateBox(new DateBox.DefaultFormat(format)); endBox.getElement().setId(getId() + "_end_textBox"); endBox.getElement().getStyle().setWidth(100, Unit.PX); endBox.setMaxLength(10); endBox.addKeyUpHandler(new EnterKeyUpHandler()); DateRange value = getValue(); previousValue = value; if (value != null) { startBox.setValue(value.getStart().formatDayMonthYear()); endBox.setValue(value.getEnd().formatDayMonthYear()); } startBox.addValueChangeHandler(new ValueChangeHandler<java.util.Date>() { @Override public void onValueChange(ValueChangeEvent<java.util.Date> event) { java.util.Date date = event.getValue(); onStartInputChanged(date == null ? null : new Date(date)); updateDaysLabel(); updatePreviousValue(); } }); endBox.addValueChangeHandler(new ValueChangeHandler<java.util.Date>() { @Override public void onValueChange(ValueChangeEvent<java.util.Date> event) { java.util.Date date = event.getValue(); onEndInputChanged(date == null ? null : new Date(date)); updateDaysLabel(); updatePreviousValue(); } }); daysLabel = new Label(); daysLabel.getElement().getStyle().setLineHeight(35, Unit.PX); updateDaysLabel(); Label bis = Widgets.text("bis"); bis.getElement().getStyle().setLineHeight(35, Unit.PX); return Widgets.horizontalFlowPanel(Widgets.defaultSpacing, startBox, bis, endBox, daysLabel); }