當前位置: 首頁>>代碼示例>>Java>>正文


Java Button.ClickEvent方法代碼示例

本文整理匯總了Java中com.vaadin.ui.Button.ClickEvent方法的典型用法代碼示例。如果您正苦於以下問題:Java Button.ClickEvent方法的具體用法?Java Button.ClickEvent怎麽用?Java Button.ClickEvent使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在com.vaadin.ui.Button的用法示例。


在下文中一共展示了Button.ClickEvent方法的3個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: buttonClick

import com.vaadin.ui.Button; //導入方法依賴的package包/類
@Override
public void buttonClick(Button.ClickEvent event) {
    final CertificateBasicInfoModel certificateModel = (CertificateBasicInfoModel) event.getButton().getData();
    if (certificateModel.isConnected()) {
        SslConfigurationLayout.this.deleteWindow = WindowUtil.createAlertWindow(
                getString(MAINTENANCE_SSLCONFIGURATION_FORCE_REMOVE_DIALOG_TITLE),
                getString(MAINTENANCE_SSLCONFIGURATION_FORCE_REMOVE_DIALOG_CONTENT, certificateModel.getAlias()));
    } else {
        SslConfigurationLayout.this.deleteWindow = WindowUtil.createAlertWindow(
                getString(MAINTENANCE_SSLCONFIGURATION_REMOVE_DIALOG_TITLE),
                getString(MAINTENANCE_SSLCONFIGURATION_REMOVE_DIALOG_CONTENT, certificateModel.getAlias()));
    }
    SslConfigurationLayout.this.deleteWindow.getComponentModel().getOkButton().setData(certificateModel.getAlias());
    SslConfigurationLayout.this.deleteWindow.getComponentModel().setOkClickedListener(SslConfigurationLayout.this.acceptRemoveButtonListener);
    ViewUtil.addWindow(SslConfigurationLayout.this.deleteWindow);
}
 
開發者ID:opensecuritycontroller,項目名稱:osc-core,代碼行數:17,代碼來源:SslConfigurationLayout.java

示例2: executeClusterToolCommand

import com.vaadin.ui.Button; //導入方法依賴的package包/類
private void executeClusterToolCommand(Button.ClickEvent event) {
  String command = (String) event.getButton().getData();
  File workDir = new File(settings.getKitPath());
  LinkedBlockingQueue<String> consoleLines = new LinkedBlockingQueue<>(); // no limit, get all the output
  String script = new File(workDir, "tools/cluster-tool/bin/cluster-tool." + (ProcUtils.isWindows() ? "bat" : "sh")).getAbsolutePath();
  String configs = tcConfigLocationPerStripe.values()
      .stream()
      .sorted() // keep ordering so that stripe idx does not change
      .map(File::getAbsolutePath).collect(Collectors.joining(" "));
  List<String> hostPortList = getHostPortList();

  switch (command) {

    case "configure":
    case "reconfigure": {
      if (settings.getLicensePath() == null) {
        Notification.show("ERROR", "Please set a license file location!", Notification.Type.ERROR_MESSAGE);
        return;
      }
      ProcUtils.run(
          workDir,
          script + " " + command + "  -n " + clusterNameTF.getValue() + " -l " + settings.getLicensePath() + " " + configs,
          consoleLines,
          newLine -> {
          },
          () -> access(() -> {
            updateMainConsole(consoleLines);
            consoles.setSelectedTab(mainConsole);
          }));
      break;
    }

    case "dump":
    case "backup":
    case "stop": {
      ProcUtils.run(
          workDir,
          script + " " + command + " -n " + clusterNameTF.getValue() + " " + hostPortList.get(0),
          consoleLines,
          newLine -> access(() -> updateMainConsole(consoleLines)),
          () -> access(() -> consoles.setSelectedTab(mainConsole)));
      break;
    }

  }

  consoles.setSelectedTab(mainConsole);
  updateMainConsole(consoleLines);
}
 
開發者ID:Terracotta-OSS,項目名稱:tinypounder,代碼行數:50,代碼來源:TinyPounderMainUI.java

示例3: loginButtonClick

import com.vaadin.ui.Button; //導入方法依賴的package包/類
public void loginButtonClick(Button.ClickEvent e) {
    //authorize/authenticate user
    //tell spring that my user is authenticated and dispatch to my mainUI
    iSecurity.autoLogin(user.getValue(), password.getValue());
}
 
開發者ID:kuylim,項目名稱:spring-boot-security-vaadin,代碼行數:6,代碼來源:LoginUI.java


注:本文中的com.vaadin.ui.Button.ClickEvent方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。