Skip to content

Commit

Permalink
remove SubScene
Browse files Browse the repository at this point in the history
  • Loading branch information
leewyatt committed Dec 29, 2022
1 parent 9d6a45e commit 5040a5a
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 25 deletions.
12 changes: 0 additions & 12 deletions src/main/java/com/leewyatt/rxcontrols/controls/RXCarousel.java
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@
import javafx.css.converter.BooleanConverter;
import javafx.css.converter.DurationConverter;
import javafx.css.converter.EnumConverter;
import javafx.scene.SubScene;
import javafx.scene.control.Control;
import javafx.scene.control.Skin;
import javafx.util.Duration;
Expand Down Expand Up @@ -486,17 +485,6 @@ public List<RXToggleButton> getNavButtons() {
return skin.getNavButtons();
}

/**
* 之前使用SubScene 然后添加透视相机, 有3D的效果
* 但是考虑到一个页面,或者一个界面可能有多个轮播图,所以取消了SubScene
* 可以自行根据需要跟Scene一个透视相机, 或者自己创建一个SubScene 添加透视相机, 来实现;
* 避免了多个SubScene
* @return null
*/
@Deprecated
public SubScene getSubScene() {
return null;
}

/**
* 翻转方向/运动方向
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,6 @@
import javafx.geometry.Orientation;
import javafx.geometry.VPos;
import javafx.scene.Node;
import javafx.scene.SubScene;
import javafx.scene.control.SkinBase;
import javafx.scene.control.Toggle;
import javafx.scene.control.ToggleGroup;
Expand Down Expand Up @@ -215,7 +214,7 @@ public RXCarouselSkin(RXCarousel control) {
}*/
// 添加底层容器到组件里
rootPane.getChildren().addAll(contentPane, effectPane, navigationPane);
rootPane.backgroundProperty().bind(control.backgroundProperty());
//rootPane.backgroundProperty().bind(control.backgroundProperty());

//subScene = new SubScene(contentPane, dbw.get(), dbh.get(), false, SceneAntialiasing.BALANCED);
//subScene.getStyleClass().add("carousel-subscene");
Expand Down Expand Up @@ -672,9 +671,6 @@ public void dispose() {
for (RXToggleButton button : getNavButtons()) {
button.textProperty().unbind();
}
contentPane.backgroundProperty().unbind();
contentPane.prefWidthProperty().unbind();
contentPane.prefHeightProperty().unbind();
rootPane.minWidthProperty().unbind();
rootPane.prefWidthProperty().unbind();
rootPane.minHeightProperty().unbind();
Expand Down Expand Up @@ -702,12 +698,4 @@ public void dispose() {
super.dispose();
}

/**
* 移除SubScene, 要向轮播图有3D效果,请自行给Scene添加透视相机 PerspectiveCamera
* @return null
*/
@Deprecated
public SubScene getSubScene() {
return null;
}
}

0 comments on commit 5040a5a

Please sign in to comment.