當前位置: 首頁>>代碼示例>>Java>>正文


Java Label.setId方法代碼示例

本文整理匯總了Java中javafx.scene.control.Label.setId方法的典型用法代碼示例。如果您正苦於以下問題:Java Label.setId方法的具體用法?Java Label.setId怎麽用?Java Label.setId使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在javafx.scene.control.Label的用法示例。


在下文中一共展示了Label.setId方法的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: constructContainer

import javafx.scene.control.Label; //導入方法依賴的package包/類
@Override
public Parent constructContainer ()
{
	headLbl = new Label("Umbenennen");
	headLbl.setId("bold");

	AppButton backBtn = new AppButton("_Zur�ck");
	backBtn.setOnAction(e -> getFXController().showView("doorview"));

	BorderPane headLayout = new BorderPane(headLbl);
	headLayout.setPadding(new Insets(0, 0, 25, 0));

	renameLayout.setPadding(new Insets(10));
	renameLayout.setAlignment(Pos.TOP_CENTER);
	
	scroller.setMaxWidth(600);
	scroller.setFitToWidth(true);
	scroller.setPadding(new Insets(25));

	MainLayout maLay = new MainLayout(scroller, headLayout, new ControlLayout(backBtn));
	getFXController().getModel("stack").registerView(this);
	return maLay;
}
 
開發者ID:CoffeeCodeSwitzerland,項目名稱:Lernkartei_2017,代碼行數:24,代碼來源:RenameView.java

示例2: initComponents

import javafx.scene.control.Label; //導入方法依賴的package包/類
public void initComponents() {
    HBox bulrbTitleBox = createBlurbTitle();
    Label companyLabel = createLabel(versionInfo.getBlurbCompany());
    companyLabel.setId("companyName");
    Label websiteLabel = createLabel(versionInfo.getBlurbWebsite());
    websiteLabel.setId("websiteAddress");
    Label creditsLabel = createLabel(versionInfo.getBlurbCredits());
    creditsLabel.setId("creditsLabel");
    infoBox.setId("infoBox");
    infoBox.setAlignment(Pos.TOP_CENTER);
    infoBox.getChildren().addAll(bulrbTitleBox, companyLabel, websiteLabel, creditsLabel);

    creditsButton.setOnAction((e) -> onCredits());
    okButton.setOnAction((e) -> onOK());

    buttonBar.setId("buttonBar");
    buttonBar.getButtons().addAll(creditsButton, okButton);

}
 
開發者ID:jalian-systems,項目名稱:marathonv5,代碼行數:20,代碼來源:AboutStage.java

示例3: createBrowserField

import javafx.scene.control.Label; //導入方法依賴的package包/類
private HBox createBrowserField() {
    HBox browseFieldBox = new HBox(5);
    dirField = new TextField();
    dirField.setId("DirectoryField");
    dirField.textProperty().addListener((observable, oldValue, newValue) -> updateOKButton());
    HBox.setHgrow(dirField, Priority.ALWAYS);
    Button browseButton = FXUIUtils.createButton("browse", "Browse directory", true, "Browse");
    FileSelectionHandler browserListener;
    String fileType = fileSelectionInfo.getFileType();
    if (fileType != null) {
        browserListener = new FileSelectionHandler(this,
                new ExtensionFilter(fileType, Arrays.asList(fileSelectionInfo.getExtensionFilters())), this, null,
                fileSelectionInfo.getTitle());
    } else {
        browserListener = new FileSelectionHandler(this, null, this, null, fileSelectionInfo.getTitle());
        browserListener.setMode(FileSelectionHandler.DIRECTORY_CHOOSER);
    }
    browserListener.setPreviousDir(new File(System.getProperty(Constants.PROP_PROJECT_DIR, ProjectLayout.projectDir)));
    browseButton.setOnAction(browserListener);
    Label label = createLabel("Name: ");
    label.setMinWidth(Region.USE_PREF_SIZE);
    label.setId("FileSelectedLabel");
    browseFieldBox.getChildren().addAll(label, dirField, browseButton);
    VBox.setMargin(browseFieldBox, new Insets(5, 5, 5, 5));
    return browseFieldBox;
}
 
開發者ID:jalian-systems,項目名稱:marathonv5,代碼行數:27,代碼來源:FileSelectionStage.java

示例4: addFormField

