当前位置: 首页>>代码示例>>Java>>正文


Java UiHandler类代码示例

本文整理汇总了Java中com.google.gwt.uibinder.client.UiHandler的典型用法代码示例。如果您正苦于以下问题:Java UiHandler类的具体用法?Java UiHandler怎么用?Java UiHandler使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


UiHandler类属于com.google.gwt.uibinder.client包,在下文中一共展示了UiHandler类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: onButtonClick

import com.google.gwt.uibinder.client.UiHandler; //导入依赖的package包/类
@UiHandler("refreshButton")
public void onButtonClick(final ClickEvent event) {
	// Event handling in GWT UiBinder
	logger.info("Click Detected by GWT UiBinder");

	// Both buttons disable
	refreshButton.setEnabled(false);
	filterButton.setEnabled(false);

	List<Option> items = foodMultipleSelect.getSelectedItems();

	if (items.size() != 0 && items.get(0).getValue().equalsIgnoreCase("Mustard")) {
		logger.info("We have mustard...");
		filterButton.setText("Mustard");
	}

	boolean result = runTimerRefreshButton();

	if (result == false) {
		filterButton.setEnabled(false);
	}

	logger.info("Result runTimerRefreshButton: " + result);
}
 
开发者ID:interseroh,项目名称:demo-gwt-springboot,代码行数:25,代码来源:PersonPanelView.java

示例2: onClick

import com.google.gwt.uibinder.client.UiHandler; //导入依赖的package包/类
@UiHandler("submit")
void onClick(ClickEvent e) {
  if (date.getValue().isEmpty()) {
    date.setInvalid(date.getValue().isEmpty());
    return;
  }

  if (title.validate() && descr.validate()) {
    Todo todo = new Todo();
    todo.date = date.getValue();
    todo.title = title.getValue();
    todo.description = descr.getValue();
    Polymer.apply(grid.getElement(), "push", "items", todo);
    form.reset();
  }
}
 
开发者ID:manolo,项目名称:gwt-pwa-archetype,代码行数:17,代码来源:View3.java

示例3: handleMouseMove

import com.google.gwt.uibinder.client.UiHandler; //导入依赖的package包/类
@UiHandler("self")
void handleMouseMove(MouseMoveEvent e) {
  Element top = self.getElement();    
  Element target;
  target = e.getNativeEvent().getEventTarget().cast();
  while (!top.equals(target)) {
    if (DigestDomImpl.KIND_DIGEST.equals(target.getAttribute(BuilderHelper.KIND_ATTRIBUTE)) ) {
      handleTouch(byId.get(target.getAttribute(DigestDomImpl.DIGEST_ID_ATTRIBUTE)) );
      return;
    }
    target = target.getParentElement();
    if (target == null) {
      break;
    }
  }    
  handleTouch(null);    
}
 
开发者ID:jorkey,项目名称:Wiab.pro,代码行数:18,代码来源:SearchPanelWidget.java

示例4: handleClick

import com.google.gwt.uibinder.client.UiHandler; //导入依赖的package包/类
@UiHandler("self")
void handleClick(ClickEvent e) {
  final Element top = getElement();
  Element target;
  target = e.getNativeEvent().getEventTarget().cast();
  while (!top.equals(target)) {
    if (REFRESH_ATTRIBUTE_VAL.equals(target.getAttribute(REFRESH_ATTRIBUTE))) {
      listener.refresh();
      e.stopPropagation();
      return;
    }
    target = target.getParentElement();
    if (target == null) {
      break;
    }
  }
}
 
开发者ID:jorkey,项目名称:Wiab.pro,代码行数:18,代码来源:UpdateIndicatorWidget.java

示例5: onPermButtonClick

import com.google.gwt.uibinder.client.UiHandler; //导入依赖的package包/类
@UiHandler("permbutton")
void onPermButtonClick(ClickEvent event) {
  permissiondialog.show();
  
  userlist.setVisible(true);
  permlist.setVisible(true);
  
  if (userlist.getItemCount() == 1)
    setUserList();
  if (permlist.getItemCount() == 1)
    setPermissionList();
  
  initAgents();
  initMaterial();
  
  setBrowsePermissionHeader();
  
  Window.scrollTo(0, 0);
}
 
开发者ID:KnowledgeCaptureAndDiscovery,项目名称:ontosoft,代码行数:20,代码来源:PublishView.java

示例6: onFitToPageClicked

