本文整理匯總了Java中com.vaadin.ui.TextField.getValue方法的典型用法代碼示例。如果您正苦於以下問題:Java TextField.getValue方法的具體用法?Java TextField.getValue怎麽用?Java TextField.getValue使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類com.vaadin.ui.TextField
的用法示例。
在下文中一共展示了TextField.getValue方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: updateServerControls
import com.vaadin.ui.TextField; //導入方法依賴的package包/類
private void updateServerControls() {
int nStripes = serverGrid.getRows() - 1;
int nServersPerStripe = serverGrid.getColumns() - 1;
serverControls.removeAllComponents();
serverControls.setRows(nStripes * nServersPerStripe);
serverControls.setColumns(5);
for (int i = consoles.getComponentCount() - 1; i > 0; i--) {
consoles.removeTab(consoles.getTab(i));
}
for (int stripeId = 1; stripeId < serverGrid.getRows(); stripeId++) {
String stripeName = "stripe-" + stripeId;
for (int serverId = 1; serverId < serverGrid.getColumns(); serverId++) {
FormLayout form = (FormLayout) serverGrid.getComponent(serverId, stripeId);
if (form != null) {
TextField serverNameTF = (TextField) form.getComponent(0);
String serverName = serverNameTF.getValue();
serverControls.addComponent(new Label(serverName));
Button startBT = new Button();
startBT.setCaption("START");
startBT.setData(serverName);
startBT.setStyleName("align-top");
serverControls.addComponent(startBT);
Button stopBT = new Button();
stopBT.setEnabled(false);
stopBT.setCaption("STOP");
stopBT.setStyleName("align-top");
stopBT.setData(serverName);
serverControls.addComponent(stopBT);
Label pid = new Label();
serverControls.addComponent(pid);
Label state = new Label();
serverControls.addComponent(state);
addConsole(serverName, stripeName + "-" + serverName);
startBT.addClickListener((Button.ClickListener) event -> {
startServer(stripeName, (String) event.getButton().getData(), startBT, stopBT, state, pid);
});
stopBT.addClickListener((Button.ClickListener) event -> {
stopServer(stripeName, (String) event.getButton().getData(), stopBT);
});
}
}
}
}