import javafx.scene.control.Label; //導入方法依賴的package包/類
public FormPane addFormField(String text, Node... fields) {
    Label label = new Label(text);
    String labelId = idText(text);
    label.setId(labelId);
    GridPane.setValignment(label, VPos.TOP);
    int column = 0;
    add(label, column++, currentRow, 1, 1);
    int colspan = columns - fields.length;
    int fieldIndex = 1;
    for (Node field : fields) {
        field.setId(labelId + "-field-" + fieldIndex);
        setFormConstraints(field);
        GridPane.setValignment(field, VPos.TOP);
        add(field, column++, currentRow, colspan, 1);
        fieldIndex++;
    }
    currentRow++;
    column = 0;
    return this;
}
 
開發者ID:jalian-systems,項目名稱:marathonv5,代碼行數:21,代碼來源:FormPane.java

示例5: constructContainer

import javafx.scene.control.Label; //導入方法依賴的package包/類
@Override
public Parent constructContainer ()
{
	headLbl = new Label("");
	headLbl.setId("bold");

	BorderPane headLayout = new BorderPane(headLbl);
	headLayout.setPadding(new Insets(25));

	// Zur�ck Button
	backBtn = new AppButton("_Zur�ck");
	backBtn.setOnAction(e -> getFXController().showView("simpleeditorview"));

	// Info Button
	infobtn = new AppButton("Hilfe");
	infobtn.setOnAction(e -> getFXController().showView("bbcodeinfo"));

	// EditLayout
	editLayout.setPadding(new Insets(10));
	editLayout.setAlignment(Pos.TOP_CENTER);

	// Controll Layout
	ControlLayout conLay = new ControlLayout(backBtn, infobtn);

	// Main Layout
	MainLayout maLay = new MainLayout(editLayout, headLayout, conLay);

	return maLay;
}
 
開發者ID:CoffeeCodeSwitzerland,項目名稱:Lernkartei_2017,代碼行數:30,代碼來源:EditorView.java

示例6: setOptions

import javafx.scene.control.Label; //導入方法依賴的package包/類
private void setOptions (String stack)
{
	options.getChildren().clear();

	Label stackTitle = new Label(stack);
	AppButton lernen = new AppButton("Lernen");
	AppButton edit = new AppButton("Bearbeiten");
	// CheckBox switcher = new CheckBox("Seite 2 zuerst");

	stackTitle.setId("bold");
	stackTitle.setWrapText(true);
	lernen.setOnAction(e ->
	{
		getFXController().setViewData("prelearn", stack);
		getFXController().showView("prelearn");
	});
	edit.setOnAction(e ->
	{
		getFXController().setViewData("simpleeditorview", stack);
		getFXController().showView("simpleeditorview");
	});
	
	/*
	 * switcher.setSelected(getFXController().getModel("switcher").doAction(
	 * "check", stack) == 1 ? true : false);
	 * switcher.selectedProperty().addListener(event -> { if
	 * (switcher.isSelected()) {
	 * getFXController().getModel("switcher").doAction("new", stack); } else
	 * { getFXController().getModel("switcher").doAction("delete", stack); }
	 * });
	 */
								//setString �bergibt string und kann durch getString wieder geholt werden
	getFXController().getModel("drucken").setString(stack);
	
	options.getChildren().addAll(stackTitle, lernen, edit, printBtn/* , switcher */);
}
 
開發者ID:CoffeeCodeSwitzerland,項目名稱:Lernkartei_2017,代碼行數:37,代碼來源:StackView_forDesign.java

示例7: info

import javafx.scene.control.Label; //導入方法依賴的package包/類
public Label info(String value) {
	Label l = new Label(value);
	l.setTextFill(Color.web("#FFFFFF"));
	l.setId("oc-info-label");
	l.setWrapText(true);
	l.setTextAlignment(TextAlignment.JUSTIFY);
	return l;
}
 
開發者ID:HearthProject,項目名稱:OneClient,代碼行數:9,代碼來源:ModpackTile.java

示例8: configureBox