import com.google.gwt.uibinder.client.UiHandler; //导入依赖的package包/类
@UiHandler("fitToPage")
public void onFitToPageClicked(final ClickEvent event) {
	removeOverlays();
	if (!fitToPageImage) {
		final int viewPortHeight = getViewPortHeight();
		final int viewPortWidth = getViewPortWidth();
		heightBeforeFitToHeight = pageImage.getHeight();
		widthBeforeFitToWidth = pageImage.getWidth();
		double imageWidth = 0;
		double imageHeight = getViewPortHeight();
		float count = 53.0f;
		while (imageHeight > viewPortHeight * 72 / 100) {
			imageWidth = viewPortWidth * count / 100;
			imageHeight = pageImage.getHeight() * imageWidth / pageImage.getWidth();
			count -= 0.1f;
		}
		pageImage.setWidth(Double.toString(imageWidth));
		pageImage.setHeight(Double.toString(imageHeight));
		fitToPageImage = Boolean.TRUE;
	} else {
		fitToPageImage = Boolean.FALSE;
		pageImage.setHeight(heightBeforeFitToHeight.toString());
		pageImage.setWidth(widthBeforeFitToWidth.toString());
	}
}
 
开发者ID:kuzavas,项目名称:ephesoft,代码行数:26,代码来源:ImageOverlayPanel.java

示例7: onDeleteDocumentButtonClicked

import com.google.gwt.uibinder.client.UiHandler; //导入依赖的package包/类
/**
 * To perform operations on Delete Document button clicked.
 * 
 * @param clickEvent ClickEvent
 */
@UiHandler("deleteDocumentButton")
public void onDeleteDocumentButtonClicked(ClickEvent clickEvent) {
	final String rowIndex = docTypeListView.listView.getSelectedRowIndex();
	int rowCount = docTypeListView.listView.getTableRecordCount();
	if (rowIndex == null || rowIndex.isEmpty()) {
		if (rowCount == 0) {
			ConfirmationDialogUtil.showConfirmationDialog(LocaleDictionary.get().getMessageValue(
					BatchClassManagementMessages.NO_RECORD_TO_DELETE), LocaleDictionary.get().getConstantValue(
					BatchClassManagementConstants.DELETE_DOCUMENT_TITLE), Boolean.TRUE);
		} else {
			ConfirmationDialogUtil.showConfirmationDialog(LocaleDictionary.get().getMessageValue(
					BatchClassManagementMessages.NONE_SELECTED_WARNING), LocaleDictionary.get().getConstantValue(
					BatchClassManagementConstants.DELETE_DOCUMENT_TITLE), Boolean.TRUE);
		}
		return;
	}
	final ConfirmationDialog confirmationDialog = ConfirmationDialogUtil.showConfirmationDialog(LocaleDictionary.get()
			.getMessageValue(BatchClassManagementMessages.DELETE_DOCUMENT_TYPE_CONFORMATION), LocaleDictionary.get()
			.getConstantValue(BatchClassManagementConstants.DELETE_DOCUMENT_TITLE), Boolean.FALSE);

	confirmationDialog.addDialogListener(new DialogListener() {

		@Override
		public void onOkClick() {
			confirmationDialog.hide();
			presenter.onDeleteDocumentButtonClicked(rowIndex);
		}

		@Override
		public void onCancelClick() {
			confirmationDialog.hide();
		}
	});

}
 
开发者ID:kuzavas,项目名称:ephesoft,代码行数:41,代码来源:BatchClassView.java

示例8: onSearchKeyUp

import com.google.gwt.uibinder.client.UiHandler; //导入依赖的package包/类
@UiHandler("searchTextBox")
public void onSearchKeyUp(KeyUpEvent event) {
    if (event.getNativeKeyCode() == KeyCodes.KEY_BACKSPACE) {
        startTimer();
    } else if (event.getNativeKeyCode() == KeyCodes.KEY_ENTER) {
        showExplanationOfFirstItem(true);
    }
}
 
开发者ID:YoungDigitalPlanet,项目名称:empiria.player,代码行数:9,代码来源:MenuView.java

示例9: titleKeyDownHandler

import com.google.gwt.uibinder.client.UiHandler; //导入依赖的package包/类
@UiHandler("titleTextBox")
public void titleKeyDownHandler(KeyDownEvent event) {
    if (event.getNativeKeyCode() == KeyCodes.KEY_ENTER) {
        presenter.applyBookmark();
    } else if (event.getNativeKeyCode() == KeyCodes.KEY_ESCAPE) {
        presenter.discardChanges();
    }
}
 
开发者ID:YoungDigitalPlanet,项目名称:empiria.player,代码行数:9,代码来源:BookmarkPopupContents.java

示例10: contentTextKeyPressHandler

import com.google.gwt.uibinder.client.UiHandler; //导入依赖的package包/类
@UiHandler("contentText")
public void contentTextKeyPressHandler(KeyPressEvent event) {
    if (takeOverKeyInput) {
        if (firstFocusDone) {
            contentText.setText(contentText.getText() + event.getCharCode());
            event.preventDefault();
            takeOverKeyInput = false;
            firstKeyInputAfterClick = false;
        } else {
            firstFocusDone = true;
        }
    }
}
 
