當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。