当前位置: 首页>>代码示例>>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;未经允许,请勿转载。