本文整理汇总了Java中javafx.scene.control.TextField.setAlignment方法的典型用法代码示例。如果您正苦于以下问题:Java TextField.setAlignment方法的具体用法?Java TextField.setAlignment怎么用?Java TextField.setAlignment使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类javafx.scene.control.TextField
的用法示例。
在下文中一共展示了TextField.setAlignment方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: constructContainer
import javafx.scene.control.TextField; //导入方法依赖的package包/类
@Override
public Parent constructContainer()
{
bp.setId("loginviewbg");
AllFields = new VBox(50);
AllFields.setAlignment(Pos.CENTER);
AllFields.setMaxWidth(300);
AllFields.setPadding(new Insets(20));
Identifier = new HBox();
Status = new HBox();
Bottom = new HBox();
inputName = new TextField();
inputName.setPromptText("Names der Door");
inputName.setAlignment(Pos.CENTER_LEFT);
name = new Label("Name:");
status = new Label("Status:");
statusValue = new Label("{Door bereits vorhanden}");
btnCreate = new AppButton("Erstellen");
back = new BackButton(getFXController(),"Abbrechen");
Identifier.getChildren().addAll(name,inputName);
Status.getChildren().addAll(status,statusValue);
Bottom.getChildren().addAll(back,btnCreate);
AllFields.getChildren().addAll(Identifier,Status,Bottom);
bp.setCenter(AllFields);
/*
btnCreate.setOnAction(e -> getFXController().showView("serverdoorview"));
--Listenter to crete a door
*/
return bp;
}
示例2: getKeyspaceField
import javafx.scene.control.TextField; //导入方法依赖的package包/类
private TextField getKeyspaceField(int width) {
TextField keyspace = new TextField();
keyspace.setPromptText(localeService.getMessage("ui.menu.file.connect.keyspace.text"));
keyspace.setAlignment(Pos.TOP_CENTER);
keyspace.setMinWidth(width - 10);
keyspace.setMaxWidth(width - 10);
keyspace.setOnAction(this::handleClick);
return keyspace;
}
示例3: getUrlField
import javafx.scene.control.TextField; //导入方法依赖的package包/类
private TextField getUrlField(int width) {
TextField url = new TextField();
url.setPromptText(localeService.getMessage("ui.menu.file.connect.url.text"));
url.setAlignment(Pos.CENTER);
url.setMinWidth(width - 10);
url.setMaxWidth(width - 10);
return url;
}
示例4: constructContainer
import javafx.scene.control.TextField; //导入方法依赖的package包/类
@Override
public Parent constructContainer()
{
bp.setId("loginviewbg");
AllFields = new HBox(50);
AllFields.setAlignment(Pos.CENTER);
AllFields.setMaxWidth(300);
AllFields.setPadding(new Insets(20));
AllFields.setPadding(new Insets(200,0,0,0));
//AllFields.setMinWidth(740);
Value = new VBox();
Value.setMinWidth(400);
Value.setSpacing(35);
Buttons = new VBox();
Buttons.setSpacing(5);
Name = new HBox();
inputName = new TextField();
inputName.setPromptText("Names der Door");
inputName.setAlignment(Pos.CENTER_LEFT);
inputName.setMinWidth(50);
name = new Label("Name");
removeDoor = new Label("Door l�schen");
removeStacks = new Label("Enfert den/die Stack/s der Door");
titel = new Label("Bearbeiten");
btnRemoveDoor = new AppButton("Entfernen");
btnRemoveStack = new AppButton("L�schen");
btnModify = new AppButton("�ndern");
back = new BackButton(getFXController(),"Abbrechen");
//Buttons.getChildren().addAll(,,btnRemoveStack,back);
Name.getChildren().addAll(name,inputName);
Value.getChildren().addAll(Name,removeDoor,removeStacks);
Buttons.getChildren().addAll(btnModify,btnRemoveStack,btnRemoveDoor,back);
AllFields.getChildren().addAll(Value,Buttons);
/*inside.setLeft(AllFields);
inside.setRight(Buttons);*/
bp.setCenter(AllFields);
/*
btnCreate.setOnAction(e -> getFXController().showView("serverdoorview"));
--Listenter to crete a door
*/
return bp;
}
示例5: constructContainer
import javafx.scene.control.TextField; //导入方法依赖的package包/类
@Override
public Parent constructContainer()
{
bp.setId("loginviewbg");
AllFields = new HBox(50);
AllFields.setAlignment(Pos.CENTER);
AllFields.setMaxWidth(300);
AllFields.setPadding(new Insets(20));
AllFields.setPadding(new Insets(200,0,0,0));
//AllFields.setMinWidth(740);
Value = new VBox();
Value.setMinWidth(400);
Value.setSpacing(35);
Buttons = new VBox();
Buttons.setSpacing(5);
Name = new HBox();
inputName = new TextField();
inputName.setPromptText("Names der Door");
inputName.setAlignment(Pos.CENTER_LEFT);
inputName.setMinWidth(50);
name = new Label("Name");
removeDoor = new Label("Stack l�schen");
titel = new Label("Bearbeiten");
btnRemoveDoor = new AppButton("Entfernen");
btnRemoveStack = new AppButton("Entfernen");
btnModify = new AppButton("�ndern");
back = new BackButton(getFXController(),"Abbrechen");
//Buttons.getChildren().addAll(,,btnRemoveStack,back);
Name.getChildren().addAll(name,inputName);
Value.getChildren().addAll(Name,removeDoor);
Buttons.getChildren().addAll(btnModify,btnRemoveDoor,back);
AllFields.getChildren().addAll(Value,Buttons);
/*inside.setLeft(AllFields);
inside.setRight(Buttons);*/
bp.setCenter(AllFields);
/*
btnCreate.setOnAction(e -> getFXController().showView("serverdoorview"));
--Listenter to crete a door
*/
return bp;
}
示例6: getUsernameField
import javafx.scene.control.TextField; //导入方法依赖的package包/类
private TextField getUsernameField() {
TextField username = new TextField();
username.setPromptText(localeService.getMessage("ui.menu.file.connect.auth.username"));
username.setAlignment(Pos.CENTER);
return username;
}
示例7: getPasswordField
import javafx.scene.control.TextField; //导入方法依赖的package包/类
private TextField getPasswordField() {
TextField username = new TextField();
username.setPromptText(localeService.getMessage("ui.menu.file.connect.auth.password"));
username.setAlignment(Pos.CENTER);
return username;
}