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


Java BackgroundRepeat.NO_REPEAT属性代码示例

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


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

示例1: drawBackground

protected void drawBackground (String url) {
    if (url == null) {
        return;
    }
    Image img = getImage(url);
    BackgroundImage background = new BackgroundImage(img,
                                                     BackgroundRepeat.NO_REPEAT,
                                                     BackgroundRepeat.NO_REPEAT,
                                                     BackgroundPosition.DEFAULT,
                                                     BackgroundSize.DEFAULT);
    myPane.setBackground(new Background(background));
    myPane.setMinWidth(img.getWidth());
    myPane.setMinHeight(img.getHeight());
}
 
开发者ID:tomrom95,项目名称:GameAuthoringEnvironment,代码行数:14,代码来源:LevelRenderer.java

示例2: CustomExtractIcon

public CustomExtractIcon(final InternalWindow w) {
	getStyleClass().setAll("custom-close-icon");
	BackgroundImage img = new BackgroundImage(
			new Image(FileUtils.getResourceToExternalForm("/img/extract.png"), 15, 15, false, true),
       BackgroundRepeat.NO_REPEAT, BackgroundRepeat.NO_REPEAT, BackgroundPosition.CENTER,
         BackgroundSize.DEFAULT);
	setBackground(new Background(img));
	setOnAction((e) -> w.toggleWindowExtracted());
}
 
开发者ID:mbway,项目名称:Simulizer,代码行数:9,代码来源:CustomExtractIcon.java

示例3: hideCard

private void hideCard(boolean hide) {
	topPane.setVisible(!hide);
	centerPane.setVisible(!hide);
	bottomPane.setVisible(!hide);
	if (hide) {
		BackgroundSize size = new BackgroundSize(getWidth(), getHeight(), false, false, true, false);
		BackgroundImage image = new BackgroundImage(IconFactory.getDefaultCardBack(), BackgroundRepeat.NO_REPEAT,
				BackgroundRepeat.NO_REPEAT, BackgroundPosition.CENTER, size);
		Background background = new Background(image);
		setBackground(background);
	}
}
 
开发者ID:demilich1,项目名称:metastone,代码行数:12,代码来源:HandCard.java

示例4: setBackground

/**
 * Effect: sets the background image of a region to be white with a
 * specified image on top of it.
 *
 * @param n
 *            the node
 * @param i
 *            the image
 */
private static void setBackground(Region n, Image i) {
	BackgroundImage back = new BackgroundImage(i, BackgroundRepeat.NO_REPEAT, BackgroundRepeat.NO_REPEAT, BackgroundPosition.CENTER, new BackgroundSize(100, 100, true, true, true, false));
	Platform.runLater(() -> n.setBackground(new Background(new BackgroundFill[] { new BackgroundFill(Color.WHITE, CornerRadii.EMPTY, Insets.EMPTY) }, new BackgroundImage[] { back })));
}
 
开发者ID:orangeturtle739,项目名称:Grow,代码行数:13,代码来源:Grow.java


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