From 81f02278deedd9e456bff16697e512bfe734d0fb Mon Sep 17 00:00:00 2001 From: "youhong.ai" Date: Tue, 11 Jul 2023 17:19:30 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96=E8=BE=93=E5=87=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/test/java/BuilderPackageEcology.java | 49 ++++- src/test/resources/cf-colors.css | 13 ++ src/test/resources/icons/class.png | Bin 0 -> 487 bytes src/test/resources/icons/code.png | Bin 0 -> 400 bytes src/test/resources/icons/file.png | Bin 14116 -> 286 bytes src/test/resources/icons/folder.png | Bin 13998 -> 289 bytes src/test/resources/icons/jar.png | Bin 0 -> 413 bytes src/test/resources/style.css | 263 ++++++++++++++++++++++- 8 files changed, 312 insertions(+), 13 deletions(-) create mode 100644 src/test/resources/cf-colors.css create mode 100644 src/test/resources/icons/class.png create mode 100644 src/test/resources/icons/code.png create mode 100644 src/test/resources/icons/jar.png diff --git a/src/test/java/BuilderPackageEcology.java b/src/test/java/BuilderPackageEcology.java index fc9c4e8..5dab3d7 100644 --- a/src/test/java/BuilderPackageEcology.java +++ b/src/test/java/BuilderPackageEcology.java @@ -6,11 +6,14 @@ import builderpackage.FileTreeBuilder; import javafx.application.Application; import javafx.geometry.Insets; import javafx.geometry.Pos; +import javafx.scene.Cursor; +import javafx.scene.Node; import javafx.scene.Scene; import javafx.scene.control.Button; import javafx.scene.control.Label; import javafx.scene.control.TextField; import javafx.scene.control.*; +import javafx.scene.image.ImageView; import javafx.scene.layout.BorderPane; import javafx.scene.layout.HBox; import javafx.scene.layout.VBox; @@ -36,6 +39,7 @@ public class BuilderPackageEcology extends Application { private TextField packageNumberTextField; private TextField functionNameTextField; + @Override public void start(Stage primaryStage) { primaryStage.setTitle("EBU7部开发一部自动打包工具"); @@ -80,6 +84,10 @@ public class BuilderPackageEcology extends Application { Date date = new Date(); param.put("date", simpleDateFormat.format(date)); Button button = new Button("生成升级包"); + button.setId("create-btn"); + button.setCursor(Cursor.HAND); + button.getStyleClass().add("but"); + button.getStyleClass().add("primary"); button.setOnAction(event -> { // 输出包编号和功能名称的值 String packageNumber = packageNumberTextField.getText(); @@ -136,10 +144,11 @@ public class BuilderPackageEcology extends Application { checkBoxBox.setAlignment(Pos.CENTER_RIGHT); CheckBox checkBox = new CheckBox("是否是信创环境"); + checkBox.setCursor(Cursor.HAND); + checkBox.getStyleClass().add("check-box"); checkBox.selectedProperty().addListener((observable, oldValue, newValue) -> { this.isEcology = newValue; }); - checkBoxBox.getChildren().add(checkBox); @@ -148,7 +157,7 @@ public class BuilderPackageEcology extends Application { Scene scene = new Scene(root, 600, 400); - scene.getStylesheets().add("style.css"); // 加载自定义的 CSS 文件 + scene.getStylesheets().add(getClass().getResource("style.css").toExternalForm()); // 加载自定义的 CSS 文件 scene.getRoot().setStyle("-fx-font-family: 'serif'"); primaryStage.setScene(scene); primaryStage.show(); @@ -202,10 +211,11 @@ public class BuilderPackageEcology extends Application { public CheckBoxTreeCell() { checkBox = new CheckBox(); + checkBox.getStyleClass().add("check-box"); checkBox.selectedProperty().addListener((observable, oldValue, newValue) -> { - FileInfo fileInfo = getItem(); - fileInfo.setSelected(newValue); - String filePath = fileInfo.getFilePath(); + FileInfo item = getItem(); + item.setSelected(newValue); + String filePath = item.getFilePath(); if (newValue) { if (!filePaths.contains(filePath)) { filePaths.add(filePath); @@ -225,6 +235,35 @@ public class BuilderPackageEcology extends Application { } else { checkBox.setSelected(item.isSelected()); checkBox.setText(item.getFileName().replace("_", "__")); + if (item.isDirectory()) { + Node rootIcon = new ImageView( + new javafx.scene.image.Image(Objects.requireNonNull(getClass().getResourceAsStream("icons/folder.png"))) + );// 定义一个图片类型节点对象 + + checkBox.setGraphic(rootIcon); + } else if (item.getFileName().endsWith(".jar")) { + Node fileIcon = new ImageView( + new javafx.scene.image.Image(Objects.requireNonNull(getClass().getResourceAsStream("icons/jar.png"))) + ); + checkBox.setGraphic(fileIcon); + } else if (item.getFileName().endsWith(".class")) { + Node fileIcon = new ImageView( + new javafx.scene.image.Image(Objects.requireNonNull(getClass().getResourceAsStream("icons/class.png"))) + ); + checkBox.setGraphic(fileIcon); + } else if (item.getFileName().endsWith(".properties")) { + Node fileIcon = new ImageView( + new javafx.scene.image.Image(Objects.requireNonNull(getClass().getResourceAsStream("icons/code.png"))) + ); + checkBox.setGraphic(fileIcon); + } else { + Node fileIcon = new ImageView( + new javafx.scene.image.Image(Objects.requireNonNull(getClass().getResourceAsStream("icons/file.png"))) + ); + checkBox.setGraphic(fileIcon); + } + checkBox.setCursor(Cursor.HAND); + checkBox.setId("tree-checkbox"); setGraphic(checkBox); // setGraphic(folderIcon); } diff --git a/src/test/resources/cf-colors.css b/src/test/resources/cf-colors.css new file mode 100644 index 0000000..09e7599 --- /dev/null +++ b/src/test/resources/cf-colors.css @@ -0,0 +1,13 @@ +/*颜色*/ + +* { + -primary-color: #6690FF; + -success-color: #33C651; + -info-color: #52A8F9; + -warn-color: #FFA10A; + -danger-color: #FF4C3F; + + -text-color: #303133; + -border-color: #CDD0D6; + -base-color: #F2F3F5; +} \ No newline at end of file diff --git a/src/test/resources/icons/class.png b/src/test/resources/icons/class.png new file mode 100644 index 0000000000000000000000000000000000000000..97352ea11161386703708c28b900e051bb3c384c GIT binary patch literal 487 zcmVPx$p-DtRR7gv`mQ79qK@f#s8RY_V0obr+>xLf_cd+mTCZ1!662`qJF!2nyGZBW3 zcVGh-mK|MxLU<+PSv?*jj$lbsY>RXH!688sggP4TuJto_bpaISN1zT#%yyE{Hb(Fr#Sj zKGTFaNJV32iQHpV$;uLKJZSN8Y05k2+oTVs3GONMq!!6zCA1H;b13mx%002ovPDHLkV1mS_*j@kt literal 0 HcmV?d00001 diff --git a/src/test/resources/icons/code.png b/src/test/resources/icons/code.png new file mode 100644 index 0000000000000000000000000000000000000000..275b427598f87b573eac5c3df9f71cfa85a124fd GIT binary patch literal 400 zcmV;B0dM|^P)Px$N=ZaPR7gu>WEcRz2(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ALO(nN~`O^oK}jC-{gw};L2R2~1y_k6WY z4m?O=7b<@@?M=3RC9xp2Fy>D&kI`Vtl9{O6CfM^J)Sv+p<*mnm0wq}ov`S^(xc4%P)Px$S4l)cR7gv`R0(pzFbrJ5!xA1-3a==<5J6Jga^Te*L{@oQRNzE0a^&3X z;JMhUSar3ES`z%L=X!fm|4bMNlkcS~<|Woe1-a5Rf9>K@l5? z$n`)r$!U37KRk7F=o3@J{pLn9u(+wx00aw_HL#j;eZjRG$=kOXZw!Rx00000NkvXX Hu0mjf-XX7M literal 0 HcmV?d00001 diff --git a/src/test/resources/style.css b/src/test/resources/style.css index d154fc6..1d86afe 100644 --- a/src/test/resources/style.css +++ b/src/test/resources/style.css @@ -1,22 +1,24 @@ +@import "cf-colors.css"; + + .tree-view { -fx-padding: 10px; + -fx-alignment: center; } .tree-cell { - -fx-padding: 5px; + -fx-padding: 6px; + -fx-font-size: 14px; } -.tree-cell .tree-disclosure-node { - -fx-graphic: url("icons/folder.png"); +.tree-cell.expanded { + -fx-alignment: center; } -.tree-cell .tree-disclosure-node.expanded { - -fx-graphic: url("icons/folder.png"); +.tree-cell:selected { + -fx-background-color: -primary-color; } -.tree-cell .tree-leaf { - -fx-graphic: url("icons/file.png"); -} .button-box { -fx-spacing: 10px; @@ -26,3 +28,248 @@ .checkbox-label { -fx-padding: 0 0 0 5px; } + + +.check-box { + -fx-cursor: hand; +} + +.check-box { + -fx-pref-height: 32px; +} + +.check-box .box { + -fx-pref-height: 16px; + -fx-pref-width: 16px; + -fx-border-radius: 3px; + -fx-border-color: -border-color; + -fx-background-color: transparent; + -fx-background-radius: 3px; +} + +.check-box .box .mark { + -fx-background-color: rgb(255, 255, 255); + -fx-background-insets: 3px 2px; + -fx-shape: "M369.792 704.32L930.304 128 1024 223.616 369.984 896l-20.288-20.864-0.128 0.128L0 516.8 96.128 423.68l273.664 280.64z"; +} + +.check-box .container { + -fx-text-fill: -text-color; + -fx-font-size: 14px; +} + +.check-box:focused { + -fx-border-color: -primary-color; +} + +.check-box:selected { + -fx-text-fill: -primary-color; +} + +.check-box:selected .box { + -fx-border-color: -primary-color; + -fx-background-color: -primary-color; +} + + +.but { + -fx-background-insets: 0; + -fx-border-radius: 3px; + /*-fx-border-color: transparent;*/ + -fx-background-radius: 3px; + -fx-pref-height: 32px; + /*-fx-min-height: 32px;*/ + -fx-padding: 0px 15px 0px 15px; + -fx-font-size: 14px; + -fx-font-weight: 500; + -fx-text-fill: rgb(255, 255, 255); + -fx-cursor: hand; +} + +.but > .ikonli-font-icon { + -fx-icon-size: 17px; + -fx-icon-color: rgb(255, 255, 255); +} + +.but.primary { + -fx-background-color: -primary-color; +} + +.but.success { + -fx-background-color: -success-color; +} + +.but.info { + -fx-background-color: -info-color; +} + +.but.warn { + -fx-background-color: -warn-color; +} + +.but.danger { + -fx-background-color: -danger-color; +} + +/*hover:*/ /*focused:*/ +.but.primary:hover, .but.primary:focused { + -fx-background-color: derive(-primary-color, 30%); +} + +.but.success:hover, .but.success:focused { + -fx-background-color: derive(-success-color, 30%); +} + +.but.info:hover, .but.info:focused { + -fx-background-color: derive(-info-color, 30%); +} + +.but.warn:hover, .but.warn:focused { + -fx-background-color: derive(-warn-color, 30%); +} + +.but.danger:hover, .but.danger:focused { + -fx-background-color: derive(-danger-color, 30%); +} + +/*pressed:*/ +.but.primary:pressed { + -fx-background-color: derive(-primary-color, -10%); +} + +.but.success:pressed { + -fx-background-color: derive(-success-color, -10%); +} + +.but.info:pressed { + -fx-background-color: derive(-info-color, -10%); +} + +.but.warn:pressed { + -fx-background-color: derive(-warn-color, -10%); +} + +.but.danger:pressed { + -fx-background-color: derive(-danger-color, -10%); +} + +/*圆角按钮*/ +.but.round { + -fx-border-radius: 16px; + -fx-background-radius: 16px; +} + +/*朴素按钮*/ +.but.plain, .but.plain:focused { + -fx-background-color: transparent; +} + +.but.primary.plain { + -fx-border-color: -primary-color; + -fx-text-fill: -primary-color; +} + +.but.success.plain { + -fx-border-color: -success-color; + -fx-text-fill: -success-color; +} + +.but.info.plain { + -fx-border-color: -info-color; + -fx-text-fill: -info-color; +} + +.but.warn.plain { + -fx-border-color: -warn-color; + -fx-text-fill: -warn-color; +} + +.but.danger.plain { + -fx-border-color: -danger-color; + -fx-text-fill: -danger-color; +} + +.but.primary.plain > .ikonli-font-icon { + -fx-icon-color: -primary-color; +} + +.but.success.plain > .ikonli-font-icon { + -fx-icon-color: -success-color; +} + +.but.info.plain > .ikonli-font-icon { + -fx-icon-color: -info-color; +} + +.but.warn.plain > .ikonli-font-icon { + -fx-icon-color: -warn-color; +} + +.but.danger.plain > .ikonli-font-icon { + -fx-icon-color: -danger-color; +} + +.but.primary.plain:hover > .ikonli-font-icon { + -fx-icon-color: rgb(255, 255, 255); +} + +.but.success.plain:hover > .ikonli-font-icon { + -fx-icon-color: rgb(255, 255, 255); +} + +.but.info.plain:hover > .ikonli-font-icon { + -fx-icon-color: rgb(255, 255, 255); +} + +.but.warn.plain:hover > .ikonli-font-icon { + -fx-icon-color: rgb(255, 255, 255); +} + +.but.danger.plain:hover > .ikonli-font-icon { + -fx-icon-color: rgb(255, 255, 255); +} + +.but.primary.plain:hover { + -fx-background-color: -primary-color; + -fx-text-fill: rgb(255, 255, 255); +} + +.but.success.plain:hover { + -fx-background-color: -success-color; + -fx-text-fill: rgb(255, 255, 255); +} + +.but.info.plain:hover { + -fx-background-color: -info-color; + -fx-text-fill: rgb(255, 255, 255); +} + +.but.warn.plain:hover { + -fx-background-color: -warn-color; + -fx-text-fill: rgb(255, 255, 255); +} + +.but.danger.plain:hover { + -fx-background-color: -danger-color; + -fx-text-fill: rgb(255, 255, 255); +} + +.but.primary.plain:pressed { + -fx-background-color: derive(-primary-color, -10%); +} + +.but.success.plain:pressed { + -fx-background-color: derive(-success-color, -10%); +} + +.but.info.plain:pressed { + -fx-background-color: derive(-info-color, -10%); +} + +.but.warn.plain:pressed { + -fx-background-color: derive(-warn-color, -10%); +} + +.but.danger.plain:pressed { + -fx-background-color: derive(-danger-color, -10%); +} \ No newline at end of file