This commit is contained in:
Lenheart 2025-04-04 19:00:10 +08:00
parent fef0f8e973
commit 036b83cc2c
10 changed files with 1494 additions and 5 deletions

1
.gitignore vendored
View File

@ -5,3 +5,4 @@ MXD-Server.iml
配置文件/经验倍数.ini
配置文件/捉鬼任务.ini
配置文件/坐骑椅子.ini
src.zip

View File

@ -0,0 +1,152 @@
/*
* Created by JFormDesigner on Fri Apr 04 18:03:27 CST 2025
*/
package gui.UI_LenheartUI;
import java.awt.event.*;
import gui.Start;
import gui.tw.AotuNpc;
import gui.tw.diaoyu.DiaoYuMap;
import gui.特殊控制台;
import java.awt.*;
import java.util.List;
import javax.swing.*;
import javax.swing.table.*;
/**
* @author dongj
*/
public class AutoScriptNpc extends JPanel {
public AutoScriptNpc() {
initComponents();
}
private void 新增按钮(ActionEvent e) {
DefaultTableModel tableModel = (DefaultTableModel)this.table1.getModel();
Object[] rowData = {0, 0 ,0,0,0,0};
tableModel.addRow(rowData);
}
private void 删除按钮(ActionEvent e) {
int selectedRow = table1.getSelectedRow();
if (selectedRow != -1) {
DefaultTableModel tableModel = (DefaultTableModel) table1.getModel();
tableModel.removeRow(selectedRow);
if(tableModel.getRowCount() > selectedRow)table1.setRowSelectionInterval(selectedRow, selectedRow);
}
}
private void 保存按钮(ActionEvent e) {
DefaultTableModel tableModel = (DefaultTableModel) table1.getModel();
// 清空原有的数据列表
Start.aotuNpcs.clear();
// 遍历表格的每一行
for (int i = 0; i < tableModel.getRowCount(); i++) {
AotuNpc aotuNpc = new AotuNpc();
// 从表格中获取数据并设置到对象中
aotuNpc.setMapId(Integer.parseInt(tableModel.getValueAt(i, 0).toString()));
aotuNpc.setNpcId(Integer.parseInt(tableModel.getValueAt(i, 1).toString()));
aotuNpc.setScriptsName(tableModel.getValueAt(i, 2).toString());
aotuNpc.setItemId(Integer.parseInt(tableModel.getValueAt(i, 3).toString()));
aotuNpc.setItemNum(Integer.parseInt(tableModel.getValueAt(i, 4).toString()));
aotuNpc.setEquId(Integer.parseInt(tableModel.getValueAt(i, 5).toString()));
// 将对象添加到列表中
Start.aotuNpcs.add(aotuNpc);
}
特殊控制台.setTwConfig();
}
private void initComponents() {
// JFormDesigner - Component initialization - DO NOT MODIFY //GEN-BEGIN:initComponents @formatter:off
scrollPane1 = new JScrollPane();
table1 = new JTable();
button1 = new JButton();
button2 = new JButton();
button3 = new JButton();
//======== this ========
setLayout(null);
//======== scrollPane1 ========
{
//---- table1 ----
table1.setModel(new DefaultTableModel(
new Object[][] {
{null, null, null, null, null, null},
{null, null, null, null, null, null},
},
new String[] {
"\u5730\u56feID", "NPC_ID", "\u811a\u672c\u540d\u5b57", "\u9053\u5177ID", "\u9053\u5177\u6570\u91cf", "\u88c5\u5907ID"
}
));
scrollPane1.setViewportView(table1);
}
add(scrollPane1);
scrollPane1.setBounds(10, 20, 1285, scrollPane1.getPreferredSize().height);
//---- button1 ----
button1.setText("\u65b0\u589e");
button1.addActionListener(e -> 新增按钮(e));
add(button1);
button1.setBounds(15, 465, 170, button1.getPreferredSize().height);
//---- button2 ----
button2.setText("\u5220\u9664");
button2.addActionListener(e -> 删除按钮(e));
add(button2);
button2.setBounds(242, 465, 170, 34);
//---- button3 ----
button3.setText("\u4fdd\u5b58");
button3.addActionListener(e -> 保存按钮(e));
add(button3);
button3.setBounds(469, 465, 170, 34);
{
// compute preferred size
Dimension preferredSize = new Dimension();
for(int i = 0; i < getComponentCount(); i++) {
Rectangle bounds = getComponent(i).getBounds();
preferredSize.width = Math.max(bounds.x + bounds.width, preferredSize.width);
preferredSize.height = Math.max(bounds.y + bounds.height, preferredSize.height);
}
Insets insets = getInsets();
preferredSize.width += insets.right;
preferredSize.height += insets.bottom;
setMinimumSize(preferredSize);
setPreferredSize(preferredSize);
}
// JFormDesigner - End of component initialization //GEN-END:initComponents @formatter:on
DefaultTableModel tableModel = (DefaultTableModel)this.table1.getModel();
tableModel.setRowCount(0);
// 创建一个自定义的单元格渲染器用于右对齐字符串
DefaultTableCellRenderer rightRenderer = new DefaultTableCellRenderer();
rightRenderer.setHorizontalAlignment(JLabel.RIGHT);
// 遍历表格的所有列将字符串类型的列设置为右对齐
for (int i = 0; i < table1.getColumnCount(); i++) {
if (table1.getColumnClass(i) == String.class) {
table1.getColumnModel().getColumn(i).setCellRenderer(rightRenderer);
}
}
for (AotuNpc aotuNpc : Start.aotuNpcs) {
Object[] rowData = {aotuNpc.getMapId(), aotuNpc.getNpcId() ,aotuNpc.getScriptsName(),aotuNpc.getItemId(),aotuNpc.getItemNum(),aotuNpc.getEquId()};
tableModel.addRow(rowData);
}
}
// JFormDesigner - Variables declaration - DO NOT MODIFY //GEN-BEGIN:variables @formatter:off
private JScrollPane scrollPane1;
private JTable table1;
private JButton button1;
private JButton button2;
private JButton button3;
// JFormDesigner - End of variables declaration //GEN-END:variables @formatter:on
}

View File

