Skip to content

Commit 84bcbbc

Browse files
committed
1.优化部分警告代码
1 parent e2aac6a commit 84bcbbc

4 files changed

Lines changed: 19 additions & 9 deletions

File tree

javaFxTools/x-ShowSystemInfo/src/main/java/com/xwintop/xJavaFxTool/services/javaFxTools/ShowSystemInfoService.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ public void showOverviewCpuLineChart() {
4444
series[i] = new XYChart.Series();
4545
series[i].setName("第" + (i + 1) + "块CPU信息");
4646
}
47-
showSystemInfoController.getOverviewCpuLineChart().getData().addAll(series);
47+
showSystemInfoController.getOverviewCpuLineChart().getData().addAll(new Object[]{series});
4848
showSystemInfoController.getOverviewCpuLineChart().getXAxis().setTickLabelsVisible(false);
4949
showSystemInfoController.getOverviewCpuLineChart().getYAxis().setMaxHeight(1);
5050
Timer timer = new Timer();
@@ -116,7 +116,7 @@ public void showOverviewDiskLineChart() {
116116
series[i * 2 + 1] = new XYChart.Series();
117117
series[i * 2 + 1].setName("磁盘:" + i + "writes");
118118
}
119-
showSystemInfoController.getOverviewDiskLineChart().getData().addAll(series);
119+
showSystemInfoController.getOverviewDiskLineChart().getData().addAll(new Object[]{series});
120120
showSystemInfoController.getOverviewDiskLineChart().getXAxis().setTickLabelsVisible(false);
121121
Timer timer = new Timer();
122122
timerList.add(timer);

littleTools/x-FileCopy/src/main/java/com/xwintop/xJavaFxTool/controller/littleTools/FileCopyController.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@
2222
import javafx.scene.control.cell.TextFieldTableCell;
2323
import javafx.scene.input.MouseButton;
2424
import lombok.Data;
25+
import lombok.EqualsAndHashCode;
2526
import lombok.extern.slf4j.Slf4j;
2627

2728
import java.io.File;
@@ -36,6 +37,7 @@
3637
*/
3738
@Slf4j
3839
@Data
40+
@EqualsAndHashCode(callSuper=false)
3941
public class FileCopyController extends FileCopyView {
4042
private FileCopyService fileCopyService = new FileCopyService(this);
4143
private ObservableList<FileCopyTableBean> tableData = FXCollections.observableArrayList();

xJavaFxTool/build.gradle

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ plugins {
22
// id "org.beryx.jlink" version "2.26.0"
33
id 'org.beryx.runtime' version '1.12.7'
44
id "org.openjfx.javafxplugin" version "0.1.0"
5+
id "com.gluonhq.gluonfx-gradle-plugin" version "1.0.22"
56
}
67

78
dependencies {

xcore/src/main/java/com/xwintop/xcore/util/javafx/AlertUtil.java

Lines changed: 14 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -26,16 +26,18 @@ public class AlertUtil {
2626

2727
/**
2828
* 信息提示框
29-
* @deprecated 使用 {@link com.xwintop.xcore.javafx.dialog.FxAlerts}
29+
* 使用 {@link com.xwintop.xcore.javafx.dialog.FxAlerts}
3030
*/
31+
@Deprecated
3132
public static void showInfoAlert(String message) {
3233
showInfoAlert("提示", message);
3334
}
3435

3536
/**
3637
* 信息提示框
37-
* @deprecated 使用 {@link com.xwintop.xcore.javafx.dialog.FxAlerts}
38+
* 使用 {@link com.xwintop.xcore.javafx.dialog.FxAlerts}
3839
*/
40+
@Deprecated
3941
public static void showInfoAlert(String title, String message) {
4042
new FxDialog<>()
4143
.setOwner(FxApp.primaryStage)
@@ -48,32 +50,36 @@ public static void showInfoAlert(String title, String message) {
4850

4951
/**
5052
* 确定提示框
51-
* @deprecated 使用 {@link com.xwintop.xcore.javafx.dialog.FxAlerts}
53+
* 使用 {@link com.xwintop.xcore.javafx.dialog.FxAlerts}
5254
*/
55+
@Deprecated
5356
public static boolean confirmYesNo(String title, String message) {
5457
return confirm(title, message, ButtonType.YES, ButtonType.NO) == ButtonType.YES;
5558
}
5659

5760
/**
5861
* 确定提示框
59-
* @deprecated 使用 {@link com.xwintop.xcore.javafx.dialog.FxAlerts}
62+
* 使用 {@link com.xwintop.xcore.javafx.dialog.FxAlerts}
6063
*/
64+
@Deprecated
6165
public static boolean confirmOkCancel(String title, String message) {
6266
return confirm(title, message, ButtonType.OK, ButtonType.CANCEL) == ButtonType.OK;
6367
}
6468

6569
/**
6670
* 确定提示框
67-
* @deprecated 使用 {@link com.xwintop.xcore.javafx.dialog.FxAlerts}
71+
* 使用 {@link com.xwintop.xcore.javafx.dialog.FxAlerts}
6872
*/
73+
@Deprecated
6974
public static ButtonType confirmYesNoCancel(String title, String message) {
7075
return confirm(title, message, ButtonType.YES, ButtonType.NO, ButtonType.CANCEL);
7176
}
7277

7378
/**
7479
* 确定提示框
75-
* @deprecated 使用 {@link com.xwintop.xcore.javafx.dialog.FxAlerts}
80+
* 使用 {@link com.xwintop.xcore.javafx.dialog.FxAlerts}
7681
*/
82+
@Deprecated
7783
public static ButtonType confirm(
7884
String title, String message, ButtonType positiveButtonType, ButtonType... negativeButtonTypes
7985
) {
@@ -143,8 +149,9 @@ public static String showInputAlertDefaultValue(String message, String defaultVa
143149
//////////////////////////////////////////////////////////////
144150

145151
/**
146-
* @deprecated 使用 {@link com.xwintop.xcore.javafx.dialog.FxAlerts}
152+
* 使用 {@link com.xwintop.xcore.javafx.dialog.FxAlerts}
147153
*/
154+
@Deprecated
148155
public static boolean showConfirmAlert(String message) {
149156
VBox vBox = new VBox(15);
150157
vBox.setAlignment(Pos.CENTER);

0 commit comments

Comments
 (0)