import javafx.scene.control.Label; //導入方法依賴的package包/類
@SuppressWarnings("unchecked")
private void configureBox(HBox root) {
	  StackPane container = new StackPane();
	  //container.setPrefHeight(700);
	  container.setPrefSize(boxBounds.getWidth(), boxBounds.getHeight());
	  container.setStyle("-fx-border-width:1px;-fx-border-style:solid;-fx-border-color:#999999;");

	 table= new TableView<OfficeClass>();
	  Label lview= new Label();
	  lview.setText("View Records");
	  lview.setId("lview");
	  bottomPane= new VBox();
	  
	  tclock= new Text(); 
	  tclock.setId("lview");
		//tclock.setFont(Font.font("Calibri", 20));
		final Timeline timeline = new Timeline(new KeyFrame(Duration.seconds(1), new EventHandler<ActionEvent>() {  
		     @Override  
		     public void handle(ActionEvent event) {  
		          tclock.setText(DateFormat.getDateTimeInstance().format(new Date()));
		     }  
		}));  
		timeline.setCycleCount(Animation.INDEFINITE);  
		timeline.play();
	  
	  bottomPane.getChildren().addAll(tclock, lview);
	  bottomPane.setAlignment(Pos.CENTER);
	  
	  nocol= new TableColumn<>("no");
	  nocol.setMinWidth(130);
	  nocol.setCellValueFactory(new PropertyValueFactory<>("no"));
		
	  
	  namecol= new TableColumn<>("First Name");
		namecol.setMinWidth(170);
		namecol.setCellValueFactory(new PropertyValueFactory<>("name"));
		
		admcol= new TableColumn<>("Admission Number");
		admcol.setMinWidth(180);
		admcol.setCellValueFactory(new PropertyValueFactory<>("adm"));
		
		
		timecol= new TableColumn<>("Signin");
		timecol.setMinWidth(140);
		timecol.setCellValueFactory(new PropertyValueFactory<>("timein"));
		
		datecol= new TableColumn<>("Date");
		datecol.setMinWidth(180);
		datecol.setCellValueFactory(new PropertyValueFactory<>("date"));
		
		table.getColumns().addAll(nocol,namecol, admcol, timecol, datecol);
		table.setItems(getAtt());
		att= getAtt();
        table.setItems(FXCollections.observableArrayList(att));
        table.setMinHeight(500);
       
        btnrefresh = new Button("Refresh");
        btnrefresh.setOnAction(new EventHandler<ActionEvent>() {
            public void handle(ActionEvent t) {
            	table.setItems(getAtt());
            }
        });
        laytable= new VBox(10);
        laytable.getChildren().addAll(table, btnrefresh);
        laytable.setAlignment(Pos.TOP_LEFT);
        
        container.getChildren().addAll(bottomPane,laytable);
		setAnimation();
		sc.setContent(container);
		root.setStyle("-fx-background-color: linear-gradient(#E4EAA2, #9CD672)");
		root.getChildren().addAll(getActionPane(),sc);
		
		//service.start();
	 }
 
開發者ID:mikemacharia39,項目名稱:gatepass,代碼行數:75,代碼來源:Office_Entry.java

示例9: createRubyHomeField

import javafx.scene.control.Label; //導入方法依賴的package包/類
private HBox createRubyHomeField() {
    HBox rubyHomeBox = new HBox(5);
    rubyHomeField = new TextField();
    rubyHomeField.setId("RubyHomeField");
    rubyHomeField.setPromptText("(Bundled JRuby)");
    Label label = createLabel("Ruby Home: ");
    label.setId("RubyLabel");
    label.setMinWidth(Region.USE_PREF_SIZE);
    rubyHomeBox.getChildren().addAll(label, rubyHomeField);
    HBox.setHgrow(rubyHomeField, Priority.ALWAYS);
    return rubyHomeBox;
}
 
開發者ID:jalian-systems,項目名稱:marathonv5,代碼行數:13,代碼來源:RubyPathLayout.java

示例10: show

import javafx.scene.control.Label; //導入方法依賴的package包/類
public void show(){
	Group root = new Group();
	Scene scene = new Scene(root, WIDTH, HEIGHT);
	scene.getStylesheets().setAll("/styleSheets/login.css");
	Image backgroundImage = new Image(getClass().getClassLoader().getResourceAsStream(myResources.getString("loaderImagePath")));
	scene.setFill(new ImagePattern(backgroundImage));

	// Bind the timerLabel text property to the timeSeconds property
	timerLabel.textProperty().bind(timeSeconds.divide(100).asString());

	timerLabel.setId("label");

	ProgressBar progressBar = new ProgressBar();
	progressBar.progressProperty().bind(
			timeSeconds.divide(START_TIME*100.0).subtract(1).multiply(-1));

	timeSeconds.set((START_TIME)*100);
	timelineController();
	Label loadingLabel =new Label("Game loading ...");
	loadingLabel.setId("label");
	VBox vb = new VBox(20);     
	// center the components within VBox
	vb.setAlignment(Pos.CENTER);        
	vb.setPrefWidth(scene.getWidth());
	vb.setLayoutY(60);
	vb.getChildren().addAll( timerLabel, progressBar, loadingLabel);

	root.getChildren().add(vb);
	scene.getStylesheets().setAll(CSS_LOCATION);
	primaryStage.setScene(scene);
	primaryStage.show();
}
 
