本文整理匯總了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());
}