@ -0,0 +1,98 @@
JFDML JFormDesigner: "9.0.0.0.352" Java: "21.0.6" encoding: "UTF-8"
new FormModel {
contentType: "form/swing"
root: new FormRoot {
add( new FormContainer( "javax.swing.JPanel", new FormLayoutManager( class com.jformdesigner.runtime.NullLayout ) ) {
name: "this"
add( new FormContainer( "javax.swing.JScrollPane", new FormLayoutManager( class javax.swing.JScrollPane ) ) {
name: "scrollPane1"
add( new FormComponent( "javax.swing.JTable" ) {
name: "table1"
"model": new com.jformdesigner.model.SwingTableModel( new java.util.Vector {
add( new java.util.Vector {
add( null )
add( null )
add( null )
add( null )
add( null )
add( null )
} )
add( new java.util.Vector {
add( null )
add( null )
add( null )
add( null )
add( null )
add( null )
} )
}, new java.util.Vector {
add( "地图ID" )
add( "NPC_ID" )
add( "脚本名字" )
add( "道具ID" )
add( "道具数量" )
add( "装备ID" )
}, new java.util.Vector {
add( null )
add( null )
add( null )
add( null )
add( null )
add( null )
}, new java.util.Vector {
add( null )
add( null )
add( null )
add( null )
add( null )
add( null )
}, new java.util.Vector {
add( null )
add( null )
add( null )
add( null )
add( null )
add( null )
} )
} )
}, new FormLayoutConstraints( class com.jformdesigner.runtime.NullConstraints ) {
"x": 10
"y": 20
"width": 1285
} )
add( new FormComponent( "javax.swing.JButton" ) {
name: "button1"
"text": "新增"
addEvent( new FormEvent( "java.awt.event.ActionListener", "actionPerformed", "新增按钮", true ) )
}, new FormLayoutConstraints( class com.jformdesigner.runtime.NullConstraints ) {
"x": 15
"y": 465
"width": 170
} )
add( new FormComponent( "javax.swing.JButton" ) {
name: "button2"
"text": "删除"
addEvent( new FormEvent( "java.awt.event.ActionListener", "actionPerformed", "删除按钮", true ) )
}, new FormLayoutConstraints( class com.jformdesigner.runtime.NullConstraints ) {
"width": 170
"height": 34
"x": 242
"y": 465
} )
add( new FormComponent( "javax.swing.JButton" ) {
name: "button3"
"text": "保存"
addEvent( new FormEvent( "java.awt.event.ActionListener", "actionPerformed", "保存按钮", true ) )
}, new FormLayoutConstraints( class com.jformdesigner.runtime.NullConstraints ) {
"width": 170
"height": 34
"x": 469
"y": 465
} )
}, new FormLayoutConstraints( null ) {
"location": new java.awt.Point( 0, 0 )
"size": new java.awt.Dimension( 1315, 625 )
} )
}
}

View File