開發者ID:LtubSalad,項目名稱:voogasalad-ltub,代碼行數:33,代碼來源:Loader.java

示例11: createInfo

import javafx.scene.control.Label; //導入方法依賴的package包/類
private HBox createInfo() {
    Label blurbLabel = createLabel(versionInfo.getBlurbTitle());
    blurbLabel.setId("blurbLabel");

    HBox infoBox = new HBox();
    infoBox.getChildren().addAll(blurbLabel);
    infoBox.setAlignment(Pos.TOP_CENTER);
    return infoBox;
}
 
開發者ID:jalian-systems,項目名稱:marathonv5,代碼行數:10,代碼來源:MarathonSplashScreen.java

示例12: configureBox

import javafx.scene.control.Label; //導入方法依賴的package包/類
@SuppressWarnings("unchecked")
private void configureBox(HBox root) {
	StackPane container = new StackPane();
	//container.setPrefHeight(700);
	container.setPrefSize(boxBounds.getWidth(), boxBounds.getHeight());
	container.setStyle("-fx-border-width:1px;-fx-border-style:solid;-fx-border-color:#999999;");

	table= new TableView<AttClass>();
	Label lview= new Label();
	lview.setText("View Records");
	lview.setId("lview");
	bottomPane= new VBox();

	tclock= new Text(); 
	tclock.setId("lview");
	//tclock.setFont(Font.font("Calibri", 20));
	final Timeline timeline = new Timeline(new KeyFrame(Duration.seconds(1), new EventHandler<ActionEvent>() {  
		@Override  
		public void handle(ActionEvent event) {  
			tclock.setText(DateFormat.getDateTimeInstance().format(new Date()));
		}  
	}));  
	timeline.setCycleCount(Animation.INDEFINITE);  
	timeline.play();

	bottomPane.getChildren().addAll(tclock,lview);
	bottomPane.setAlignment(Pos.CENTER);

	//table pane
	namecol= new TableColumn<>("First Name");
	namecol.setMinWidth(170);
	namecol.setCellValueFactory(new PropertyValueFactory<>("name"));

	admcol= new TableColumn<>("Identication No.");
	admcol.setMinWidth(180);
	admcol.setCellValueFactory(new PropertyValueFactory<>("adm"));

	typecol= new TableColumn<>("Type");
	typecol.setMinWidth(130);
	typecol.setCellValueFactory(new PropertyValueFactory<>("type"));

	timecol= new TableColumn<>("Signin");
	timecol.setMinWidth(140);
	timecol.setCellValueFactory(new PropertyValueFactory<>("timein"));

	datecol= new TableColumn<>("Date");
	datecol.setMinWidth(180);
	datecol.setCellValueFactory(new PropertyValueFactory<>("date"));

	table.getColumns().addAll(namecol, admcol, typecol, timecol, datecol);
	table.setItems(getAtt());
	att= getAtt();
	table.setItems(FXCollections.observableArrayList(att));
	table.setMinHeight(500);

	btnrefresh = new Button("Refresh");
	btnrefresh.setOnAction(new EventHandler<ActionEvent>() {
		public void handle(ActionEvent t) {
			table.setItems(getAtt());
		}
	});
	laytable= new VBox(10);
	laytable.getChildren().addAll(table, btnrefresh);
	laytable.setAlignment(Pos.TOP_LEFT);

	container.getChildren().addAll(bottomPane,laytable);
	setAnimation();
	sc.setContent(container);
	root.setStyle("-fx-background-color: linear-gradient(#E4EAA2, #9CD672)");
	root.getChildren().addAll(getActionPane(),sc);

	//service.start();
}
 
開發者ID:mikemacharia39,項目名稱:gatepass,代碼行數:74,代碼來源:AllAttendance.java

示例13: constructContainer

