39 import javafx.geometry.Pos;
40 import javafx.geometry.Side;
41 import javafx.geometry.VPos;
42 import javafx.scene.Node;
43 import javafx.scene.chart.BarChart;
44 import javafx.scene.chart.XYChart;
45 import javafx.scene.control.ContentDisplay;
46 import javafx.scene.control.Control;
47 import javafx.scene.control.Labeled;
48 import javafx.scene.control.OverrunStyle;
49 import javafx.scene.control.PasswordField;
50 import javafx.scene.control.ScrollBar;
51 import javafx.scene.control.ScrollPane;
52 import javafx.scene.control.ScrollPane.ScrollBarPolicy;
53 import javafx.scene.control.TextField;
54 import javafx.scene.effect.BlurType;
55 import javafx.scene.effect.DropShadow;
56 import javafx.scene.effect.InnerShadow;
57 import javafx.scene.layout.HBox;
58 import javafx.scene.layout.Pane;
59 import javafx.scene.layout.PaneBuilder;
60 import javafx.scene.layout.Region;
61 import javafx.scene.layout.VBox;
62 import javafx.scene.paint.Color;
63 import javafx.scene.shape.Rectangle;
64 import javafx.scene.text.FontSmoothingType;
65 import javafx.scene.text.Text;
66 import javafx.scene.text.TextAlignment;
67 import javafx.scene.web.WebView;
68 import test.css.controls.styles.AlignmentCssStyle;
69 import test.css.controls.styles.AxisSideAlignmentCssStyle;
70 import test.css.controls.styles.BackgroundCssStyle;
71 import test.css.controls.styles.BorderCssStyle;
72 import test.css.controls.styles.BorderedCssStyle;
73 import test.css.controls.styles.CssStyle;
74 import test.css.controls.styles.FlowAlignmentCssStyle;
75 import test.css.controls.styles.FontSmoothingCssStyle;
76 import test.css.controls.styles.LegendSideAlignmentCssStyle;
77 import test.css.controls.styles.OverrunCssStyle;
78 import test.css.controls.styles.PageInformationAlignmentCssStyle;
79 import test.css.controls.styles.Style;
825 props2Impls.put("-fx-pref-tile-height", new CssStyle[]{
826 new CssStyle("PREF-TILE-HEIGHT",
827 "-fx-pref-tile-height: "
828 + "40;")});
829 props2Impls.put("-fx-tile-alignment", StyleArrayFactory.fromEnum(TileAlignmentCssStyle.class, "-fx-tile-alignment", Pos.values()));
830 props2Impls.put("-fx-spacing", new CssStyle[]{
831 new CssStyle("SPACING",
832 "-fx-spacing: "
833 + "15;")});
834 props2Impls.put("-fx-fill-width", new CssStyle[]{
835 new CssStyle("FILL-WIDTH",
836 "-fx-fill-width: "
837 + "true;") {
838 @Override
839 public void decorate(Node control, Pane container) {
840 super.decorate(control, container);
841 if (control instanceof VBox) {
842 VBox box = (VBox) control;
843 box.getChildren().clear();
844 box.setStyle(box.getStyle() + "-fx-border-color:blue;");
845 box.getChildren().add(PaneBuilder.create().children(new Rectangle(20, 20, Color.TRANSPARENT)).style("-fx-border-color:red;").build());
846 }
847 }
848 }});
849
850 props2Impls.put("-fx-indent", new CssStyle[]{
851 new CssStyle("INDENT",
852 "-fx-indent: "
853 + "60;") {
854 @Override
855 public void decorate(Node control, Pane container) {
856 super.decorate(control, container);
857 control.getStyleClass().add("tree-indent");
858 }
859 }});
860 props2Impls.put("-fx-category-gap", new CssStyle[]{
861 new CssStyle("CATEGORY-GAP",
862 "-fx-category-gap: "
863 + "20;")});
864 props2Impls.put("-fx-end-margin", new CssStyle[]{
865 new CssStyle("END-MARGIN",
1008 new CssStyle("STRIKETHROUGH",
1009 "-fx-strikethrough: "
1010 + "true;") {
1011 @Override
1012 public void decorate(Node control, Pane container) {
1013 super.decorate(control, container);
1014 control.setStyle(control.getStyle() + ";-fx-font-family:Verdana;");
1015 }
1016 }});
1017 props2Impls.put("-fx-fill-height", new CssStyle[]{
1018 new CssStyle("FILL-HEIGHT",
1019 "-fx-fill-height: "
1020 + "true;") {
1021 @Override
1022 public void decorate(Node control, Pane container) {
1023 super.decorate(control, container);
1024 if (control instanceof HBox) {
1025 HBox box = (HBox) control;
1026 box.getChildren().clear();
1027 box.setStyle(box.getStyle() + "-fx-border-color:blue;");
1028 box.getChildren().add(PaneBuilder.create().children(new Rectangle(20, 20, Color.TRANSPARENT)).style("-fx-border-color:red;").build());
1029 }
1030 }
1031 }
1032 });
1033 props2Impls.put("-fx-size", new CssStyle[]{
1034 new CssStyle("SIZE",
1035 "-fx-size: "
1036 + "40;") {
1037 @Override
1038 public void decorate(Node control, Pane container) {
1039 super.decorate(control, container);
1040 control.getStyleClass().add("with-fx-size");
1041 }
1042 }});
1043
1044 props2Impls.put("-fx-translate-z", new CssStyle[]{
1045 new CssStyle("TRANSLATE-Z",
1046 "-fx-translate-z: "
1047 + "20;"){
1048
|
39 import javafx.geometry.Pos;
40 import javafx.geometry.Side;
41 import javafx.geometry.VPos;
42 import javafx.scene.Node;
43 import javafx.scene.chart.BarChart;
44 import javafx.scene.chart.XYChart;
45 import javafx.scene.control.ContentDisplay;
46 import javafx.scene.control.Control;
47 import javafx.scene.control.Labeled;
48 import javafx.scene.control.OverrunStyle;
49 import javafx.scene.control.PasswordField;
50 import javafx.scene.control.ScrollBar;
51 import javafx.scene.control.ScrollPane;
52 import javafx.scene.control.ScrollPane.ScrollBarPolicy;
53 import javafx.scene.control.TextField;
54 import javafx.scene.effect.BlurType;
55 import javafx.scene.effect.DropShadow;
56 import javafx.scene.effect.InnerShadow;
57 import javafx.scene.layout.HBox;
58 import javafx.scene.layout.Pane;
59 import javafx.scene.layout.Region;
60 import javafx.scene.layout.VBox;
61 import javafx.scene.paint.Color;
62 import javafx.scene.shape.Rectangle;
63 import javafx.scene.text.FontSmoothingType;
64 import javafx.scene.text.Text;
65 import javafx.scene.text.TextAlignment;
66 import javafx.scene.web.WebView;
67 import test.css.controls.styles.AlignmentCssStyle;
68 import test.css.controls.styles.AxisSideAlignmentCssStyle;
69 import test.css.controls.styles.BackgroundCssStyle;
70 import test.css.controls.styles.BorderCssStyle;
71 import test.css.controls.styles.BorderedCssStyle;
72 import test.css.controls.styles.CssStyle;
73 import test.css.controls.styles.FlowAlignmentCssStyle;
74 import test.css.controls.styles.FontSmoothingCssStyle;
75 import test.css.controls.styles.LegendSideAlignmentCssStyle;
76 import test.css.controls.styles.OverrunCssStyle;
77 import test.css.controls.styles.PageInformationAlignmentCssStyle;
78 import test.css.controls.styles.Style;
824 props2Impls.put("-fx-pref-tile-height", new CssStyle[]{
825 new CssStyle("PREF-TILE-HEIGHT",
826 "-fx-pref-tile-height: "
827 + "40;")});
828 props2Impls.put("-fx-tile-alignment", StyleArrayFactory.fromEnum(TileAlignmentCssStyle.class, "-fx-tile-alignment", Pos.values()));
829 props2Impls.put("-fx-spacing", new CssStyle[]{
830 new CssStyle("SPACING",
831 "-fx-spacing: "
832 + "15;")});
833 props2Impls.put("-fx-fill-width", new CssStyle[]{
834 new CssStyle("FILL-WIDTH",
835 "-fx-fill-width: "
836 + "true;") {
837 @Override
838 public void decorate(Node control, Pane container) {
839 super.decorate(control, container);
840 if (control instanceof VBox) {
841 VBox box = (VBox) control;
842 box.getChildren().clear();
843 box.setStyle(box.getStyle() + "-fx-border-color:blue;");
844 Pane temp = new Pane(new Rectangle(20, 20, Color.TRANSPARENT));
845 temp.setStyle("-fx-border-color:red;");
846 box.getChildren().add(temp);
847 }
848 }
849 }});
850
851 props2Impls.put("-fx-indent", new CssStyle[]{
852 new CssStyle("INDENT",
853 "-fx-indent: "
854 + "60;") {
855 @Override
856 public void decorate(Node control, Pane container) {
857 super.decorate(control, container);
858 control.getStyleClass().add("tree-indent");
859 }
860 }});
861 props2Impls.put("-fx-category-gap", new CssStyle[]{
862 new CssStyle("CATEGORY-GAP",
863 "-fx-category-gap: "
864 + "20;")});
865 props2Impls.put("-fx-end-margin", new CssStyle[]{
866 new CssStyle("END-MARGIN",
1009 new CssStyle("STRIKETHROUGH",
1010 "-fx-strikethrough: "
1011 + "true;") {
1012 @Override
1013 public void decorate(Node control, Pane container) {
1014 super.decorate(control, container);
1015 control.setStyle(control.getStyle() + ";-fx-font-family:Verdana;");
1016 }
1017 }});
1018 props2Impls.put("-fx-fill-height", new CssStyle[]{
1019 new CssStyle("FILL-HEIGHT",
1020 "-fx-fill-height: "
1021 + "true;") {
1022 @Override
1023 public void decorate(Node control, Pane container) {
1024 super.decorate(control, container);
1025 if (control instanceof HBox) {
1026 HBox box = (HBox) control;
1027 box.getChildren().clear();
1028 box.setStyle(box.getStyle() + "-fx-border-color:blue;");
1029 Pane temp = new Pane(new Rectangle(20, 20, Color.TRANSPARENT));
1030 temp.setStyle("-fx-border-color:red;");
1031 box.getChildren().add(temp);
1032 }
1033 }
1034 }
1035 });
1036 props2Impls.put("-fx-size", new CssStyle[]{
1037 new CssStyle("SIZE",
1038 "-fx-size: "
1039 + "40;") {
1040 @Override
1041 public void decorate(Node control, Pane container) {
1042 super.decorate(control, container);
1043 control.getStyleClass().add("with-fx-size");
1044 }
1045 }});
1046
1047 props2Impls.put("-fx-translate-z", new CssStyle[]{
1048 new CssStyle("TRANSLATE-Z",
1049 "-fx-translate-z: "
1050 + "20;"){
1051
|