mirror of
https://github.com/OMGeeky/ATCS.git
synced 2026-02-23 15:38:23 +01:00
cleanup
This commit is contained in:
@@ -21,7 +21,6 @@ import com.gpl.rpg.atcontentstudio.model.gamedata.Droplist;
|
|||||||
import com.gpl.rpg.atcontentstudio.model.gamedata.Droplist.DroppedItem;
|
import com.gpl.rpg.atcontentstudio.model.gamedata.Droplist.DroppedItem;
|
||||||
import com.gpl.rpg.atcontentstudio.model.gamedata.Item;
|
import com.gpl.rpg.atcontentstudio.model.gamedata.Item;
|
||||||
import com.gpl.rpg.atcontentstudio.ui.CollapsiblePanel;
|
import com.gpl.rpg.atcontentstudio.ui.CollapsiblePanel;
|
||||||
import com.gpl.rpg.atcontentstudio.ui.DefaultIcons;
|
|
||||||
import com.gpl.rpg.atcontentstudio.ui.FieldUpdateListener;
|
import com.gpl.rpg.atcontentstudio.ui.FieldUpdateListener;
|
||||||
import com.gpl.rpg.atcontentstudio.ui.tools.CommonEditor;
|
import com.gpl.rpg.atcontentstudio.ui.tools.CommonEditor;
|
||||||
import com.jidesoft.swing.JideBoxLayout;
|
import com.jidesoft.swing.JideBoxLayout;
|
||||||
@@ -48,7 +47,6 @@ public class DroplistEditor extends JSONElementEditor {
|
|||||||
addEditorTab(json_view_id, getJSONView());
|
addEditorTab(json_view_id, getJSONView());
|
||||||
}
|
}
|
||||||
|
|
||||||
@SuppressWarnings({ "rawtypes", "unchecked" })
|
|
||||||
@Override
|
@Override
|
||||||
public void insertFormViewDataField(JPanel pane) {
|
public void insertFormViewDataField(JPanel pane) {
|
||||||
|
|
||||||
@@ -85,8 +83,8 @@ public class DroplistEditor extends JSONElementEditor {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public void updateDroppedItemsEditorPane(JPanel pane, DroppedItem di, FieldUpdateListener listener) {
|
public void updateDroppedItemsEditorPane(JPanel pane, DroppedItem di, FieldUpdateListener listener) {
|
||||||
boolean writable = ((Droplist)target).writable;
|
boolean writable = target.writable;
|
||||||
Project proj = ((Droplist)target).getProject();
|
Project proj = target.getProject();
|
||||||
pane.removeAll();
|
pane.removeAll();
|
||||||
if (itemCombo != null) {
|
if (itemCombo != null) {
|
||||||
removeElementListener(itemCombo);
|
removeElementListener(itemCombo);
|
||||||
@@ -122,7 +120,7 @@ public class DroplistEditor extends JSONElementEditor {
|
|||||||
private static final long serialVersionUID = 7987880146189575234L;
|
private static final long serialVersionUID = 7987880146189575234L;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Component getListCellRendererComponent(@SuppressWarnings("rawtypes") JList list, Object value, int index, boolean isSelected, boolean cellHasFocus) {
|
public Component getListCellRendererComponent(JList list, Object value, int index, boolean isSelected, boolean cellHasFocus) {
|
||||||
Component c = super.getListCellRendererComponent(list, value, index, isSelected, cellHasFocus);
|
Component c = super.getListCellRendererComponent(list, value, index, isSelected, cellHasFocus);
|
||||||
if (c instanceof JLabel) {
|
if (c instanceof JLabel) {
|
||||||
JLabel label = ((JLabel)c);
|
JLabel label = ((JLabel)c);
|
||||||
@@ -161,7 +159,7 @@ public class DroplistEditor extends JSONElementEditor {
|
|||||||
skipNext = false;
|
skipNext = false;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (target.id.equals((String) value)) return;
|
if (target.id.equals(value)) return;
|
||||||
|
|
||||||
if (idChanging()) {
|
if (idChanging()) {
|
||||||
droplist.id = (String) value;
|
droplist.id = (String) value;
|
||||||
|
|||||||
@@ -5,7 +5,6 @@ import java.awt.event.ActionEvent;
|
|||||||
import java.awt.event.ActionListener;
|
import java.awt.event.ActionListener;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.concurrent.CopyOnWriteArrayList;
|
|
||||||
|
|
||||||
import javax.swing.ButtonGroup;
|
import javax.swing.ButtonGroup;
|
||||||
import javax.swing.DefaultListCellRenderer;
|
import javax.swing.DefaultListCellRenderer;
|
||||||
@@ -17,15 +16,8 @@ import javax.swing.JLabel;
|
|||||||
import javax.swing.JList;
|
import javax.swing.JList;
|
||||||
import javax.swing.JPanel;
|
import javax.swing.JPanel;
|
||||||
import javax.swing.JRadioButton;
|
import javax.swing.JRadioButton;
|
||||||
import javax.swing.JScrollPane;
|
|
||||||
import javax.swing.JSpinner;
|
import javax.swing.JSpinner;
|
||||||
import javax.swing.JTextField;
|
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.ATContentStudio;
|
||||||
import com.gpl.rpg.atcontentstudio.model.GameDataElement;
|
import com.gpl.rpg.atcontentstudio.model.GameDataElement;
|
||||||
@@ -464,8 +456,8 @@ public class ItemEditor extends JSONElementEditor {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
boolean writable = ((Item)target).writable;
|
boolean writable = target.writable;
|
||||||
Project proj = ((Item)target).getProject();
|
Project proj = target.getProject();
|
||||||
|
|
||||||
hitSourceConditionBox = addActorConditionBox(pane, proj, "Actor Condition: ", condition.condition, writable, listener);
|
hitSourceConditionBox = addActorConditionBox(pane, proj, "Actor Condition: ", condition.condition, writable, listener);
|
||||||
hitSourceConditionChance = addDoubleField(pane, "Chance: ", condition.chance, writable, listener);
|
hitSourceConditionChance = addDoubleField(pane, "Chance: ", condition.chance, writable, listener);
|
||||||
@@ -560,8 +552,8 @@ public class ItemEditor extends JSONElementEditor {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
boolean writable = ((Item)target).writable;
|
boolean writable = target.writable;
|
||||||
Project proj = ((Item)target).getProject();
|
Project proj = target.getProject();
|
||||||
|
|
||||||
hitTargetConditionBox = addActorConditionBox(pane, proj, "Actor Condition: ", condition.condition, writable, listener);
|
hitTargetConditionBox = addActorConditionBox(pane, proj, "Actor Condition: ", condition.condition, writable, listener);
|
||||||
hitTargetConditionChance = addDoubleField(pane, "Chance: ", condition.chance, writable, listener);
|
hitTargetConditionChance = addDoubleField(pane, "Chance: ", condition.chance, writable, listener);
|
||||||
|
|||||||
Reference in New Issue
Block a user