本文整理汇总了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;
}
}
示例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);
}
示例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);
}