no message
This commit is contained in:
parent
bd92c59240
commit
d6df066c19
|
|
@ -211,9 +211,7 @@ public class ExplosiveControl extends JPanel {
|
||||||
if (result == JFileChooser.APPROVE_OPTION) {
|
if (result == JFileChooser.APPROVE_OPTION) {
|
||||||
// 用户选择了文件
|
// 用户选择了文件
|
||||||
File selectedFile = fileChooser.getSelectedFile();
|
File selectedFile = fileChooser.getSelectedFile();
|
||||||
System.out.println("选择的文件: " + selectedFile.getAbsolutePath());
|
Drop.importDataMob(selectedFile.getAbsolutePath());
|
||||||
} else if (result == JFileChooser.CANCEL_OPTION) {
|
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -223,6 +221,43 @@ public class ExplosiveControl extends JPanel {
|
||||||
// 设置选择模式为只选择文件夹
|
// 设置选择模式为只选择文件夹
|
||||||
folderChooser.setFileSelectionMode(JFileChooser.DIRECTORIES_ONLY);
|
folderChooser.setFileSelectionMode(JFileChooser.DIRECTORIES_ONLY);
|
||||||
|
|
||||||
|
// 创建两个单选按钮
|
||||||
|
JRadioButton option1 = new JRadioButton("卡片");
|
||||||
|
JRadioButton option2 = new JRadioButton("怪物");
|
||||||
|
// 创建按钮组,确保单选效果
|
||||||
|
ButtonGroup buttonGroup = new ButtonGroup();
|
||||||
|
buttonGroup.add(option1);
|
||||||
|
buttonGroup.add(option2);
|
||||||
|
// 默认选中模式 1
|
||||||
|
option1.setSelected(true);
|
||||||
|
|
||||||
|
// 创建一个面板来放置单选按钮
|
||||||
|
JPanel optionPanel = new JPanel();
|
||||||
|
optionPanel.add(option1);
|
||||||
|
optionPanel.add(option2);
|
||||||
|
|
||||||
|
// 将面板添加到 JFileChooser 的底部
|
||||||
|
folderChooser.setAccessory(optionPanel);
|
||||||
|
|
||||||
|
// 显示文件夹选择对话框
|
||||||
|
int result = folderChooser.showOpenDialog(null);
|
||||||
|
|
||||||
|
// 处理用户的选择
|
||||||
|
if (result == JFileChooser.APPROVE_OPTION) {
|
||||||
|
// 用户选择了文件夹
|
||||||
|
File selectedFolder = folderChooser.getSelectedFile();
|
||||||
|
String selectedMode = option1.isSelected() ? "卡片" : "怪物";
|
||||||
|
// 调用你的导出数据方法
|
||||||
|
Drop.exportData(selectedFolder.getAbsolutePath() + "/独立爆率" + selectedMode + ".txt", selectedMode.equals("卡片") ? Drop.getKPS(): Drop.getMobBLs());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private void 全局爆率一键导出(ActionEvent e) {
|
||||||
|
// 创建 JFileChooser 实例
|
||||||
|
JFileChooser folderChooser = new JFileChooser();
|
||||||
|
// 设置选择模式为只选择文件夹
|
||||||
|
folderChooser.setFileSelectionMode(JFileChooser.DIRECTORIES_ONLY);
|
||||||
|
|
||||||
// 显示文件夹选择对话框
|
// 显示文件夹选择对话框
|
||||||
int result = folderChooser.showOpenDialog(null);
|
int result = folderChooser.showOpenDialog(null);
|
||||||
|
|
||||||
|
|
@ -230,9 +265,22 @@ public class ExplosiveControl extends JPanel {
|
||||||
if (result == JFileChooser.APPROVE_OPTION) {
|
if (result == JFileChooser.APPROVE_OPTION) {
|
||||||
// 用户选择了文件夹
|
// 用户选择了文件夹
|
||||||
File selectedFolder = folderChooser.getSelectedFile();
|
File selectedFolder = folderChooser.getSelectedFile();
|
||||||
System.out.println("选择的文件夹: " + selectedFolder.getAbsolutePath());
|
Drop.exportData(selectedFolder.getAbsolutePath().toString() + "/全局爆率.txt",Drop.getQQS());
|
||||||
} else if (result == JFileChooser.CANCEL_OPTION) {
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private void 全局爆率一键导入(ActionEvent e) {
|
||||||
|
// 创建 JFileChooser 实例
|
||||||
|
JFileChooser fileChooser = new JFileChooser();
|
||||||
|
|
||||||
|
// 显示文件选择对话框
|
||||||
|
int result = fileChooser.showOpenDialog(null);
|
||||||
|
|
||||||
|
// 处理用户的选择
|
||||||
|
if (result == JFileChooser.APPROVE_OPTION) {
|
||||||
|
// 用户选择了文件
|
||||||
|
File selectedFile = fileChooser.getSelectedFile();
|
||||||
|
Drop.importDataQQ(selectedFile.getAbsolutePath());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -526,8 +574,6 @@ public class ExplosiveControl extends JPanel {
|
||||||
|
|
||||||
//======== scrollPane1 ========
|
//======== scrollPane1 ========
|
||||||
{
|
{
|
||||||
scrollPane1.setHorizontalScrollBarPolicy(ScrollPaneConstants.HORIZONTAL_SCROLLBAR_NEVER);
|
|
||||||
scrollPane1.setVerticalScrollBarPolicy(ScrollPaneConstants.VERTICAL_SCROLLBAR_NEVER);
|
|
||||||
|
|
||||||
//---- table1 ----
|
//---- table1 ----
|
||||||
table1.setModel(new DefaultTableModel(
|
table1.setModel(new DefaultTableModel(
|
||||||
|
|
@ -548,14 +594,14 @@ public class ExplosiveControl extends JPanel {
|
||||||
{
|
{
|
||||||
TableColumnModel cm = table1.getColumnModel();
|
TableColumnModel cm = table1.getColumnModel();
|
||||||
cm.getColumn(0).setMaxWidth(50);
|
cm.getColumn(0).setMaxWidth(50);
|
||||||
cm.getColumn(1).setMinWidth(180);
|
cm.getColumn(1).setMinWidth(150);
|
||||||
}
|
}
|
||||||
scrollPane1.setViewportView(table1);
|
scrollPane1.setViewportView(table1);
|
||||||
}
|
}
|
||||||
panel6.add(scrollPane1);
|
panel6.add(scrollPane1);
|
||||||
}
|
}
|
||||||
add(panel6);
|
add(panel6);
|
||||||
panel6.setBounds(1080, 5, 420, 580);
|
panel6.setBounds(1080, 5, 410, 580);
|
||||||
|
|
||||||
//---- button1 ----
|
//---- button1 ----
|
||||||
button1.setText("\u65b0\u589e\u914d\u7f6e");
|
button1.setText("\u65b0\u589e\u914d\u7f6e");
|
||||||
|
|
@ -595,11 +641,13 @@ public class ExplosiveControl extends JPanel {
|
||||||
|
|
||||||
//---- button7 ----
|
//---- button7 ----
|
||||||
button7.setText("\u4e00\u952e\u5bfc\u5165");
|
button7.setText("\u4e00\u952e\u5bfc\u5165");
|
||||||
|
button7.addActionListener(e -> 全局爆率一键导入(e));
|
||||||
add(button7);
|
add(button7);
|
||||||
button7.setBounds(1290, 625, 95, 34);
|
button7.setBounds(1290, 625, 95, 34);
|
||||||
|
|
||||||
//---- button8 ----
|
//---- button8 ----
|
||||||
button8.setText("\u4e00\u952e\u5bfc\u51fa");
|
button8.setText("\u4e00\u952e\u5bfc\u51fa");
|
||||||
|
button8.addActionListener(e -> 全局爆率一键导出(e));
|
||||||
add(button8);
|
add(button8);
|
||||||
button8.setBounds(1395, 625, 95, 34);
|
button8.setBounds(1395, 625, 95, 34);
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -271,8 +271,6 @@ new FormModel {
|
||||||
"border": new javax.swing.border.TitledBorder( "全局爆率" )
|
"border": new javax.swing.border.TitledBorder( "全局爆率" )
|
||||||
add( new FormContainer( "javax.swing.JScrollPane", new FormLayoutManager( class javax.swing.JScrollPane ) ) {
|
add( new FormContainer( "javax.swing.JScrollPane", new FormLayoutManager( class javax.swing.JScrollPane ) ) {
|
||||||
name: "scrollPane1"
|
name: "scrollPane1"
|
||||||
"horizontalScrollBarPolicy": 31
|
|
||||||
"verticalScrollBarPolicy": 21
|
|
||||||
add( new FormComponent( "javax.swing.JTable" ) {
|
add( new FormComponent( "javax.swing.JTable" ) {
|
||||||
name: "table1"
|
name: "table1"
|
||||||
"model": new com.jformdesigner.model.SwingTableModel( new java.util.Vector, new java.util.Vector {
|
"model": new com.jformdesigner.model.SwingTableModel( new java.util.Vector, new java.util.Vector {
|
||||||
|
|
@ -292,14 +290,14 @@ new FormModel {
|
||||||
add( null )
|
add( null )
|
||||||
}, new java.util.Vector {
|
}, new java.util.Vector {
|
||||||
add( new com.jformdesigner.model.SwingTableColumn( null, 0, 0, 50, true ) )
|
add( new com.jformdesigner.model.SwingTableColumn( null, 0, 0, 50, true ) )
|
||||||
add( new com.jformdesigner.model.SwingTableColumn( null, 0, 180, 0, true ) )
|
add( new com.jformdesigner.model.SwingTableColumn( null, 0, 150, 0, true ) )
|
||||||
add( null )
|
add( null )
|
||||||
add( null )
|
add( null )
|
||||||
} )
|
} )
|
||||||
} )
|
} )
|
||||||
} )
|
} )
|
||||||
}, new FormLayoutConstraints( class com.jformdesigner.runtime.NullConstraints ) {
|
}, new FormLayoutConstraints( class com.jformdesigner.runtime.NullConstraints ) {
|
||||||
"width": 420
|
"width": 410
|
||||||
"height": 580
|
"height": 580
|
||||||
"x": 1080
|
"x": 1080
|
||||||
"y": 5
|
"y": 5
|
||||||
|
|
@ -366,6 +364,7 @@ new FormModel {
|
||||||
add( new FormComponent( "javax.swing.JButton" ) {
|
add( new FormComponent( "javax.swing.JButton" ) {
|
||||||
name: "button7"
|
name: "button7"
|
||||||
"text": "一键导入"
|
"text": "一键导入"
|
||||||
|
addEvent( new FormEvent( "java.awt.event.ActionListener", "actionPerformed", "全局爆率一键导入", true ) )
|
||||||
}, new FormLayoutConstraints( class com.jformdesigner.runtime.NullConstraints ) {
|
}, new FormLayoutConstraints( class com.jformdesigner.runtime.NullConstraints ) {
|
||||||
"width": 95
|
"width": 95
|
||||||
"height": 34
|
"height": 34
|
||||||
|
|
@ -375,6 +374,7 @@ new FormModel {
|
||||||
add( new FormComponent( "javax.swing.JButton" ) {
|
add( new FormComponent( "javax.swing.JButton" ) {
|
||||||
name: "button8"
|
name: "button8"
|
||||||
"text": "一键导出"
|
"text": "一键导出"
|
||||||
|
addEvent( new FormEvent( "java.awt.event.ActionListener", "actionPerformed", "全局爆率一键导出", true ) )
|
||||||
}, new FormLayoutConstraints( class com.jformdesigner.runtime.NullConstraints ) {
|
}, new FormLayoutConstraints( class com.jformdesigner.runtime.NullConstraints ) {
|
||||||
"width": 95
|
"width": 95
|
||||||
"height": 34
|
"height": 34
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue