当前位置: 首页>>代码示例>>Java>>正文


Java TextField.setStyle方法代码示例

本文整理汇总了Java中javafx.scene.control.TextField.setStyle方法的典型用法代码示例。如果您正苦于以下问题:Java TextField.setStyle方法的具体用法?Java TextField.setStyle怎么用?Java TextField.setStyle使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在javafx.scene.control.TextField的用法示例。


在下文中一共展示了TextField.setStyle方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: HomeTab

import javafx.scene.control.TextField; //导入方法依赖的package包/类
public HomeTab(Button button, Pane pane, TextField connectionStatus, TextArea console) {
    super(button, pane);
    this.connectionStatus = connectionStatus;
    this.console = console;

    // set connection status to red, because no connection exists
    connectionStatus.setText(NOT_CONNECTED);
    connectionStatus.setStyle("-fx-text-inner-color: red;");

    // register this as event listener
    EventExecutor.getInstance().register(this);
}
 
开发者ID:Superioz,项目名称:MooProject,代码行数:13,代码来源:HomeTab.java

示例2: setFieldStyle

import javafx.scene.control.TextField; //导入方法依赖的package包/类
private void setFieldStyle(TextField aTextField, FieldType aType) {
	switch (aType) {
		case READ_ONLY:
			aTextField.setEditable(false);
			aTextField.setStyle(FxStyle.READ_ONLY);
			break;
		case ERRONEOUS:
			aTextField.setEditable(false);
			aTextField.setStyle(FxStyle.READ_ONLY_ERROR);
			break;
		default:
			aTextField.setEditable(true);
			break;
	}
}
 
开发者ID:mikelaud,项目名称:fx-dialogs,代码行数:16,代码来源:FxDialog.java

示例3: getActionPane

import javafx.scene.control.TextField; //导入方法依赖的package包/类
private VBox getActionPane(){
progress= new Text("Office\nEntry Progress");
progress.setTextAlignment(TextAlignment.CENTER);
progress.setFont(Font.font("Times New Roman", 35));
lname= new Label("-Your Name here-");

Image iconf= new Image(Office_Entry.class.getResourceAsStream("/pic/finger.png"));
ImageView ivconf= new ImageView(iconf);
lpic= new Label();
lpic.setGraphic(ivconf);

Image img1= new Image(PersonalReports.class.getResourceAsStream("/pic/cross.png"));
ImageView imagvw= new ImageView(img1);
imagvw.setFitHeight(70);
imagvw.setFitWidth(70);
lnotexist= new Label("",imagvw);
lnotexist.setText("\n\n\n\n\nN/A");
lnotexist.setFont(Font.font("Cooper Black", 15));
lnotexist.setVisible(false);

txtfinger= new TextField();
txtfinger.setEditable(false);
txtfinger.setMaxWidth(160);		
txtfinger.setStyle("-fx-background-radius:10; -fx-background-color:#9CD777;");

txtsearch= new TextField();
initFilter();

Button btnView= new Button("View Records");
Button btnCloseView= new Button("Hide Records");

Button btnadd= new Button("save");
btnadd.setOnAction(e -> {
	setAddAttendance();
});

btnView.setOnAction(e -> {
	timelineDown.play();
});
btnCloseView.setOnAction(e -> {
	timelineUp.play();
});


VBox laywrong= new VBox();
laywrong.getChildren().addAll(lnotexist);
laywrong.setPadding(new Insets(0,0,0,0));
laywrong.setAlignment(Pos.CENTER);

HBox laytest= new HBox(5);
laytest.getChildren().addAll(txtfinger /* btnadd*/);
laytest.setAlignment(Pos.CENTER);

VBox laybtnsearch= new VBox();
laybtnsearch.getChildren().addAll(txtsearch);
laybtnsearch.setAlignment(Pos.CENTER);
laybtnsearch.setPadding(new Insets(20,0,0,0));

HBox laybtn= new HBox(5);
laybtn.getChildren().addAll(btnView, btnCloseView);
laybtn.setAlignment(Pos.CENTER);
VBox lay1= new VBox(10);
lay1.getChildren().addAll(progress, lpic, lname, laytest);
lay1.setAlignment(Pos.CENTER);
VBox layside= new VBox(25);
layside.getChildren().addAll(lay1, laybtn, laybtnsearch, laywrong);
layside.setAlignment(Pos.TOP_CENTER);
layside.setMinWidth(230);
layside.setPadding(new Insets(20,0,10,0));
return layside;
 }
 
开发者ID:mikemacharia39,项目名称:gatepass,代码行数:72,代码来源:Office_Entry.java

示例4: getActionPane

import javafx.scene.control.TextField; //导入方法依赖的package包/类
private VBox getActionPane(){
	progress= new Text("Gate\nEntry Progress");
	progress.setTextAlignment(TextAlignment.CENTER);
	progress.setFont(Font.font("Times New Roman", 35));
	lname= new Label("-Your Name here-");

	Image iconf= new Image(AllAttendance.class.getResourceAsStream("/pic/finger.png"));
	ImageView ivconf= new ImageView(iconf);
	lpic= new Label();
	lpic.setGraphic(ivconf);

	Image img1= new Image(PersonalReports.class.getResourceAsStream("/pic/cross.png"));
	ImageView imagvw= new ImageView(img1);
	imagvw.setFitHeight(70);
	imagvw.setFitWidth(70);
	lnotexist= new Label("",imagvw);
	lnotexist.setText("\n\n\n\n\nN/A");
	lnotexist.setFont(Font.font("Cooper Black", 15));
	lnotexist.setVisible(false);

	txtfinger= new TextField();
	txtfinger.setEditable(false);
	txtfinger.setMaxWidth(160);		
	txtfinger.setStyle("-fx-background-radius:10; -fx-background-color:#9CD777;");

	txtsearch= new TextField();
	initFilter();

	Button btnadd= new Button("save");
	btnadd.setOnAction(e -> {
		setAddAttendance();
	});

	Button btnView= new Button("View Records");
	Button btnCloseView= new Button("Hide Records");

	btnView.setOnAction(e -> {
		timelineDown.play();
	});
	btnCloseView.setOnAction(e -> {
		timelineUp.play();
	});

	VBox laywrong= new VBox();
	laywrong.getChildren().addAll(lnotexist);
	laywrong.setPadding(new Insets(0,0,0,0));
	laywrong.setAlignment(Pos.CENTER);

	HBox laytest= new HBox(5);
	laytest.getChildren().addAll(txtfinger  /* btnadd*/);
	laytest.setAlignment(Pos.CENTER);
	//btnadd was beside txtfinger

	VBox laybtnsearch= new VBox();
	laybtnsearch.getChildren().addAll(txtsearch);
	laybtnsearch.setAlignment(Pos.CENTER);
	laybtnsearch.setPadding(new Insets(20,0,0,0));

	HBox laybtn= new HBox(5);
	laybtn.getChildren().addAll(btnView, btnCloseView);
	laybtn.setAlignment(Pos.CENTER);
	VBox lay1= new VBox(10);
	lay1.getChildren().addAll(progress, lpic, lname, laytest);
	lay1.setAlignment(Pos.CENTER);
	VBox layside= new VBox(25);
	layside.getChildren().addAll(lay1, laybtn, laybtnsearch, laywrong);
	layside.setAlignment(Pos.TOP_CENTER);
	layside.setMinWidth(230);
	layside.setPadding(new Insets(20,0,10,0));
	return layside;
}
 
开发者ID:mikemacharia39,项目名称:gatepass,代码行数:72,代码来源:AllAttendance.java


注:本文中的javafx.scene.control.TextField.setStyle方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。