本文整理匯總了Java中javafx.scene.layout.StackPane.setVisible方法的典型用法代碼示例。如果您正苦於以下問題:Java StackPane.setVisible方法的具體用法?Java StackPane.setVisible怎麽用?Java StackPane.setVisible使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類javafx.scene.layout.StackPane
的用法示例。
在下文中一共展示了StackPane.setVisible方法的3個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: initializeTools
import javafx.scene.layout.StackPane; //導入方法依賴的package包/類
private void initializeTools() {
StyleController = new StyleController();
splineController = new SplineController();
derivationController = new DerivationController();
gradientController = new GradientController();
animationController = new AnimationController();
tools.put(ToolController.CSS.ordinal(), StyleController);
tools.put(ToolController.SPLINE.ordinal(), splineController);
tools.put(ToolController.DERIVATION.ordinal(), derivationController);
tools.put(ToolController.GRADIENT.ordinal(), gradientController);
tools.put(ToolController.ANIMATION.ordinal(), animationController);
currentPane = new StackPane();
sparePane = new StackPane();
sparePane.setVisible(false);
currentPane.getChildren().add(StyleController);
rootContainer.getChildren().addAll(currentPane, sparePane);
currentToolIndex.set(ToolController.CSS.ordinal());
}
示例2: setSymbolsVisible
import javafx.scene.layout.StackPane; //導入方法依賴的package包/類
public void setSymbolsVisible(final XYChart.Series<X, Y> SERIES, final boolean VISIBLE) {
if (!getData().contains(SERIES)) { return; }
for (XYChart.Data<X, Y> data : SERIES.getData()) {
StackPane stackPane = (StackPane) data.getNode();
if (null == stackPane) { continue; }
stackPane.setVisible(VISIBLE);
}
}
示例3: initialize
import javafx.scene.layout.StackPane; //導入方法依賴的package包/類
@Override
public void initialize(URL location, ResourceBundle resources) {
backgroundImageView.setMouseTransparent(true);
movieList.setCellFactory(c -> new MovieListCell());
movieList.setItems(model.getMovies());
movieList.setCacheHint(CacheHint.SPEED);
model.selectedMovieProperty().bind(movieList.getSelectionModel().selectedItemProperty());
model.selectedMovieProperty().addListener((obs, oldVal, newVal) -> updateDetailArea());
detailView.visibleProperty().bind(model.selectedMovieProperty().isNotNull());
maximizeAppIconView.setOnMouseClicked(e -> ((Stage) rootPane.getScene().getWindow()).setFullScreen(!((Stage) rootPane.getScene().getWindow()).isFullScreen()));
closeAppIconView.setOnMouseClicked(e -> rootPane.getScene().getWindow().hide());
moviePosterWrapper.setRotationAxis(new Point3D(0, 1, 0));
moviePosterWrapper.setCache(true);
moviePosterWrapper.setCacheShape(true);
moviePosterWrapper.setCacheHint(CacheHint.SPEED);
posterImageView.setCache(true);
posterImageView.setCacheHint(CacheHint.SPEED);
Util.installWindowDragListener(rootPane);
final ChangeListener backgroundImageResizeListener = (obs, oldVal, newVal) -> {
final Image image = backgroundImageView.getImage();
if (backgroundImageView.getImage() != null) {
Dimension2D backgroundDimension = shouldFitIn(image.getWidth(), image.getHeight(), rootPane.getWidth(), rootPane.getHeight());
backgroundImageView.setFitWidth(backgroundDimension.getWidth());
backgroundImageView.setFitHeight(backgroundDimension.getHeight());
}
};
rootPane.widthProperty().addListener(backgroundImageResizeListener);
rootPane.heightProperty().addListener(backgroundImageResizeListener);
backgroundImageView.imageProperty().addListener(backgroundImageResizeListener);
addFeatureSupport();
updateDetailArea();
watchTrailerButton.setOnAction(e -> playTrailer());
mediaView.fitWidthProperty().bind(rootPane.widthProperty().subtract(64.0));
mediaStateIcon = new AnimatedIcon();
mediaStateIcon.setOpacity(0.6);
mediaStateIcon.setScaleX(4.0);
mediaStateIcon.setScaleY(4.0);
mediaStateIcon.setMouseTransparent(true);
mediaStateIcon.toPause();
Circle circle = new Circle();
circle.setMouseTransparent(true);
circle.setRadius(76);
circle.setStroke(Color.ORANGE);
circle.setStrokeWidth(8);
circle.setOpacity(0.6);
StackPane mediaControl = new StackPane(circle, mediaStateIcon);
mediaControl.setMouseTransparent(true);
mediaControl.setMinWidth(USE_PREF_SIZE);
mediaControl.setMinHeight(USE_PREF_SIZE);
mediaControl.setMaxWidth(USE_PREF_SIZE);
mediaControl.setMaxHeight(USE_PREF_SIZE);
mediaControl.setVisible(false);
mediaPane.getChildren().addAll(mediaControl);
//TODO: Animation
mediaView.setOnMouseEntered(e -> mediaControl.setVisible(true));
mediaView.setOnMouseExited(e -> mediaControl.setVisible(false));
movieList.getSelectionModel().select(0);
rootPane.setOnKeyPressed(evt -> {
if (evt.getCode().equals(KeyCode.ESCAPE)) {
stopTrailer();
}
});
}