@ -40,8 +40,9 @@ public class DropControl extends JPanel {
Integer ItemId = (int) tableModel.getValueAt(i, 0);
Integer GoldRate = (int) tableModel.getValueAt(i, 1);
Integer ItemRate = (int) tableModel.getValueAt(i, 2);
String Time = tableModel.getValueAt(i, 3) + "-" + tableModel.getValueAt(i, 4);
Integer IsStack = (int) tableModel.getValueAt(i, 5);
Integer ExpRate = (int) tableModel.getValueAt(i, 3);
String Time = tableModel.getValueAt(i, 4) + "-" + tableModel.getValueAt(i, 5);
Integer IsStack = (int) tableModel.getValueAt(i, 6);
BlConfig buffer = new BlConfig();
buffer.setItem_id(ItemId);
@ -102,11 +103,11 @@ public class DropControl extends JPanel {
new Object[][] {
},
new String[] {
"\u9053\u5177\u4ee3\u7801", "\u91d1\u5e01\u7206\u7387", "\u7269\u54c1\u7206\u7387", "\u5f00\u59cb\u65f6\u95f4", "\u7ed3\u675f\u65f6\u95f4", "\u5355\u7269\u54c1\u6570\u91cf\u5806\u53e0"
"\u9053\u5177\u4ee3\u7801", "\u91d1\u5e01\u7206\u7387", "\u7269\u54c1\u7206\u7387", "\u591a\u500d\u7ecf\u9a8c", "\u5f00\u59cb\u65f6\u95f4", "\u7ed3\u675f\u65f6\u95f4", "\u5355\u7269\u54c1\u6570\u91cf\u5806\u53e0"
}
) {
Class<?>[] columnTypes = new Class<?>[] {
Integer.class, Integer.class, Integer.class, String.class, String.class, Integer.class
Integer.class, Integer.class, Integer.class, Integer.class, String.class, String.class, Integer.class
};
@Override
public Class<?> getColumnClass(int columnIndex) {
@ -226,11 +227,12 @@ public class DropControl extends JPanel {
Integer ItemId = obj.getItem_id();
Integer GoldRate = obj.getGold_rate();
Integer ItemRate = obj.getItem_rate();
Integer ExpRate = obj.getExp_rate();
String Time = obj.getTime_range();
Integer IsStack = obj.getStackableNum();
String[] split = Time.split("-");
Object[] rowData = {ItemId, GoldRate ,ItemRate,split[0],split[1], IsStack};
Object[] rowData = {ItemId, GoldRate ,ItemRate,ExpRate ,split[0],split[1], IsStack};
tableModel.addRow(rowData);
});

View File

@ -13,6 +13,7 @@ new FormModel {
add( "道具代码" )
add( "金币爆率" )
add( "物品爆率" )
add( "多倍经验" )
add( "开始时间" )
add( "结束时间" )
add( "单物品数量堆叠" )
@ -20,6 +21,7 @@ new FormModel {
add( class java.lang.Integer )
add( class java.lang.Integer )
add( class java.lang.Integer )
add( class java.lang.Integer )
add( class java.lang.String )
add( class java.lang.String )
add( class java.lang.Integer )
@ -30,6 +32,7 @@ new FormModel {
add( null )
add( null )
add( null )
add( null )
}, new java.util.Vector {
add( null )
add( null )
@ -37,6 +40,7 @@ new FormModel {
add( null )
add( null )
add( null )
add( null )
} )
} )
}, new FormLayoutConstraints( class com.jformdesigner.runtime.NullConstraints ) {

View File

@ -0,0 +1,588 @@
/*
* Created by JFormDesigner on Fri Apr 04 16:38:34 CST 2025
*/
package gui.UI_LenheartUI;
import java.awt.event.*;
import java.beans.*;
import gui.Start;
import gui.tw.diaoyu.BL;
import gui.tw.diaoyu.DiaoYuMap;
import gui.tw.diaoyu.DiaoyuItem;
import gui.特殊控制台;
import java.awt.*;
import java.util.ArrayList;
import java.util.List;
import java.util.Objects;
import javax.swing.*;
import javax.swing.table.*;
/**
* @author dongj
*/
public class Fishing extends JPanel {
public Fishing() {
initComponents();
}
private void 新增按钮1(ActionEvent e) {
// TODO add your code here
DefaultTableModel tableModel = (DefaultTableModel)this.table1.getModel();
Object[] rowData = {tableModel.getRowCount()+1, 0 ,0};
tableModel.addRow(rowData);
}
private void 删除按钮1(ActionEvent e) {
// TODO add your code here
int selectedRow = table1.getSelectedRow();
if (selectedRow != -1) {
DefaultTableModel tableModel = (DefaultTableModel) table1.getModel();
tableModel.removeRow(selectedRow);
if(tableModel.getRowCount() > selectedRow)table1.setRowSelectionInterval(selectedRow, selectedRow);
}
}
private void 新增按钮2(ActionEvent e) {
DefaultTableModel tableModel = (DefaultTableModel)this.table2.getModel();
Object[] rowData = {tableModel.getRowCount()+1, 0 ,0,0,0,0,0,0};
tableModel.addRow(rowData);
}
private void 删除按钮2(ActionEvent e) {
// TODO add your code here
int selectedRow = table2.getSelectedRow();
if (selectedRow != -1) {
DefaultTableModel tableModel = (DefaultTableModel) table2.getModel();
tableModel.removeRow(selectedRow);
if(tableModel.getRowCount() > selectedRow)table2.setRowSelectionInterval(selectedRow, selectedRow);
}
}
private void 新增按钮3(ActionEvent e) {
DefaultTableModel tableModel = (DefaultTableModel)this.table3.getModel();
Object[] rowData = {tableModel.getRowCount()+1, 0 ,0,0};
tableModel.addRow(rowData);
}
private void 删除按钮3(ActionEvent e) {
// TODO add your code here
int selectedRow = table3.getSelectedRow();
if (selectedRow != -1) {
DefaultTableModel tableModel = (DefaultTableModel) table3.getModel();
tableModel.removeRow(selectedRow);
if(tableModel.getRowCount() > selectedRow)table3.setRowSelectionInterval(selectedRow, selectedRow);
}
}
private void 重载配置操作(){
List<DiaoYuMap> mapIds = Start.diaoyuConfig.getMapIds();
DefaultTableModel tableModel = (DefaultTableModel)this.table1.getModel();
tableModel.setRowCount(0);
// 创建一个自定义的单元格渲染器用于右对齐字符串
DefaultTableCellRenderer rightRenderer = new DefaultTableCellRenderer();
rightRenderer.setHorizontalAlignment(JLabel.RIGHT);
// 遍历表格的所有列将字符串类型的列设置为右对齐
for (int i = 0; i < table1.getColumnCount(); i++) {
if (table1.getColumnClass(i) == String.class) {
table1.getColumnModel().getColumn(i).setCellRenderer(rightRenderer);
}
}
mapIds.forEach((obj) -> {
Integer Id = obj.getId();
String NameFront = obj.getName();
Integer mapid = obj.getMapId();
Object[] rowData = {Id, NameFront ,mapid};
tableModel.addRow(rowData);
});
List<DiaoyuItem> reward = Start.diaoyuConfig.getAll();
DefaultTableModel tableMode2 = (DefaultTableModel)this.table2.getModel();
tableMode2.setRowCount(0);
// 遍历表格的所有列将字符串类型的列设置为右对齐
for (int i = 0; i < table2.getColumnCount(); i++) {
if (table2.getColumnClass(i) == String.class) {
table2.getColumnModel().getColumn(i).setCellRenderer(rightRenderer);
}
}
reward.forEach((obj) -> {
Integer Id = obj.getId();
String ItemName = obj.getItemName();
Integer ItemId = obj.getItemId();
Integer min = obj.getMinNum();
Integer max = obj.getMaxNum();
Integer rate = obj.getChance();
Integer noti = obj.getNotice();
Integer iskd = obj.getIsAdvanced();
Object[] rowData = {Id, ItemName ,ItemId ,min,max,rate,noti,iskd};
tableMode2.addRow(rowData);
});
List<BL> bls = Start.diaoyuConfig.getBls();
DefaultTableModel tableMode3 = (DefaultTableModel)this.table3.getModel();
tableMode3.setRowCount(0);
// 遍历表格的所有列将字符串类型的列设置为右对齐
for (int i = 0; i < table3.getColumnCount(); i++) {
if (table3.getColumnClass(i) == String.class) {
table3.getColumnModel().getColumn(i).setCellRenderer(rightRenderer);
}
}
bls.forEach((obj) -> {
Integer Id = obj.getId();
String Name = obj.getName();
Integer ItemId = obj.getItemId();
Integer Rate = obj.getBl();
Object[] rowData = {Id, Name ,ItemId ,Rate};
tableMode3.addRow(rowData);
});
String notice = Start.diaoyuConfig.getNotice();
textField1.setText(notice);
textField2.setText(String.valueOf(Start.diaoyuConfig.getDyyg()));
textField3.setText(String.valueOf(Start.diaoyuConfig.getDyyz()));
textField4.setText(String.valueOf(Start.diaoyuConfig.getDyjg()));
textField5.setText(String.valueOf(Start.diaoyuConfig.getPtye()));
textField6.setText(String.valueOf(Start.diaoyuConfig.getGjye()));
toggleButton1.setSelected(Start.diaoyuConfig.getDykg() == 1);
toggleButton2.setSelected(Start.diaoyuConfig.getRyyz() == 1);
toggleButton3.setSelected(Start.diaoyuConfig.getDytx() == 1);
toggleButton4.setSelected(Start.diaoyuConfig.getKjbzdc() == 1);
toggleButton5.setSelected(Start.diaoyuConfig.getBldj() == 1);
}
private void 重载配置(ActionEvent e) {
重载配置操作();
}
private void button7PropertyChange(ActionEvent e) {
// TODO add your code here
// 保存 table1 的数据
DefaultTableModel tableModel = (DefaultTableModel) this.table1.getModel();
List<DiaoYuMap> mapIds = new ArrayList<>();
for (int i = 0; i < tableModel.getRowCount(); i++) {
Integer id = (Integer) tableModel.getValueAt(i, 0);
String nameFront = "";
Integer mapid = (Integer) tableModel.getValueAt(i, 2);
DiaoYuMap diaoYuMap = new DiaoYuMap();
diaoYuMap.setId(id);
diaoYuMap.setName(nameFront);
diaoYuMap.setMapId(mapid);
mapIds.add(diaoYuMap);
}
Start.diaoyuConfig.setMapIds(mapIds);
// 保存 table2 的数据
DefaultTableModel tableMode2 = (DefaultTableModel) this.table2.getModel();
List<DiaoyuItem> reward = new ArrayList<>();
reward.clear();
for (int i = 0; i < tableMode2.getRowCount(); i++) {
Integer id = (Integer) tableMode2.getValueAt(i, 0);
String itemName = (String) tableMode2.getValueAt(i, 1);
Integer itemId = (Integer) tableMode2.getValueAt(i, 2);
Integer min = (Integer) tableMode2.getValueAt(i, 3);
Integer max = (Integer) tableMode2.getValueAt(i, 4);
Integer rate = (Integer) tableMode2.getValueAt(i, 5);
Integer noti = (Integer) tableMode2.getValueAt(i, 6);
Integer iskd = (Integer) tableMode2.getValueAt(i, 7);
DiaoyuItem diaoyuItem = new DiaoyuItem();
diaoyuItem.setId(id);
diaoyuItem.setItemName(itemName);
diaoyuItem.setItemId(itemId);
diaoyuItem.setMinNum(min);
diaoyuItem.setMaxNum(max);
diaoyuItem.setChance(rate);
diaoyuItem.setNotice(noti);
diaoyuItem.setIsAdvanced(iskd);
reward.add(diaoyuItem);
}
Start.diaoyuConfig.setAll(reward);
// 保存 table3 的数据
DefaultTableModel tableMode3 = (DefaultTableModel) this.table3.getModel();
List<BL> bls = new ArrayList<>();
bls.clear();
for (int i = 0; i < tableMode3.getRowCount(); i++) {
Integer id = (Integer) tableMode3.getValueAt(i, 0);
String name = (String) tableMode3.getValueAt(i, 1);
Integer itemId = (Integer) tableMode3.getValueAt(i, 2);
Integer rate = (Integer) tableMode3.getValueAt(i, 3);
BL bl = new BL();
bl.setId(id);
bl.setName(name);
bl.setItemId(itemId);
bl.setBl(rate);
bls.add(bl);
}
Start.diaoyuConfig.setBls(bls);
// 保存文本框的数据
Start.diaoyuConfig.setNotice(textField1.getText());
Start.diaoyuConfig.setDyyg(Integer.parseInt(textField2.getText()));
Start.diaoyuConfig.setDyyz(Integer.parseInt(textField3.getText()));
Start.diaoyuConfig.setDyjg(Integer.parseInt(textField4.getText()));
Start.diaoyuConfig.setPtye(Integer.parseInt(textField5.getText()));
Start.diaoyuConfig.setGjye(Integer.parseInt(textField6.getText()));
// 保存开关按钮的数据
Start.diaoyuConfig.setDykg(toggleButton1.isSelected() ? 1 : 0);
Start.diaoyuConfig.setRyyz(toggleButton2.isSelected() ? 1 : 0);
Start.diaoyuConfig.setDytx(toggleButton3.isSelected() ? 1 : 0);
Start.diaoyuConfig.setKjbzdc(toggleButton4.isSelected() ? 1 : 0);
Start.diaoyuConfig.setBldj(toggleButton5.isSelected() ? 1 : 0);
特殊控制台.setTwConfig();
}
private void initComponents() {
// JFormDesigner - Component initialization - DO NOT MODIFY //GEN-BEGIN:initComponents @formatter:off
scrollPane1 = new JScrollPane();
table1 = new JTable();
scrollPane2 = new JScrollPane();
table2 = new JTable();
scrollPane3 = new JScrollPane();
table3 = new JTable();
button2 = new JButton();
button1 = new JButton();
button3 = new JButton();
button4 = new JButton();
textField1 = new JTextField();
label1 = new JLabel();
button5 = new JButton();
button6 = new JButton();
label2 = new JLabel();
label3 = new JLabel();
label4 = new JLabel();
label5 = new JLabel();
label6 = new JLabel();
textField2 = new JTextField();
textField3 = new JTextField();
textField4 = new JTextField();
textField5 = new JTextField();
textField6 = new JTextField();
toggleButton1 = new JToggleButton();
label7 = new JLabel();
label8 = new JLabel();
label9 = new JLabel();
label10 = new JLabel();
label11 = new JLabel();
toggleButton2 = new JToggleButton();
toggleButton3 = new JToggleButton();
toggleButton4 = new JToggleButton();
toggleButton5 = new JToggleButton();
button7 = new JButton();
button8 = new JButton();
//======== this ========
setLayout(null);
//======== scrollPane1 ========
{
//---- table1 ----
table1.setModel(new DefaultTableModel(
new Object[][] {
},
new String[] {
"\u5e8f\u53f7", "\u5730\u56fe\u540d", "\u5730\u56feID"
}
) {
Class<?>[] columnTypes = new Class<?>[] {
Integer.class, String.class, Integer.class
};
@Override
public Class<?> getColumnClass(int columnIndex) {
return columnTypes[columnIndex];
}
});
{
TableColumnModel cm = table1.getColumnModel();
cm.getColumn(0).setMinWidth(10);
cm.getColumn(0).setMaxWidth(35);
}
scrollPane1.setViewportView(table1);
}
add(scrollPane1);
scrollPane1.setBounds(20, 10, 350, 625);
//======== scrollPane2 ========
{
//---- table2 ----
table2.setModel(new DefaultTableModel(
new Object[][] {
},
new String[] {
"\u5e8f\u53f7", "\u9053\u5177\u540d", "\u9053\u5177ID", "\u6700\u5c0f\u6570\u91cf", "\u6700\u5927\u6570\u91cf", "\u51e0\u7387", "\u64ad\u62a5", "\u4ec5\u9ad8\u7ea7\u9c7c\u9975\u53ef\u9493"
}
) {
Class<?>[] columnTypes = new Class<?>[] {
Integer.class, Integer.class, Integer.class, Integer.class, Integer.class, Integer.class, Integer.class, Integer.class
};
@Override
public Class<?> getColumnClass(int columnIndex) {
return columnTypes[columnIndex];
}
});
{
TableColumnModel cm = table2.getColumnModel();
cm.getColumn(0).setMaxWidth(35);
cm.getColumn(6).setMaxWidth(35);
}
scrollPane2.setViewportView(table2);
}
add(scrollPane2);
scrollPane2.setBounds(380, 10, 685, 555);
//======== scrollPane3 ========
{
//---- table3 ----
table3.setModel(new DefaultTableModel(
new Object[][] {
},
new String[] {
"\u5e8f\u53f7", "\u9053\u5177\u540d", "\u9053\u5177ID", "\u500d\u7387"
}
) {
Class<?>[] columnTypes = new Class<?>[] {
Integer.class, String.class, Integer.class, Integer.class
};
@Override
public Class<?> getColumnClass(int columnIndex) {
return columnTypes[columnIndex];
}
});
scrollPane3.setViewportView(table3);
}
add(scrollPane3);
scrollPane3.setBounds(1075, 10, 425, 250);
//---- button2 ----
button2.setText("\u5220\u9664");
button2.addActionListener(e -> 删除按钮1(e));
add(button2);
button2.setBounds(215, 645, 155, button2.getPreferredSize().height);
//---- button1 ----
button1.setText("\u65b0\u589e");
button1.setActionCommand("\u65b0\u589e");
button1.addActionListener(e -> 新增按钮1(e));
add(button1);
button1.setBounds(20, 645, 155, button1.getPreferredSize().height);
//---- button3 ----
button3.setText("\u65b0\u589e");
button3.addActionListener(e -> 新增按钮2(e));
add(button3);
button3.setBounds(385, 645, 155, button3.getPreferredSize().height);
//---- button4 ----
button4.setText("\u5220\u9664");
button4.addActionListener(e -> 删除按钮2(e));
add(button4);
button4.setBounds(615, 645, 155, button4.getPreferredSize().height);
add(textField1);
textField1.setBounds(385, 590, 385, 50);
//---- label1 ----
label1.setText("\u64ad\u62a5\u5185\u5bb9:");
add(label1);
label1.setBounds(new Rectangle(new Point(390, 570), label1.getPreferredSize()));
//---- button5 ----
button5.setText("\u65b0\u589e");
button5.addActionListener(e -> 新增按钮3(e));
add(button5);
button5.setBounds(1115, 270, 155, button5.getPreferredSize().height);
//---- button6 ----
button6.setText("\u5220\u9664");
button6.addActionListener(e -> 删除按钮3(e));
add(button6);
button6.setBounds(1295, 270, 155, button6.getPreferredSize().height);
//---- label2 ----
label2.setText("\u9493\u9c7c\u9c7c\u7aff");
add(label2);
label2.setBounds(1150, 310, 60, 25);
//---- label3 ----
label3.setText("\u9493\u9c7c\u6905\u5b50");
add(label3);
label3.setBounds(1150, 350, 60, 25);
//---- label4 ----
label4.setText("\u9493\u9c7c\u95f4\u9694");
add(label4);
label4.setBounds(1150, 390, 60, 25);
//---- label5 ----
label5.setText("\u666e\u901a\u9c7c\u9975");
add(label5);
label5.setBounds(1150, 430, 60, 25);
//---- label6 ----
label6.setText("\u9ad8\u7ea7\u9c7c\u9975");
add(label6);
label6.setBounds(1150, 470, 60, 25);
add(textField2);
textField2.setBounds(1210, 310, 205, textField2.getPreferredSize().height);
add(textField3);
textField3.setBounds(1210, 350, 205, textField3.getPreferredSize().height);
add(textField4);
textField4.setBounds(1210, 390, 205, textField4.getPreferredSize().height);
add(textField5);
textField5.setBounds(1210, 430, 205, textField5.getPreferredSize().height);
add(textField6);
textField6.setBounds(1210, 470, 205, textField6.getPreferredSize().height);
//---- toggleButton1 ----
toggleButton1.setIcon(new ImageIcon(getClass().getResource("/image/OFF3.png")));
toggleButton1.setSelectedIcon(new ImageIcon(getClass().getResource("/image/ON3.png")));
toggleButton1.setFocusPainted(false);
toggleButton1.setContentAreaFilled(false);
add(toggleButton1);
toggleButton1.setBounds(1280, 495, 100, 35);
//---- label7 ----
label7.setText("\u5f00\u653e\u9493\u9c7c\u7cfb\u7edf\u5f00\u5173");
add(label7);
label7.setBounds(1160, 500, 110, 25);
//---- label8 ----
label8.setText("\u542f\u7528\u4efb\u610f\u6905\u5b50\u9493\u9c7c");
add(label8);
label8.setBounds(1160, 540, 110, 25);
//---- label9 ----
label9.setText("\u663e\u793a\u9493\u9c7c\u6210\u529f\u7279\u6548");
add(label9);
label9.setBounds(1160, 575, 110, 25);
//---- label10 ----
label10.setText("\u7a7a\u95f4\u4e0d\u8db3\u81ea\u52a8\u4e22\u51fa");
add(label10);
label10.setBounds(1160, 610, 110, 25);
//---- label11 ----
label11.setText("\u500d\u7387\u9053\u5177\u662f\u5426\u53e0\u52a0");
add(label11);
label11.setBounds(1160, 650, 110, 25);
//---- toggleButton2 ----
toggleButton2.setIcon(new ImageIcon(getClass().getResource("/image/OFF3.png")));
toggleButton2.setSelectedIcon(new ImageIcon(getClass().getResource("/image/ON3.png")));
toggleButton2.setFocusPainted(false);
toggleButton2.setContentAreaFilled(false);
add(toggleButton2);
toggleButton2.setBounds(1280, 535, 100, 35);
//---- toggleButton3 ----
toggleButton3.setIcon(new ImageIcon(getClass().getResource("/image/OFF3.png")));
toggleButton3.setSelectedIcon(new ImageIcon(getClass().getResource("/image/ON3.png")));
toggleButton3.setFocusPainted(false);
toggleButton3.setContentAreaFilled(false);
add(toggleButton3);
toggleButton3.setBounds(1280, 570, 100, 35);
//---- toggleButton4 ----
toggleButton4.setIcon(new ImageIcon(getClass().getResource("/image/OFF3.png")));
toggleButton4.setSelectedIcon(new ImageIcon(getClass().getResource("/image/ON3.png")));
toggleButton4.setFocusPainted(false);
toggleButton4.setContentAreaFilled(false);
add(toggleButton4);
toggleButton4.setBounds(1280, 605, 100, 35);
//---- toggleButton5 ----
toggleButton5.setIcon(new ImageIcon(getClass().getResource("/image/OFF3.png")));
toggleButton5.setSelectedIcon(new ImageIcon(getClass().getResource("/image/ON3.png")));
toggleButton5.setFocusPainted(false);
toggleButton5.setContentAreaFilled(false);
add(toggleButton5);
toggleButton5.setBounds(1280, 645, 100, 35);
//---- button7 ----
button7.setText("\u4fdd\u5b58\u914d\u7f6e");
button7.addActionListener(e -> button7PropertyChange(e));
add(button7);
button7.setBounds(775, 585, 290, 45);
//---- button8 ----
button8.setText("\u91cd\u8f7d\u914d\u7f6e");
button8.addActionListener(e -> 重载配置(e));
add(button8);
button8.setBounds(775, 635, 290, 45);
{
// compute preferred size
Dimension preferredSize = new Dimension();
for(int i = 0; i < getComponentCount(); i++) {
Rectangle bounds = getComponent(i).getBounds();
preferredSize.width = Math.max(bounds.x + bounds.width, preferredSize.width);
preferredSize.height = Math.max(bounds.y + bounds.height, preferredSize.height);
}
Insets insets = getInsets();
preferredSize.width += insets.right;
preferredSize.height += insets.bottom;
setMinimumSize(preferredSize);
setPreferredSize(preferredSize);
}
// JFormDesigner - End of component initialization //GEN-END:initComponents @formatter:on
重载配置操作();
}
// JFormDesigner - Variables declaration - DO NOT MODIFY //GEN-BEGIN:variables @formatter:off
private JScrollPane scrollPane1;
private JTable table1;
private JScrollPane scrollPane2;
private JTable table2;
private JScrollPane scrollPane3;
private JTable table3;
private JButton button2;
private JButton button1;
private JButton button3;
private JButton button4;
private JTextField textField1;
private JLabel label1;
private JButton button5;
private JButton button6;
private JLabel label2;
private JLabel label3;
private JLabel label4;
private JLabel label5;
private JLabel label6;
private JTextField textField2;
private JTextField textField3;
private JTextField textField4;
private JTextField textField5;
private JTextField textField6;
private JToggleButton toggleButton1;
private JLabel label7;
private JLabel label8;
private JLabel label9;
private JLabel label10;
private JLabel label11;
private JToggleButton toggleButton2;
private JToggleButton toggleButton3;
private JToggleButton toggleButton4;
private JToggleButton toggleButton5;
private JButton button7;
private JButton button8;
// JFormDesigner - End of variables declaration //GEN-END:variables @formatter:on
}

View File

@ -0,0 +1,396 @@
JFDML JFormDesigner: "9.0.0.0.352" Java: "21.0.6" encoding: "UTF-8"
new FormModel {
contentType: "form/swing"
root: new FormRoot {
add( new FormContainer( "javax.swing.JPanel", new FormLayoutManager( class com.jformdesigner.runtime.NullLayout ) ) {
name: "this"
add( new FormContainer( "javax.swing.JScrollPane", new FormLayoutManager( class javax.swing.JScrollPane ) ) {
name: "scrollPane1"
add( new FormComponent( "javax.swing.JTable" ) {
name: "table1"
"model": new com.jformdesigner.model.SwingTableModel( new java.util.Vector, new java.util.Vector {
add( "序号" )
add( "地图名" )
add( "地图ID" )
}, new java.util.Vector {
add( class java.lang.Integer )
add( class java.lang.String )
add( class java.lang.Integer )
}, new java.util.Vector {
add( null )
add( null )
add( null )
}, new java.util.Vector {
add( new com.jformdesigner.model.SwingTableColumn( null, 0, 10, 35, true ) )
add( null )
add( null )
} )
} )
}, new FormLayoutConstraints( class com.jformdesigner.runtime.NullConstraints ) {
"x": 20
"y": 10
"width": 350
"height": 625
} )
add( new FormContainer( "javax.swing.JScrollPane", new FormLayoutManager( class javax.swing.JScrollPane ) ) {
name: "scrollPane2"
add( new FormComponent( "javax.swing.JTable" ) {
name: "table2"
"model": new com.jformdesigner.model.SwingTableModel( new java.util.Vector, new java.util.Vector {
add( "序号" )
add( "道具名" )
add( "道具ID" )
add( "最小数量" )
add( "最大数量" )
add( "几率" )
add( "播报" )
add( "仅高级鱼饵可钓" )
}, new java.util.Vector {
add( class java.lang.Integer )
add( class java.lang.Integer )
add( class java.lang.Integer )
add( class java.lang.Integer )
add( class java.lang.Integer )
add( class java.lang.Integer )
add( class java.lang.Integer )
add( class java.lang.Integer )
}, new java.util.Vector {
add( null )
add( null )
add( null )
add( null )
add( null )
add( null )
add( null )
add( null )
}, new java.util.Vector {
add( new com.jformdesigner.model.SwingTableColumn( null, 0, 0, 35, true ) )
add( null )
add( null )
add( null )
add( null )
add( null )
add( new com.jformdesigner.model.SwingTableColumn( null, 0, 0, 35, true ) )
add( null )
} )
} )
}, new FormLayoutConstraints( class com.jformdesigner.runtime.NullConstraints ) {
"x": 380
"y": 10
"width": 685
"height": 555
} )
add( new FormContainer( "javax.swing.JScrollPane", new FormLayoutManager( class javax.swing.JScrollPane ) ) {
name: "scrollPane3"
add( new FormComponent( "javax.swing.JTable" ) {
name: "table3"
"model": new com.jformdesigner.model.SwingTableModel( new java.util.Vector, new java.util.Vector {
add( "序号" )
add( "道具名" )
add( "道具ID" )
add( "倍率" )
}, new java.util.Vector {
add( class java.lang.Integer )
add( class java.lang.String )
add( class java.lang.Integer )
add( class java.lang.Integer )
}, new java.util.Vector {
add( null )
add( null )
add( null )
add( null )
}, new java.util.Vector {
add( null )
add( null )
add( null )
add( null )
} )
} )
}, new FormLayoutConstraints( class com.jformdesigner.runtime.NullConstraints ) {
"x": 1075
"y": 10
"width": 425
"height": 250
} )
add( new FormComponent( "javax.swing.JButton" ) {
name: "button2"
"text": "删除"
addEvent( new FormEvent( "java.awt.event.ActionListener", "actionPerformed", "删除按钮1", true ) )
}, new FormLayoutConstraints( class com.jformdesigner.runtime.NullConstraints ) {
"x": 215
"y": 645
"width": 155
} )
add( new FormComponent( "javax.swing.JButton" ) {
name: "button1"
"text": "新增"
"actionCommand": "新增"
addEvent( new FormEvent( "java.awt.event.ActionListener", "actionPerformed", "新增按钮1", true ) )
}, new FormLayoutConstraints( class com.jformdesigner.runtime.NullConstraints ) {
"x": 20
"y": 645
"width": 155
} )
add( new FormComponent( "javax.swing.JButton" ) {
name: "button3"
"text": "新增"
addEvent( new FormEvent( "java.awt.event.ActionListener", "actionPerformed", "新增按钮2", true ) )
}, new FormLayoutConstraints( class com.jformdesigner.runtime.NullConstraints ) {
"x": 385
"y": 645
"width": 155
} )
add( new FormComponent( "javax.swing.JButton" ) {
name: "button4"
"text": "删除"
addEvent( new FormEvent( "java.awt.event.ActionListener", "actionPerformed", "删除按钮2", true ) )
}, new FormLayoutConstraints( class com.jformdesigner.runtime.NullConstraints ) {
"x": 615
"y": 645
"width": 155
} )
add( new FormComponent( "javax.swing.JTextField" ) {
name: "textField1"
}, new FormLayoutConstraints( class com.jformdesigner.runtime.NullConstraints ) {
"x": 385
"y": 590
"width": 385
"height": 50
} )
add( new FormComponent( "javax.swing.JLabel" ) {
name: "label1"
"text": "播报内容:"
}, new FormLayoutConstraints( class com.jformdesigner.runtime.NullConstraints ) {
"x": 390
"y": 570
} )
add( new FormComponent( "javax.swing.JButton" ) {
name: "button5"
"text": "新增"
addEvent( new FormEvent( "java.awt.event.ActionListener", "actionPerformed", "新增按钮3", true ) )
}, new FormLayoutConstraints( class com.jformdesigner.runtime.NullConstraints ) {
"x": 1115
"y": 270
"width": 155
} )
add( new FormComponent( "javax.swing.JButton" ) {
name: "button6"
"text": "删除"
addEvent( new FormEvent( "java.awt.event.ActionListener", "actionPerformed", "删除按钮3", true ) )
}, new FormLayoutConstraints( class com.jformdesigner.runtime.NullConstraints ) {
"x": 1295
"y": 270
"width": 155
} )
add( new FormComponent( "javax.swing.JLabel" ) {
name: "label2"
"text": "钓鱼鱼竿"
}, new FormLayoutConstraints( class com.jformdesigner.runtime.NullConstraints ) {
"x": 1150
"y": 310
"width": 60
"height": 25
} )
add( new FormComponent( "javax.swing.JLabel" ) {
name: "label3"
"text": "钓鱼椅子"
}, new FormLayoutConstraints( class com.jformdesigner.runtime.NullConstraints ) {
"width": 60
"height": 25
"x": 1150
"y": 350
} )
add( new FormComponent( "javax.swing.JLabel" ) {
name: "label4"
"text": "钓鱼间隔"
}, new FormLayoutConstraints( class com.jformdesigner.runtime.NullConstraints ) {
"width": 60
"height": 25
"x": 1150
"y": 390
} )
add( new FormComponent( "javax.swing.JLabel" ) {
name: "label5"
"text": "普通鱼饵"
}, new FormLayoutConstraints( class com.jformdesigner.runtime.NullConstraints ) {
"width": 60
"height": 25
"x": 1150
"y": 430
} )
add( new FormComponent( "javax.swing.JLabel" ) {
name: "label6"
"text": "高级鱼饵"
}, new FormLayoutConstraints( class com.jformdesigner.runtime.NullConstraints ) {
"width": 60
"height": 25
"x": 1150
"y": 470
} )
add( new FormComponent( "javax.swing.JTextField" ) {
name: "textField2"
}, new FormLayoutConstraints( class com.jformdesigner.runtime.NullConstraints ) {
"x": 1210
"y": 310
"width": 205
} )
add( new FormComponent( "javax.swing.JTextField" ) {
name: "textField3"
}, new FormLayoutConstraints( class com.jformdesigner.runtime.NullConstraints ) {
"x": 1210
"y": 350
"width": 205
} )
add( new FormComponent( "javax.swing.JTextField" ) {
name: "textField4"
}, new FormLayoutConstraints( class com.jformdesigner.runtime.NullConstraints ) {
"x": 1210
"y": 390
"width": 205
} )
add( new FormComponent( "javax.swing.JTextField" ) {
name: "textField5"
}, new FormLayoutConstraints( class com.jformdesigner.runtime.NullConstraints ) {
"x": 1210
"y": 430
"width": 205
} )
add( new FormComponent( "javax.swing.JTextField" ) {
name: "textField6"
}, new FormLayoutConstraints( class com.jformdesigner.runtime.NullConstraints ) {
"x": 1210
"y": 470
"width": 205
} )
add( new FormComponent( "javax.swing.JToggleButton" ) {
name: "toggleButton1"
"icon": &SwingIcon0 new com.jformdesigner.model.SwingIcon( 0, "/image/OFF3.png" )
"selectedIcon": &SwingIcon1 new com.jformdesigner.model.SwingIcon( 0, "/image/ON3.png" )
"focusPainted": false
"contentAreaFilled": false
}, new FormLayoutConstraints( class com.jformdesigner.runtime.NullConstraints ) {
"width": 100
"height": 35
"x": 1280
"y": 495
} )
add( new FormComponent( "javax.swing.JLabel" ) {
name: "label7"
"text": "开放钓鱼系统开关"
}, new FormLayoutConstraints( class com.jformdesigner.runtime.NullConstraints ) {
"x": 1160
"y": 500
"width": 110
"height": 25
} )
add( new FormComponent( "javax.swing.JLabel" ) {
name: "label8"
"text": "启用任意椅子钓鱼"
}, new FormLayoutConstraints( class com.jformdesigner.runtime.NullConstraints ) {
"width": 110
"height": 25
"x": 1160
"y": 540
} )
add( new FormComponent( "javax.swing.JLabel" ) {
name: "label9"
"text": "显示钓鱼成功特效"
}, new FormLayoutConstraints( class com.jformdesigner.runtime.NullConstraints ) {
"width": 110
"height": 25
"x": 1160
"y": 575
} )
add( new FormComponent( "javax.swing.JLabel" ) {
name: "label10"
"text": "空间不足自动丢出"
}, new FormLayoutConstraints( class com.jformdesigner.runtime.NullConstraints ) {
"width": 110
"height": 25
"x": 1160
"y": 610
} )
add( new FormComponent( "javax.swing.JLabel" ) {
name: "label11"
"text": "倍率道具是否叠加"
}, new FormLayoutConstraints( class com.jformdesigner.runtime.NullConstraints ) {
"width": 110
"height": 25
"x": 1160
"y": 650
} )
add( new FormComponent( "javax.swing.JToggleButton" ) {
name: "toggleButton2"
"icon": #SwingIcon0
"selectedIcon": #SwingIcon1
"focusPainted": false
"contentAreaFilled": false
}, new FormLayoutConstraints( class com.jformdesigner.runtime.NullConstraints ) {
"width": 100
"height": 35
"x": 1280
"y": 535
} )
add( new FormComponent( "javax.swing.JToggleButton" ) {
name: "toggleButton3"
"icon": #SwingIcon0
"selectedIcon": #SwingIcon1
"focusPainted": false
"contentAreaFilled": false
}, new FormLayoutConstraints( class com.jformdesigner.runtime.NullConstraints ) {
"width": 100
"height": 35
"x": 1280
"y": 570
} )
add( new FormComponent( "javax.swing.JToggleButton" ) {
name: "toggleButton4"
"icon": #SwingIcon0
"selectedIcon": #SwingIcon1
"focusPainted": false
"contentAreaFilled": false
}, new FormLayoutConstraints( class com.jformdesigner.runtime.NullConstraints ) {
"width": 100
"height": 35
"x": 1280
"y": 605
} )
add( new FormComponent( "javax.swing.JToggleButton" ) {
name: "toggleButton5"
"icon": #SwingIcon0
"selectedIcon": #SwingIcon1
"focusPainted": false
"contentAreaFilled": false
}, new FormLayoutConstraints( class com.jformdesigner.runtime.NullConstraints ) {
"width": 100
"height": 35
"x": 1280
"y": 645
} )
add( new FormComponent( "javax.swing.JButton" ) {
name: "button7"
"text": "保存配置"
addEvent( new FormEvent( "java.awt.event.ActionListener", "actionPerformed", "button7PropertyChange", true ) )
}, new FormLayoutConstraints( class com.jformdesigner.runtime.NullConstraints ) {
"x": 775
"y": 585
"width": 290
"height": 45
} )
add( new FormComponent( "javax.swing.JButton" ) {
name: "button8"
"text": "重载配置"
addEvent( new FormEvent( "java.awt.event.ActionListener", "actionPerformed", "重载配置", true ) )
}, new FormLayoutConstraints( class com.jformdesigner.runtime.NullConstraints ) {
"width": 290
"height": 45
"x": 775
"y": 635
} )
}, new FormLayoutConstraints( null ) {
"location": new java.awt.Point( 0, 0 )
"size": new java.awt.Dimension( 1510, 740 )
} )
}
}

View File

@ -0,0 +1,136 @@
/*
* Created by JFormDesigner on Fri Apr 04 18:19:47 CST 2025
*/
package gui.UI_LenheartUI;
import java.awt.event.*;
import gui.Start;
import gui.tw.AotuNpc;
import gui.tw.rw.XuanShangRenWu;
import java.awt.*;
import java.util.ArrayList;
import java.util.List;
import javax.swing.*;
import javax.swing.table.*;
/**
* @author dongj
*/
public class KillMonsterStatistics extends JPanel {
public KillMonsterStatistics() {
initComponents();
}
private void 载入杀怪统计(ActionEvent e) {
// TODO add your code here
DefaultTableModel tableModel = (DefaultTableModel)this.table1.getModel();
tableModel.setRowCount(0);
// 创建一个自定义的单元格渲染器用于右对齐字符串
DefaultTableCellRenderer rightRenderer = new DefaultTableCellRenderer();
rightRenderer.setHorizontalAlignment(JLabel.RIGHT);
// 遍历表格的所有列将字符串类型的列设置为右对齐
for (int i = 0; i < table1.getColumnCount(); i++) {
if (table1.getColumnClass(i) == String.class) {
table1.getColumnModel().getColumn(i).setCellRenderer(rightRenderer);
}
}
settable(new ArrayList<>(Start.xsRW.values()));
}
private void settable(List<XuanShangRenWu> tttt) {
DefaultTableModel tableModel = (DefaultTableModel) this.table1.getModel();
tableModel.setRowCount(0);
for (XuanShangRenWu obj : tttt) {
Object[] rowData = {obj.getAccount(), obj.getCid(), obj.getName(), obj.getMobId(), obj.getMobName(), obj.getMobNum()};
tableModel.addRow(rowData);
}
}
private void 搜索(ActionEvent e) {
// TODO add your code here
String BUF = textField1.getText();
List<XuanShangRenWu> xuanShangRenWus = XuanShangRenWu.fuzzySearch(BUF);
settable(xuanShangRenWus);
}
private void initComponents() {
// JFormDesigner - Component initialization - DO NOT MODIFY //GEN-BEGIN:initComponents @formatter:off
scrollPane1 = new JScrollPane();
table1 = new JTable();
button1 = new JButton();
textField1 = new JTextField();
button2 = new JButton();
//======== this ========
setLayout(null);
//======== scrollPane1 ========
{
//---- table1 ----
table1.setModel(new DefaultTableModel(
new Object[][] {
{null, null, "", null, null, null, null},
{null, null, null, null, null, null, null},
},
new String[] {
"\u8d26\u53f7\u4fe1\u606f", "\u89d2\u8272ID", "\u89d2\u8272\u540d", "\u602a\u7269ID", "\u602a\u7269\u540d", "\u51fb\u6740\u6570\u91cf", "\u6700\u5927\u6740\u602a\u6570\u91cf"
}
) {
boolean[] columnEditable = new boolean[] {
false, false, false, true, false, true, true
};
@Override
public boolean isCellEditable(int rowIndex, int columnIndex) {
return columnEditable[columnIndex];
}
});
scrollPane1.setViewportView(table1);
}
add(scrollPane1);
scrollPane1.setBounds(10, 10, 1285, scrollPane1.getPreferredSize().height);
//---- button1 ----
button1.setText("\u8f7d\u5165\u6740\u602a\u7edf\u8ba1");
button1.addActionListener(e -> 载入杀怪统计(e));
add(button1);
button1.setBounds(10, 455, 260, 50);
add(textField1);
textField1.setBounds(295, 455, 245, 50);
//---- button2 ----
button2.setText("\u641c\u7d22");
button2.addActionListener(e -> 搜索(e));
add(button2);
button2.setBounds(565, 455, 260, 50);
{
// compute preferred size
Dimension preferredSize = new Dimension();
for(int i = 0; i < getComponentCount(); i++) {
Rectangle bounds = getComponent(i).getBounds();
preferredSize.width = Math.max(bounds.x + bounds.width, preferredSize.width);
preferredSize.height = Math.max(bounds.y + bounds.height, preferredSize.height);
}
Insets insets = getInsets();
preferredSize.width += insets.right;
preferredSize.height += insets.bottom;
setMinimumSize(preferredSize);
setPreferredSize(preferredSize);
}
// JFormDesigner - End of component initialization //GEN-END:initComponents @formatter:on
}
// JFormDesigner - Variables declaration - DO NOT MODIFY //GEN-BEGIN:variables @formatter:off
private JScrollPane scrollPane1;
private JTable table1;
private JButton button1;
private JTextField textField1;
private JButton button2;
// JFormDesigner - End of variables declaration //GEN-END:variables @formatter:on
}

View File

@ -0,0 +1,103 @@
JFDML JFormDesigner: "9.0.0.0.352" Java: "21.0.6" encoding: "UTF-8"
new FormModel {
contentType: "form/swing"
root: new FormRoot {
add( new FormContainer( "javax.swing.JPanel", new FormLayoutManager( class com.jformdesigner.runtime.NullLayout ) ) {
name: "this"
add( new FormContainer( "javax.swing.JScrollPane", new FormLayoutManager( class javax.swing.JScrollPane ) ) {
name: "scrollPane1"
add( new FormComponent( "javax.swing.JTable" ) {
name: "table1"
"model": new com.jformdesigner.model.SwingTableModel( new java.util.Vector {
add( new java.util.Vector {
add( null )
add( null )
add( "" )
add( null )
add( null )
add( null )
add( null )
} )
add( new java.util.Vector {
add( null )
add( null )
add( null )
add( null )
add( null )
add( null )
add( null )
} )
}, new java.util.Vector {
add( "账号信息" )
add( "角色ID" )
add( "角色名" )
add( "怪物ID" )
add( "怪物名" )
add( "击杀数量" )
add( "最大杀怪数量" )
}, new java.util.Vector {
add( null )
add( null )
add( null )
add( null )
add( null )
add( null )
add( null )
}, new java.util.Vector {
add( false )
add( false )
add( false )
add( null )
add( false )
add( null )
add( null )
}, new java.util.Vector {
add( null )
add( null )
add( null )
add( null )
add( null )
add( null )
add( null )
} )
} )
}, new FormLayoutConstraints( class com.jformdesigner.runtime.NullConstraints ) {
"x": 10
"y": 10
"width": 1285
} )
add( new FormComponent( "javax.swing.JButton" ) {
name: "button1"
"text": "载入杀怪统计"
addEvent( new FormEvent( "java.awt.event.ActionListener", "actionPerformed", "载入杀怪统计", true ) )
}, new FormLayoutConstraints( class com.jformdesigner.runtime.NullConstraints ) {
"x": 10
"y": 455
"width": 260
"height": 50
} )
add( new FormComponent( "javax.swing.JTextField" ) {
name: "textField1"
}, new FormLayoutConstraints( class com.jformdesigner.runtime.NullConstraints ) {
"x": 295
"y": 455
"width": 245
"height": 50
} )
add( new FormComponent( "javax.swing.JButton" ) {
name: "button2"
"text": "搜索"
addEvent( new FormEvent( "java.awt.event.ActionListener", "actionPerformed", "搜索", true ) )
}, new FormLayoutConstraints( class com.jformdesigner.runtime.NullConstraints ) {
"x": 565
"y": 455
"width": 260
"height": 50
} )
}, new FormLayoutConstraints( null ) {
"location": new java.awt.Point( 0, 0 )
"size": new java.awt.Dimension( 1525, 700 )
} )
}
}

View File

@ -9,6 +9,9 @@ public class UI_LenheartUI {
private JPanel 爆率控制页面;
private JPanel 战力控制页面;
private JPanel 爆物管理页面;
private JPanel 钓鱼管理页面;
private JPanel 自动访问NPC页面;
private JPanel 杀怪统计页面;
public UI_LenheartUI(JTabbedPane mainComponent) {
物品回收页面 = new ItemRecovery();
@ -16,11 +19,17 @@ public class UI_LenheartUI {
爆率控制页面 = new DropControl();
战力控制页面 = new FightControl();
爆物管理页面 = new ExplosiveControl();
钓鱼管理页面 = new Fishing();
自动访问NPC页面 = new AutoScriptNpc();
杀怪统计页面 = new KillMonsterStatistics();
mainComponent.addTab("物品回收设置", 物品回收页面);
mainComponent.addTab("伤害控制设置", 伤害控制页面);
mainComponent.addTab("爆率 & 鞭尸控制设置", 爆率控制页面);
mainComponent.addTab("战力控制设置", 战力控制页面);
mainComponent.addTab("爆物管理设置", 爆物管理页面);
mainComponent.addTab("钓鱼管理设置", 钓鱼管理页面);
mainComponent.addTab("自动访问NPC设置", 自动访问NPC页面);
mainComponent.addTab("杀怪统计", 杀怪统计页面);
}
}