本文整理匯總了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);
}