From 829bb336b8bc9f564bfdf50f63965a19e6f7a5bf Mon Sep 17 00:00:00 2001 From: OMGeeky <> Date: Mon, 16 Jun 2025 12:38:00 +0200 Subject: [PATCH] cleanup --- .../ui/gamedataeditors/DroplistEditor.java | 4 ++-- .../rpg/atcontentstudio/ui/gamedataeditors/NPCEditor.java | 8 -------- .../gpl/rpg/atcontentstudio/ui/tools/CommonEditor.java | 2 +- 3 files changed, 3 insertions(+), 11 deletions(-) diff --git a/src/com/gpl/rpg/atcontentstudio/ui/gamedataeditors/DroplistEditor.java b/src/com/gpl/rpg/atcontentstudio/ui/gamedataeditors/DroplistEditor.java index e65abd8..411aab6 100644 --- a/src/com/gpl/rpg/atcontentstudio/ui/gamedataeditors/DroplistEditor.java +++ b/src/com/gpl/rpg/atcontentstudio/ui/gamedataeditors/DroplistEditor.java @@ -164,7 +164,7 @@ public class DroplistEditor extends JSONElementEditor { if (idChanging()) { droplist.id = (String) value; DroplistEditor.this.name = droplist.getDesc(); - droplist.childrenChanged(new ArrayList()); + droplist.childrenChanged(new ArrayList<>()); ATContentStudio.frame.editorChanged(DroplistEditor.this); } else { cancelIdEdit(idField); @@ -196,7 +196,7 @@ public class DroplistEditor extends JSONElementEditor { if (droplist.state != GameDataElement.State.modified) { droplist.state = GameDataElement.State.modified; DroplistEditor.this.name = droplist.getDesc(); - droplist.childrenChanged(new ArrayList()); + droplist.childrenChanged(new ArrayList<>()); ATContentStudio.frame.editorChanged(DroplistEditor.this); } updateJsonViewText(droplist.toJsonString()); diff --git a/src/com/gpl/rpg/atcontentstudio/ui/gamedataeditors/NPCEditor.java b/src/com/gpl/rpg/atcontentstudio/ui/gamedataeditors/NPCEditor.java index 2269385..5931ddd 100644 --- a/src/com/gpl/rpg/atcontentstudio/ui/gamedataeditors/NPCEditor.java +++ b/src/com/gpl/rpg/atcontentstudio/ui/gamedataeditors/NPCEditor.java @@ -6,7 +6,6 @@ import java.awt.event.ActionEvent; import java.awt.event.ActionListener; import java.util.ArrayList; import java.util.List; -import java.util.concurrent.CopyOnWriteArrayList; import javax.swing.ButtonGroup; import javax.swing.DefaultListCellRenderer; @@ -18,15 +17,8 @@ import javax.swing.JLabel; import javax.swing.JList; import javax.swing.JPanel; import javax.swing.JRadioButton; -import javax.swing.JScrollPane; import javax.swing.JSpinner; import javax.swing.JTextField; -import javax.swing.ListModel; -import javax.swing.ListSelectionModel; -import javax.swing.event.ListDataEvent; -import javax.swing.event.ListDataListener; -import javax.swing.event.ListSelectionEvent; -import javax.swing.event.ListSelectionListener; import com.gpl.rpg.atcontentstudio.ATContentStudio; import com.gpl.rpg.atcontentstudio.model.GameDataElement; diff --git a/src/com/gpl/rpg/atcontentstudio/ui/tools/CommonEditor.java b/src/com/gpl/rpg/atcontentstudio/ui/tools/CommonEditor.java index f32ee3d..37e9059 100644 --- a/src/com/gpl/rpg/atcontentstudio/ui/tools/CommonEditor.java +++ b/src/com/gpl/rpg/atcontentstudio/ui/tools/CommonEditor.java @@ -267,7 +267,7 @@ public final class CommonEditor { } - List listeners = new CopyOnWriteArrayList(); + List listeners = new CopyOnWriteArrayList<>(); @Override public void addListDataListener(ListDataListener l) {