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


Java TitledPane.setStyle方法代码示例

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


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

示例1: drawNode

import javafx.scene.control.TitledPane; //导入方法依赖的package包/类
@Override
public Node drawNode() {
    String title = "TitledPane";
    Label content = new Label("Content");
    TitledPane titledPane = new TitledPane(title, content);
    if (titledPane.getText() != title) {
        reportGetterFailure("getTitle()");
    }
    if (titledPane.getContent() != content) {
        reportGetterFailure("getTitle()");
    }
    titledPane.setMinSize(SLOT_WIDTH, SLOT_HEIGHT);
    titledPane.setMaxSize(SLOT_WIDTH, SLOT_HEIGHT);
    titledPane.setPrefSize(SLOT_WIDTH, SLOT_HEIGHT);
    titledPane.setStyle("-fx-border-color: darkgray;");
    return titledPane;
}
 
开发者ID:teamfx,项目名称:openjfx-8u-dev-tests,代码行数:18,代码来源:TitledPaneApp.java

示例2: createObject

import javafx.scene.control.TitledPane; //导入方法依赖的package包/类
protected Object createObject(double width, double height, Double tab_width, Double tab_height) {
    Label content = new Label("Content");
    if (tab_width != null && tab_height != null) {
        content.setMinSize(tab_width, tab_height);
        content.setMaxSize(tab_width, tab_height);
        content.setPrefSize(tab_width, tab_height);
    }
    TitledPane titled_pane = new TitledPane();
    titled_pane.setText("Title");
    titled_pane.setContent(content);
    titled_pane.setMinSize(width, height);
    titled_pane.setMaxSize(width, height);
    titled_pane.setPrefSize(width, height);
    titled_pane.setStyle("-fx-border-color: darkgray;");
    return titled_pane;
}
 
开发者ID:teamfx,项目名称:openjfx-8u-dev-tests,代码行数:17,代码来源:TitledPaneApp.java

示例3: buildRoadPanel

import javafx.scene.control.TitledPane; //导入方法依赖的package包/类
private void buildRoadPanel() {
	roadAttributes = new VBox();

	roadColorLabel = new Label("Color");
	roadColorLabel.setTextFill(Paint.valueOf("#bfbfbf"));

	roadColorPicker = new ColorPicker();
	roadColorPicker.setValue(Color.BLACK);

	roadWidthLabel = new Label("Pixel Width : ");
	roadWidthLabel.setAlignment(Pos.CENTER);
	roadWidthLabel.setPrefSize(202, 17.0); 
	roadWidthLabel.setTextFill(Paint.valueOf("#e8e5e5"));

	roadWidthSlider = new Slider();
	roadWidthSlider.setBlockIncrement(3);
	roadWidthSlider.setPrefSize(202, 5.0); 

	roadAttributes.getChildren().addAll(roadColorLabel, roadColorPicker, roadWidthLabel, roadWidthSlider);

   	road = new TitledPane("Road", roadAttributes);
   	road.setStyle("-fx-background-color: rgba(0,0,0,0.85);");
   	road.prefWidthProperty().bind(widthProperty());
   	road.setExpanded(false);

       roadWidthSlider.valueProperty().addListener((ObservableValue<? extends Number> ov, Number t, Number t1) -> {
       	roadWidthLabel.setText("Pixel Width : " + t1.intValue());
       });
	
}
 
开发者ID:sanke69,项目名称:eDigitalWorld,代码行数:31,代码来源:RightPanel.java

示例4: buildBuildingPanel

import javafx.scene.control.TitledPane; //导入方法依赖的package包/类
private void buildBuildingPanel() {
	buildingAttributes = new VBox();

	buildingColorLabel = new Label("Color");
	buildingColorLabel.setTextFill(Paint.valueOf("#bfbfbf"));

	buildingColorPicker = new ColorPicker();
	buildingColorPicker.setValue(Color.BLACK);

	buildingWidthLabel = new Label("Pixel Width : ");
	buildingWidthLabel.setAlignment(Pos.CENTER);
	buildingWidthLabel.setPrefSize(202, 17.0); 
	buildingWidthLabel.setTextFill(Paint.valueOf("#e8e5e5"));

	buildingWidthSlider = new Slider();
	buildingWidthSlider.setBlockIncrement(3);
	buildingWidthSlider.setPrefSize(202, 5.0); 

	buildingAttributes.getChildren().addAll(buildingColorLabel, buildingColorPicker, buildingWidthLabel, buildingWidthSlider);

   	building = new TitledPane("Buildings", buildingAttributes);
   	building.setStyle("-fx-background-color: rgba(0,0,0,0.85);");
   	building.prefWidthProperty().bind(widthProperty());
   	building.setExpanded(false);

   	buildingWidthSlider.valueProperty().addListener((ObservableValue<? extends Number> ov, Number t, Number t1) -> {
       	buildingWidthLabel.setText("Pixel Width : " + t1.intValue());
       });
}
 
