List of usage examples for com.google.gwt.event.logical.shared ValueChangeEvent getValue
public T getValue()
From source file:com.ephesoft.gxt.admin.client.view.regexbuilder.RegexQuantifierDetailView.java
License:Open Source License
/** * Handles the event when betweenZeroAndOneTimesRadioButton is being checked or unchecked. * /*www . java 2 s .c o m*/ * @param changeEvent {@link ValueChangeEvent} This event is generated when radio button is checked or unchecked. */ @UiHandler(value = "betweenZeroAndOneTimesRadioButton") public void onBetweenZeroAndOneTimesRadioButtonClicked(final ValueChangeEvent<Boolean> changeEvent) { presenter.onBetweenZeroAndOneTimesRadioButtonClicked(changeEvent.getValue()); }
From source file:com.ephesoft.gxt.admin.client.view.regexbuilder.RegexQuantifierDetailView.java
License:Open Source License
/** * Handles the event when anyNoOfTimesRadioButton is being checked or unchecked. * /*from w w w .j a v a 2 s . c om*/ * @param changeEvent {@link ValueChangeEvent} This event is generated when radio button is checked or unchecked. */ @UiHandler(value = "anyNoOfTimesRadioButton") public void onAnyNoOfTimesRadioButtonClicked(final ValueChangeEvent<Boolean> changeEvent) { presenter.onAnyNoOfTimesRadioButtonClicked(changeEvent.getValue()); }
From source file:com.ephesoft.gxt.admin.client.view.regexbuilder.RegexQuantifierDetailView.java
License:Open Source License
/** * Handles the event when oneOrMoreTimesRadioButton is being checked or unchecked. * /*from w w w. ja va2 s .co m*/ * @param changeEvent {@link ValueChangeEvent} This event is generated when radio button is checked or unchecked. */ @UiHandler(value = "oneOrMoreTimesRadioButton") public void onOneOrMoreTimesRadioButtonClicked(final ValueChangeEvent<Boolean> changeEvent) { presenter.onOneOrMoreTimesRadioButtonClicked(changeEvent.getValue()); }
From source file:com.ephesoft.gxt.admin.client.view.tableextractionrule.TableExtractionRuleMenuView.java
License:Open Source License
private void addToggleButtonActionEvents() { testTableExtractionRule.getUpFace()//ww w . jav a 2s .c o m .setText(LocaleDictionary.getConstantValue(BatchClassConstants.TEST_TABLE_EXTRACTION_RULE_LABEL)); testTableExtractionRule.getDownFace() .setText(LocaleDictionary.getConstantValue(BatchClassConstants.LABEL_CLOSE_BUTTON)); testTableExtractionRule.addValueChangeHandler(new ValueChangeHandler<Boolean>() { @Override public void onValueChange(ValueChangeEvent<Boolean> event) { if (event.getValue()) { presenter.showTestTblExtrRuleView(); } else { enableAllOtherMenuItems(true); BatchClassManagementEventBus.fireEvent(new BCMTreeMaskEvent(false)); presenter.closeDialogWindow(); } } }); }
From source file:com.ephesoft.gxt.admin.client.view.tableinfo.TableInfoMenuView.java
License:Open Source License
private void addToggleButtonActionEvents() { testTable.getUpFace().setText(LocaleDictionary.getConstantValue(BatchClassConstants.TEST_TABLE_LABEL)); testTable.getDownFace().setText(LocaleDictionary.getConstantValue(BatchClassConstants.LABEL_CLOSE_BUTTON)); testTable.addValueChangeHandler(new ValueChangeHandler<Boolean>() { @Override/*from w w w . j a v a2s. c om*/ public void onValueChange(ValueChangeEvent<Boolean> event) { if (event.getValue()) { presenter.showTestTableView(); } else { enableAllOtherMenuItems(true); BatchClassManagementEventBus.fireEvent(new BCMTreeMaskEvent(false)); presenter.closeDialogWindow(); } } }); }
From source file:com.ephesoft.gxt.batchinstance.client.view.TroubleshootView.java
License:Open Source License
private void initializeRadioButtons() { downloadRadio.setText(LocaleDictionary.getConstantValue( LocaleDictionary.getConstantValue(BatchInstanceConstants.TROUBLESHOOT_DOWNLOAD_LABEL))); downloadToRadio/* w w w .ja v a 2 s . c o m*/ .setText(LocaleDictionary.getConstantValue(BatchInstanceConstants.TROUBLESHOOT_DOWNLOAD_TO_LABEL)); uploadRadio.setText(LocaleDictionary.getConstantValue(BatchInstanceConstants.TROUBLESHOOT_UPLOAD_TO_LABEL)); downloadRadio.addValueChangeHandler(new ValueChangeHandler<Boolean>() { @Override public void onValueChange(ValueChangeEvent<Boolean> event) { final boolean checked = event.getValue(); if (checked) { downloadPanel.setVisible(true); downloadToPanel.setVisible(false); uploadPanel.setVisible(false); downloadToRadio.setValue(false); uploadRadio.setValue(false); con.setActiveWidget(downloadPanel); // downloadPanel.expand(); // downloadPanel.forceLayout(); } } }); downloadToRadio.addValueChangeHandler(new ValueChangeHandler<Boolean>() { @Override public void onValueChange(ValueChangeEvent<Boolean> event) { final boolean checked = event.getValue(); if (checked) { downloadPanel.setVisible(false); downloadToPanel.setVisible(true); uploadPanel.setVisible(false); downloadRadio.setValue(false); uploadRadio.setValue(false); con.setActiveWidget(downloadToPanel); // downloadToPanel.expand(); // downloadToPanel.forceLayout(); } } }); uploadRadio.addValueChangeHandler(new ValueChangeHandler<Boolean>() { @Override public void onValueChange(ValueChangeEvent<Boolean> event) { final boolean checked = event.getValue(); if (checked) { downloadPanel.setVisible(false); downloadToPanel.setVisible(false); uploadPanel.setVisible(true); downloadRadio.setValue(false); downloadToRadio.setValue(false); con.setActiveWidget(uploadPanel); // uploadPanel.expand(); // uploadPanel.forceLayout(); } } }); downloadRadio.setValue(true); }
From source file:com.ephesoft.gxt.core.client.ui.widget.PagingToolbar.java
License:Open Source License
public PagingToolbar(final int rowsInPage, final Grid<?> bindedGrid) { super(getPageSize(rowsInPage, bindedGrid)); pagingField = new IntegerField(); this.bindedGrid = bindedGrid; resetLabel = new Label(); resetLabel.setTitle(LocaleConstants.RESET); this.insert(resetLabel, 13); this.addStyleName("toolbarTextAlign"); resetLabel.addStyleName("resetImage"); prev.addStyleName("previousToolbarButton"); next.addStyleName("nextToolbarButton"); last.addStyleName("lastToolbarButton"); first.addStyleName("firstToolbarButton"); refresh.addStyleName("refreshToolbarButton"); prev.addStyleName("toolbarButton"); next.addStyleName("toolbarButton"); last.addStyleName("toolbarButton"); first.addStyleName("toolbarButton"); refresh.addStyleName("toolbarButton"); addEnableHandler(first);//from w w w. ja v a 2s.com addEnableHandler(prev); addEnableHandler(last); addEnableHandler(next); pagingField.setText(String.valueOf(pageSize)); pagingField.setValue(pageSize); pagingField.setTitle(LocaleConstants.ACCEPT_VALUES_BETWEEN_10_TO_50); pageSizePrefixLabel = new Label(LocaleConstants.SHOWING); pageSizePrefixLabel.addStyleName("pagingPrefixLabel"); HorizontalPanel pagingPanel = new HorizontalPanel(); pagingPanel.addStyleName("pagingPanel"); pagingPanel.add(pageSizePrefixLabel); pagingPanel.add(pagingField); pageSizeSuffixLabel = new Label(LocaleConstants.RECORDS_PER_PAGE); pagingField.setWidth(30); pagingPanel.add(pageSizeSuffixLabel); this.add(pagingPanel); pagingField.addStyleName("pagingTextBox"); //displayText.setLabel(getMessages().displayMessage(0, 0, 0)); beforePage.setLabel(LocaleConstants.PAGE); pagingField.addValueChangeHandler(new ValueChangeHandler<Integer>() { @Override public void onValueChange(ValueChangeEvent<Integer> event) { Integer changedValue = event.getValue(); if (changedValue != null && changedValue >= 10 && changedValue <= 50) { pageSize = changedValue; String cookieName = getCookieName(bindedGrid); if (!StringUtil.isNullOrEmpty(cookieName)) { CookieUtil.storeCookie(cookieName, String.valueOf(pageSize)); } refresh(); loader.setLimit(pageSize); } else { pagingField.setText(String.valueOf(pageSize)); } } }); pagingField.addBlurHandler(new BlurHandler() { @Override public void onBlur(BlurEvent event) { pagingField.setText(String.valueOf(pageSize)); } }); resetLabel.addClickHandler(new ClickHandler() { @Override public void onClick(ClickEvent event) { PagingToolbar.this.bindedGrid.clearFilter(); } }); resetLabel.addMouseOverHandler(new MouseOverHandler() { @Override public void onMouseOver(MouseOverEvent event) { resetLabel.addStyleName("labelHover"); } }); resetLabel.addMouseOutHandler(new MouseOutHandler() { @Override public void onMouseOut(MouseOutEvent event) { resetLabel.removeStyleName("labelHover"); } }); pageText.addKeyUpHandler(new KeyUpHandler() { @Override public void onKeyUp(KeyUpEvent event) { String text = pageText.getText(); int totalPages = PagingToolbar.this.getTotalPages(); boolean isValid = ValidationUtil.isValidNumericalValue(text, Integer.class); if (isValid) { int value = Integer.parseInt(text); isValid = ValidationUtil.isValueInRange(value, Math.min(1, totalPages), totalPages); } if (isValid) { pageText.removeStyleName("invalidField"); } else { pageText.addStyleName("invalidField"); } } }); setToolTipSize(); setWidgetIDs(); }
From source file:com.ephesoft.gxt.systemconfig.client.view.connectionmanager.ConnectionDetailsView.java
License:Open Source License
public ConnectionDetailsView() { super();/*from ww w . j a v a 2 s . co m*/ initWidget(binder.createAndBindUi(this)); // Sets text and other important properties for all widgets. setWidgetProperties(); // Sets ids for each widget. setWidgetIDs(); // Add value change handlers to widgets where required. addValueChangeHandlers(); // Add value change handlers to widgets where required. addValidators(); connectionType.addValueChangeHandler(new ValueChangeHandler<String>() { @Override public void onValueChange(final ValueChangeEvent<String> event) { final ConnectionType selectedConnectionType = presenter.getConnectionTypeForName(event.getValue()); connectionType.setToolTip(connectionType.getValue()); if (ConnectionType.MSSQL_ALWAYSON.equals(selectedConnectionType)) { domainLabel.setVisible(true); domainTextField.getElement().setVisibility(true); userName.setEnabled(false); password.setEnabled(false); userName.clear(); password.clear(); } else { domainLabel.setVisible(false); domainTextField.getElement().setVisibility(false); userName.setEnabled(true); password.setEnabled(true); } } }); addStyle(); this.passwordValueChangeHandler(); }
From source file:com.ephesoft.gxt.uploadbatch.client.view.UploadBatchButtonPanelView.java
License:Open Source License
/** * Constructor./*from w ww . java 2 s . c o m*/ */ public UploadBatchButtonPanelView() { super(); initWidget(binder.createAndBindUi(this)); batchClassLabel.setText(LocaleDictionary.getConstantValue(UploadBatchConstants.BATCH_CLASS_LABEL)); batchDescriptionLabel.setText(LocaleDictionary.getConstantValue(UploadBatchConstants.DESCRIPTION_LABEL)); batchClassComboBox.setEditable(false); batchDescriptionTextbox.addValueChangeHandler(new ValueChangeHandler<String>() { @Override public void onValueChange(ValueChangeEvent<String> event) { final String value = event.getValue(); if (value.length() >= UploadBatchConstants.BATCH_DESCRIPTION_LENGTH_LIMIT) { final String trimValue = value.substring(0, UploadBatchConstants.BATCH_DESCRIPTION_LENGTH_LIMIT); batchDescriptionTextbox.setValue(trimValue); batchDescriptionTextbox.setTitle(trimValue); } else { batchDescriptionTextbox.setValue(value); batchDescriptionTextbox.setTitle(event.getValue()); } } }); initializeMenuButtons(); intializeSelectionHandlers(); addBatchClassComboBoxValueChangeHandler(); batchClassSortButton.setStyleName(CoreCommonConstants.SET_ICON_FOR_SORTING_CSS); toggleBatchClassSortButtonToolTip(false); batchDescriptionTextbox.addKeyDownHandler(new KeyDownHandler() { @Override public void onKeyDown(KeyDownEvent event) { if (getBatchDescriptionFromTextBox().length() >= 255) { event.getNativeEvent().preventDefault(); } } }); setWidgetIDs(); }
From source file:com.example.jumpnote.web.client.ScreenContainer.java
License:Apache License
public void install(RootPanel rootPanel) { rootPanel.add(this); if ("".equals(History.getToken())) { History.newItem(mDefaultName);//from ww w.j ava2 s .com } History.addValueChangeHandler(new ValueChangeHandler<String>() { public void onValueChange(ValueChangeEvent<String> event) { loadScreen(event.getValue()); } }); History.fireCurrentHistoryState(); }