Skip to content

Commit

Permalink
Version: 3.3.3 Update
Browse files Browse the repository at this point in the history
  • Loading branch information
gh0stkey committed Sep 19, 2024
1 parent ae8cb2f commit 5419d4a
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/main/java/hae/component/Config.java
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ private void initComponents() {
constraints.gridx = 1;
JTabbedPane configTabbedPanel = new JTabbedPane();

String[] settingMode = new String[]{"Exclude suffix", "Block host", "Exclude status", "Limit size"};
String[] settingMode = new String[]{"Exclude suffix", "Block host", "Exclude status", "Limit size (MB)"};
JPanel settingPanel = createConfigTablePanel(settingMode, "Setting");
JPanel scopePanel = getScopePanel();
JScrollPane scopeScrollPane = new JScrollPane(scopePanel);
Expand Down Expand Up @@ -154,7 +154,7 @@ public void tableChanged(TableModelEvent e) {
}
}

if (selected.equals("Limit size")) {
if (selected.contains("Limit size")) {
if (!values.equals(configLoader.getExcludeStatus()) && !values.isEmpty()) {
String[] limit = values.split("\\|");
configLoader.setLimitSize(limit[limit.length - 1]);
Expand Down Expand Up @@ -183,7 +183,7 @@ public void actionPerformed(ActionEvent e) {
addDataToTable(configLoader.getExcludeStatus().replaceAll("\\|", "\r\n"), model);
}

if (selected.equals("Limit size")) {
if (selected.contains("Limit size")) {
addDataToTable(configLoader.getLimitSize(), model);
}
}
Expand Down Expand Up @@ -305,7 +305,7 @@ public void keyPressed(KeyEvent e) {
Clipboard clipboard = Toolkit.getDefaultToolkit().getSystemClipboard();
try {
String data = (String) clipboard.getData(DataFlavor.stringFlavor);
if (setTypeComboBox.getSelectedItem().toString().equals("Limit size")) {
if (setTypeComboBox.getSelectedItem().toString().contains("Limit size")) {
model.setRowCount(0);
}
if (data != null && !data.isEmpty()) {
Expand Down Expand Up @@ -401,7 +401,7 @@ public void updateScope(JCheckBox checkBox) {
private void addActionPerformed(ActionEvent e, DefaultTableModel model, JTextField addTextField, String comboBoxSelected) {
String addTextFieldText = addTextField.getText();
if (addTextField.getForeground().equals(Color.BLACK)) {
if (comboBoxSelected.equals("Limit size")) {
if (comboBoxSelected.contains("Limit size")) {
model.setRowCount(0);
}
addDataToTable(addTextFieldText, model);
Expand Down

0 comments on commit 5419d4a

Please sign in to comment.