本文整理汇总了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);
}
示例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);
}
示例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());
}