import javafx.scene.control.Label; //導入方法依賴的package包/類
@Override
public Parent constructContainer() {

	webContent.loadContent("<html><body><b>Missing a manual</b></body></html>");
	try {
		// To avoid strange chars like "", the html -Tag is added here separately:
		webContent.loadContent("<html>"+Functions.fileToString(new File(
							   "src/views/txt/troubleshoot.htm"))+"</html>");
	} catch (Exception e) {
		e.printStackTrace();
	}
	double pageWidth = this.getFXController().getMyFXStage().getOPTIMAL_WIDTH();
	double pageHeight = this.getFXController().getMyFXStage().getOPTIMAL_HEIGHT();
	debug.Debugger.out("ManualView sizes: w:"+pageWidth+" h:"+pageHeight);
	
	//webPage.setPrefHeight(pageHeight);
	webPage.setPrefWidth(pageWidth*.93);
	//webContent.setJavaScriptEnabled(true);
	webPage.applyCss();

	Label labelTitel = new Label("Fehlerbehandlung");
	labelTitel.setId("anleitungstitel");

	BackButton backBtn = new BackButton(this.getFXController());

	BorderPane headLayout = new BorderPane(labelTitel);
	headLayout.setPadding(new Insets(20));

	ScrollPane scroller = new ScrollPane();
	scroller.setMaxWidth(pageWidth);

	scroller.setContent(webPage);
	scroller.setHbarPolicy(ScrollBarPolicy.NEVER);
	scroller.setVbarPolicy(ScrollBarPolicy.ALWAYS);
	scroller.setId("anleitung");

	HBox controlLayout = new HBox(20);
	controlLayout.setAlignment(Pos.BOTTOM_CENTER);
	controlLayout.getChildren().addAll(backBtn);
	controlLayout.setPadding(new Insets(10));

	BorderPane mainLayout = new BorderPane();
	mainLayout.setPadding(new Insets(15));
	mainLayout.setTop(headLayout);
	mainLayout.setCenter(scroller);
	mainLayout.setBottom(controlLayout);

	return mainLayout;
}
 
開發者ID:CoffeeCodeSwitzerland,項目名稱:Lernkartei_2017,代碼行數:50,代碼來源:TroubleShootView.java

示例14: info

import javafx.scene.control.Label; //導入方法依賴的package包/類
public Label info(String value) {
	Label l = new Label(value);
	l.setId("oc-info-label");
	return l;
}
 
開發者ID:HearthProject,項目名稱:OneClient,代碼行數:6,代碼來源:ModTile.java

示例15: constructContainer

import javafx.scene.control.Label; //導入方法依賴的package包/類
@Override
public Parent constructContainer() {
	headLbl = new Label("");
	headLbl.setId("bold");

	HomeButton backBtn = new HomeButton(getFXController(), "_Zur�ck");
	AppButton newDoorBtn = new AppButton(txtNewTheme);
	
	Image trashImg = new Image("views/pictures/Papierkorb.png");
	ImageView trashImgView = new ImageView(trashImg);

	BorderPane headLayout = new BorderPane(headLbl);
	headLayout.setPadding(new Insets(0, 0, 25, 0));

	doorLayout.setPadding(new Insets(10));
	doorLayout.setAlignment(Pos.TOP_CENTER);

	scroller.setMaxWidth(600);
	scroller.setFitToWidth(true);
	scroller.setPadding(new Insets(25));
	
	ControlLayout conLay = new ControlLayout(backBtn, newDoorBtn, trashImgView);
	MainLayout maLay = new MainLayout(scroller, headLayout, conLay);
	
	newDoorBtn.setOnAction(e ->
	{
		newDoor();
	});
	
	trashImgView.setOnDragOver(event ->
	{
		if (event.getGestureSource() != trashImgView && event.getDragboard().hasString())
		{
			event.acceptTransferModes(TransferMode.COPY_OR_MOVE);
		}

		event.consume();
	});
	
	trashImgView.setOnDragDropped(event ->
	{
		Dragboard db = event.getDragboard();
		boolean success = false;
		if (db.hasString())
		{
			success = deleteDoor(db.getString());
		}

		event.setDropCompleted(success);
		event.consume();
	});
	
	getFXController().getModel("cards").registerView(this);
	return maLay;
}
 
開發者ID:CoffeeCodeSwitzerland,項目名稱:Lernkartei_2017,代碼行數:56,代碼來源:DoorView_withoutDesign.java


注:本文中的javafx.scene.control.Label.setId方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。