开发者ID:sanke69,项目名称:eDigitalWorld,代码行数:30,代码来源:RightPanel.java

示例5: buildReliefPanel

import javafx.scene.control.TitledPane; //导入方法依赖的package包/类
private void buildReliefPanel() {
	reliefAttributes = new VBox();

	reliefColorLabel = new Label("Color");
	reliefColorLabel.setTextFill(Paint.valueOf("#bfbfbf"));

	reliefColorPicker = new ColorPicker();
	reliefColorPicker.setValue(Color.BLACK);

	reliefWidthLabel = new Label("Pixel Width : ");
	reliefWidthLabel.setAlignment(Pos.CENTER);
	reliefWidthLabel.setPrefSize(202, 17.0); 
	reliefWidthLabel.setTextFill(Paint.valueOf("#e8e5e5"));

	reliefWidthSlider = new Slider();
	reliefWidthSlider.setBlockIncrement(3);
	reliefWidthSlider.setPrefSize(202, 5.0); 

	reliefAttributes.getChildren().addAll(reliefColorLabel, reliefColorPicker, reliefWidthLabel, reliefWidthSlider);

   	relief = new TitledPane("Reliefs", reliefAttributes);
   	relief.setStyle("-fx-background-color: rgba(0,0,0,0.85);");
   	relief.prefWidthProperty().bind(widthProperty());
   	relief.setExpanded(false);

   	reliefWidthSlider.valueProperty().addListener((ObservableValue<? extends Number> ov, Number t, Number t1) -> {
   		reliefWidthLabel.setText("Pixel Width : " + t1.intValue());
       });
}
 
开发者ID:sanke69,项目名称:eDigitalWorld,代码行数:30,代码来源:RightPanel.java

示例6: buildPOIPanel

import javafx.scene.control.TitledPane; //导入方法依赖的package包/类
private void buildPOIPanel() {
	poiAttributes = new VBox();

	poiColorLabel = new Label("Color");
	poiColorLabel.setTextFill(Paint.valueOf("#bfbfbf"));

	poiColorPicker = new ColorPicker();
	poiColorPicker.setValue(Color.BLACK);

	poiWidthLabel = new Label("Pixel Width : ");
	poiWidthLabel.setAlignment(Pos.CENTER);
	poiWidthLabel.setPrefSize(202, 17.0); 
	poiWidthLabel.setTextFill(Paint.valueOf("#e8e5e5"));

	poiWidthSlider = new Slider();
	poiWidthSlider.setBlockIncrement(3);
	poiWidthSlider.setPrefSize(202, 5.0); 

	poiAttributes.getChildren().addAll(poiColorLabel, poiColorPicker, poiWidthLabel, poiWidthSlider);

   	poi = new TitledPane("POI", poiAttributes);
   	poi.setStyle("-fx-background-color: rgba(0,0,0,0.85);");
   	poi.prefWidthProperty().bind(widthProperty());
   	poi.setExpanded(false);

   	poiWidthSlider.valueProperty().addListener((ObservableValue<? extends Number> ov, Number t, Number t1) -> {
   		poiWidthLabel.setText("Pixel Width : " + t1.intValue());
       });
}
 
开发者ID:sanke69,项目名称:eDigitalWorld,代码行数:30,代码来源:RightPanel.java

示例7: buildROIPanel

import javafx.scene.control.TitledPane; //导入方法依赖的package包/类
private void buildROIPanel() {
	roiAttributes = new VBox();

	roiColorLabel = new Label("Color");
	roiColorLabel.setTextFill(Paint.valueOf("#bfbfbf"));

	roiColorPicker = new ColorPicker();
	roiColorPicker.setValue(Color.BLACK);

	roiWidthLabel = new Label("Pixel Width : ");
	roiWidthLabel.setAlignment(Pos.CENTER);
	roiWidthLabel.setPrefSize(202, 17.0); 
	roiWidthLabel.setTextFill(Paint.valueOf("#e8e5e5"));

	roiWidthSlider = new Slider();
	roiWidthSlider.setBlockIncrement(3);
	roiWidthSlider.setPrefSize(202, 5.0); 

	roiAttributes.getChildren().addAll(roiColorLabel, roiColorPicker, roiWidthLabel, roiWidthSlider);

   	roi = new TitledPane("ROI", roiAttributes);
   	roi.setStyle("-fx-background-color: rgba(0,0,0,0.85);");
   	roi.prefWidthProperty().bind(widthProperty());
   	roi.setExpanded(false);

   	roiWidthSlider.valueProperty().addListener((ObservableValue<? extends Number> ov, Number t, Number t1) -> {
   		roiWidthLabel.setText("Pixel Width : " + t1.intValue());
       });
}
 
开发者ID:sanke69,项目名称:eDigitalWorld,代码行数:30,代码来源:RightPanel.java


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