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


Java Rectangle.setManaged方法代码示例

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


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

示例1: addGroups

import javafx.scene.shape.Rectangle; //导入方法依赖的package包/类
private void addGroups() {
	int y = 5;
	int x = 5;
	for (int i = 0; i < 12; i++) {
		Rectangle temp = new Rectangle(146,194);
		temp.setArcHeight(15);
		temp.setArcWidth(15);
		String imageLocation = "/assets/card_assets/cards/backofHand.png";
		Image tempImage = new Image(imageLocation);
		temp.setFill(new ImagePattern(tempImage));
		temp.setStroke(Color.GRAY);
		temp.setVisible(true);
		temp.toFront();
		temp.setManaged(false);
		temp.setLayoutX(x);
		temp.setLayoutY(y);
		super.getChildren().add(temp);
		x-=1;
		y-=1;
	}
}
 
开发者ID:jarolrod,项目名称:java-solitaire,代码行数:22,代码来源:StockPile.java

示例2: ZoomManager

import javafx.scene.shape.Rectangle; //导入方法依赖的package包/类
/**
 *
 *
 * Creates a new {@code ZoomManager}.
 * </p>
 * <b> Due to a bug, {@code series} must not be added to the chart! </b> If you
 * do so, the chart will be emtpy.
 * </p>
 *
 *
 * @param chartParent
 *            the chart's parent {@link Pane}.
 * @param chart
 *            the {@link XYChart} to which zooming functionality is added
 * @param series
 *            collection of chart data to display
 * @throws IllegalArgumentException
 *             if chart data is empty or {@code null}
 */
public ZoomManager(final Pane chartParent, final XYChart<X, Y> chart,
                   final Collection<? extends Series<X, Y>> series) {
    super();
    this.chart = Objects.requireNonNull(chart);
    if (series == null || series.isEmpty()) {
        throw new IllegalArgumentException("No chart data given");
    }
    this.series = FXCollections.observableArrayList(series);
    restoreData();
    final Rectangle zoomRect = new Rectangle();
    zoomRect.setManaged(false);
    zoomRect.setFill(Color.LIGHTSEAGREEN.deriveColor(0, 1, 1, 0.5));
    chartParent.getChildren().add(zoomRect);
    setUpZooming(zoomRect, chart);

}
 
开发者ID:gransort,项目名称:Java-oscilloscope-project,代码行数:36,代码来源:ZoomManager.java

示例3: ZoomManager

import javafx.scene.shape.Rectangle; //导入方法依赖的package包/类
/**
 *
 *
 * Creates a new {@code ZoomManager}.
 * </p>
 * <b> Due to a bug, {@code series} must not be added to the chart! </b> If you
 * do so, the chart will be emtpy.
 * </p>
 *
 *
 * @param chartParent
 *            the chart's parent {@link Pane}.
 * @param chart
 *            the {@link XYChart} to which zooming functionality is added
 * @param series
 *            collection of chart data to display
 * @throws IllegalArgumentException
 *             if chart data is empty or {@code null}
 */
public ZoomManager(final Pane chartParent, final XYChart<X, Y> chart,
		final Collection<? extends Series<X, Y>> series) {
	super();
	this.chart = Objects.requireNonNull(chart);
	if (series == null || series.isEmpty()) {
		throw new IllegalArgumentException("No chart data given");
	}
	this.series = FXCollections.observableArrayList(series);
	restoreData();
	final Rectangle zoomRect = new Rectangle();
	zoomRect.setManaged(false);
	zoomRect.setFill(Color.LIGHTSEAGREEN.deriveColor(0, 1, 1, 0.5));
	chartParent.getChildren().add(zoomRect);
	setUpZooming(zoomRect, chart);

}
 
开发者ID:kerner1000,项目名称:javafx-chart-zooming,代码行数:36,代码来源:ZoomManager.java


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