开发者ID:YoungDigitalPlanet,项目名称:empiria.player,代码行数:14,代码来源:StickieView.java

示例11: onInfo

import com.google.gwt.uibinder.client.UiHandler; //导入依赖的package包/类
@UiHandler("iconInfo")
void onInfo(ClickEvent e) {
    if(toggle){
        // show the right nav
        mainHeader.setRight(334);
        mainPanel.setGrid("l9 m9 s12");
        rightPanel.setRight(0);
        toggle = false;
    }else{
        hidePanel();
    }
}
 
开发者ID:GwtMaterialDesign,项目名称:gwt-material-patterns,代码行数:13,代码来源:GoogleDriveView.java

示例12: handleClick

import com.google.gwt.uibinder.client.UiHandler; //导入依赖的package包/类
@UiHandler("self")
void handleClick(ClickEvent e) {
  Element target = e.getNativeEvent().getEventTarget().cast();
  if (play.equals(target)) {
    if (active) {
      setActive(false);
      play.setInnerText("Resume");
    } else {
      setActive(true);
      play.setInnerText("Pause");
    }
  } else if (clear.equals(target)) {
    entries.setInnerHTML("");
  }
}
 
开发者ID:ArloJamesBarnes,项目名称:walkaround,代码行数:16,代码来源:LogPanel.java

示例13: handleSubmit

import com.google.gwt.uibinder.client.UiHandler; //导入依赖的package包/类
@UiHandler("submit")
void handleSubmit(ClickEvent e) {
  Preconditions.checkState(stage == Stage.HAVE_TOKEN);
  // The browser's default action can not be relied upon to submit the form,
  // because this handler is removing the form from the DOM, so a manual
  // submit is required (before hiding the popup).
  e.stopPropagation();
  form.submit();
  popup.hide();
  stage = Stage.UPLOADING_FILE;
  log.log(Level.INFO, "posting file");
  if (listener != null) {
    listener.onUploadStarted(fixFilename(file.getFilename()));
  }
}
 
开发者ID:ArloJamesBarnes,项目名称:walkaround,代码行数:16,代码来源:UploadFormPopup.java

示例14: onSearch

import com.google.gwt.uibinder.client.UiHandler; //导入依赖的package包/类
@UiHandler("searchBtn")
void onSearch(ClickEvent e){

    if (advSearchTextBox.getText().equalsIgnoreCase("")){
        advSearchTextBox.setText(" ");
    }

    DateTimeFormat fmt = DateTimeFormat.getFormat("/yyyy/M/d");

    String endDate = null;
    String startDate = null;

    if (searchdpStart.getDate() != null) {
        startDate = fmt.format(searchdpStart.getDate());
    }

    if (searchdpEnd.getDate() != null) {
        endDate = fmt.format(searchdpEnd.getDate());
    }

    String account = searchAccountPicker.getSelectedItemText();
    int searchType = Integer.valueOf(searchTypePicker.getSelectedValue());
    String searchTerm = advSearchTextBox.getText();

    int media = (mediaOnly.getValue() ? 1 : 0);

    SearchEvent searchEvent = new SearchEvent(searchTerm, searchType, account, media, startDate, endDate);

    this.clientFactory.getEventBus().fireEvent(searchEvent);
    advSearch.closeModal();

}
 
开发者ID:WSDOT,项目名称:social-analytics,代码行数:33,代码来源:AdvSearchView.java

示例15: onMore

import com.google.gwt.uibinder.client.UiHandler; //导入依赖的package包/类
@UiHandler("moreSearchBtn")
public void onMore(ClickEvent e){

    int nextPage = pageNum + 1;

    searchLoader.setVisible(true);

    JsonpRequestBuilder jsonp = new JsonpRequestBuilder();
    // Set timeout for 30 seconds (30000 milliseconds)
    jsonp.setTimeout(30000);
    jsonp.requestObject(url + nextPage, new AsyncCallback<Mention>() {

        @Override
        public void onFailure(Throwable caught) {
            Window.alert("Failure: " + caught.getMessage());
            searchLoader.setVisible(false);
        }

        @Override
        public void onSuccess(Mention mention) {
            if (mention.getMentions() != null) {
                pageNum++;
                updateSearch(mention.getMentions());
                searchLoader.setVisible(false);
            }
        }
    });
}
 
开发者ID:WSDOT,项目名称:social-analytics,代码行数:29,代码来源:SearchView.java


注:本文中的com.google.gwt.uibinder.client.UiHandler类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。