mirror of
https://github.com/hneemann/Digital.git
synced 2025-09-16 16:34:47 -04:00
made setting key list unmodifiable
This commit is contained in:
parent
f8bbd1069a
commit
8210cf0041
@ -10,21 +10,26 @@ import de.neemann.digital.draw.elements.Circuit;
|
||||
|
||||
import java.io.*;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* The Settings of Digital
|
||||
* <p/>
|
||||
* <p>
|
||||
* Created by Helmut.Neemann on 11.05.2016.
|
||||
*/
|
||||
public final class Settings implements AttributeListener {
|
||||
|
||||
private static final List<Key> INT_LIST = new ArrayList<>();
|
||||
|
||||
/**
|
||||
* The list of supported attributes.
|
||||
*/
|
||||
public static final ArrayList<Key> SETTINGS_KEYS = new ArrayList<>();
|
||||
public static final List<Key> SETTINGS_KEYS = Collections.unmodifiableList(INT_LIST);
|
||||
|
||||
|
||||
static {
|
||||
SETTINGS_KEYS.add(Keys.SETTINGS_IEEE_SHAPES);
|
||||
INT_LIST.add(Keys.SETTINGS_IEEE_SHAPES);
|
||||
}
|
||||
|
||||
private static final class SettingsHolder {
|
||||
|
@ -15,7 +15,7 @@ import java.util.ArrayList;
|
||||
*/
|
||||
public class AttributeDialog extends JDialog {
|
||||
|
||||
private final ArrayList<EditorHolder> editors;
|
||||
private final java.util.List<EditorHolder> editors;
|
||||
private boolean changed = false;
|
||||
|
||||
/**
|
||||
@ -25,7 +25,7 @@ public class AttributeDialog extends JDialog {
|
||||
* @param list the list of keys which are to edit
|
||||
* @param elementAttributes the data stored
|
||||
*/
|
||||
public AttributeDialog(Component parent, ArrayList<Key> list, ElementAttributes elementAttributes) {
|
||||
public AttributeDialog(Component parent, java.util.List<Key> list, ElementAttributes elementAttributes) {
|
||||
this(parent, null, list, elementAttributes);
|
||||
}
|
||||
|
||||
@ -37,7 +37,7 @@ public class AttributeDialog extends JDialog {
|
||||
* @param list the list of keys which are to edit
|
||||
* @param elementAttributes the data stored
|
||||
*/
|
||||
public AttributeDialog(Component parent, Point pos, ArrayList<Key> list, ElementAttributes elementAttributes) {
|
||||
public AttributeDialog(Component parent, Point pos, java.util.List<Key> list, ElementAttributes elementAttributes) {
|
||||
super(SwingUtilities.getWindowAncestor(parent), Lang.get("attr_dialogTitle"), ModalityType.APPLICATION_MODAL);
|
||||
setDefaultCloseOperation(DISPOSE_ON_CLOSE);
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user