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


Java Color.BEIGE属性代码示例

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


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

示例1: Annotation

/**
 * Creates an instance of a {@link Annotation}.
 * <p>
 * Sets the color of the {@link Annotation} to the default {@link Color#BROWN}.
 *
 * @param source the source node
 * @param type   the type
 * @param start  the start of the base offset
 * @param end    the end of the base offset
 * @param score  the score of the feature
 * @param strand the strand of the {@link Annotation}. Must be one of '.', '-' or '+'
 * @param phase  the phase of the {@link Annotation}. 0, 1 or 2, or -1 to indicate it has no value
 */
public Annotation(final String source, final String type, final int start, final int end, final double score,
                  final String strand, final int phase) {
    this.source = source;
    this.type = type;
    this.start = start;
    this.end = end;
    this.score = score;
    this.strand = strand;
    this.phase = phase;
    this.color = Color.BEIGE;

    attributes = new HashMap<>();
}
 
开发者ID:ProgrammingLife2017,项目名称:hygene,代码行数:26,代码来源:Annotation.java

示例2: start

@Override
public void start(Stage stage) {
	VBox box = new VBox();
	Scene scene = new Scene(box, 180, 180);
	stage.setScene(scene);
	stage.setTitle("ScrollPaneSample");
	box.getChildren().addAll(sp, fileName);
	VBox.setVgrow(sp, Priority.ALWAYS);

	fileName.setLayoutX(30);
	fileName.setLayoutY(160);
	sp.setVbarPolicy(ScrollPane.ScrollBarPolicy.NEVER);

	Color[] colors = new Color[] { Color.RED, Color.ALICEBLUE, Color.AQUA, Color.BEIGE, Color.BLANCHEDALMOND };
	for (int i = 0; i < 10; i++) {
		int cindex = (i + 5) % 5;
		Rectangle rectangle = new Rectangle(100, 50, colors[cindex]);
		rectangles[i] = rectangle;
		hb.getChildren().add(rectangle);
	}

	sp.setPrefSize(115, 150);
	sp.setContent(hb);
	fileName.setOnMouseClicked((e) -> {
		scrollTo(rectangles[4]);
	});
	stage.show();
}
 
开发者ID:jalian-systems,项目名称:marathonv5,代码行数:28,代码来源:ScrollPaneSample2.java


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