From dc9500c513173a0f527e5edc7a8e9c26f1acd99a Mon Sep 17 00:00:00 2001 From: Paul Buetow Date: Sun, 3 Apr 2022 19:15:16 +0100 Subject: fix java deprecation notices --- sources/prefs/VSDefaultPrefs.java | 26 ------- sources/prefs/VSDefaultPrefsDE.java | 28 +------- sources/prefs/VSPrefs.java | 72 ++++++-------------- sources/prefs/VSPrefsRestriction.java | 32 ++------- sources/prefs/VSSerializablePrefs.java | 33 ++------- sources/prefs/editors/VSAbstractBetterEditor.java | 39 ++--------- sources/prefs/editors/VSAbstractEditor.java | 83 +++++++++++------------ sources/prefs/editors/VSColorChooser.java | 35 +++------- sources/prefs/editors/VSEditorFrame.java | 37 +++------- sources/prefs/editors/VSEditorTable.java | 54 ++++----------- sources/prefs/editors/VSProcessEditor.java | 40 +++-------- sources/prefs/editors/VSSimulatorEditor.java | 37 ++-------- 12 files changed, 126 insertions(+), 390 deletions(-) (limited to 'sources/prefs') diff --git a/sources/prefs/VSDefaultPrefs.java b/sources/prefs/VSDefaultPrefs.java index dfb2d2c..cfa579c 100644 --- a/sources/prefs/VSDefaultPrefs.java +++ b/sources/prefs/VSDefaultPrefs.java @@ -1,26 +1,3 @@ -/* - * Copyright (c) 2008 Paul C. Buetow, vs-sim@dev.buetow.org - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. - * - * All icons of the icons/ folder are under a Creative Commons - * Attribution-Noncommercial-Share Alike License a CC-by-nc-sa. - * - * The icon's homepage is http://code.google.com/p/ultimate-gnome/ - */ - package prefs; import java.awt.Color; @@ -33,9 +10,6 @@ import java.awt.event.KeyEvent; * @author Paul C. Buetow */ public class VSDefaultPrefs extends VSSerializablePrefs { - /** The serial version uid */ - private static final long serialVersionUID = 1L; - /** * Inits a prefs object with default values. * diff --git a/sources/prefs/VSDefaultPrefsDE.java b/sources/prefs/VSDefaultPrefsDE.java index cffa009..fb2eacb 100644 --- a/sources/prefs/VSDefaultPrefsDE.java +++ b/sources/prefs/VSDefaultPrefsDE.java @@ -1,26 +1,3 @@ -/* - * Copyright (c) 2008 Paul C. Buetow, vs-sim@dev.buetow.org - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. - * - * All icons of the icons/ folder are under a Creative Commons - * Attribution-Noncommercial-Share Alike License a CC-by-nc-sa. - * - * The icon's homepage is http://code.google.com/p/ultimate-gnome/ - */ - package prefs; import java.awt.Color; @@ -33,9 +10,6 @@ import java.awt.event.KeyEvent; * @author Paul C. Buetow */ public class VSDefaultPrefsDE extends VSSerializablePrefs { - /** The serial version uid */ - private static final long serialVersionUID = 1L; - /** * Inits a prefs object with default values. * @@ -72,7 +46,7 @@ public class VSDefaultPrefsDE extends VSSerializablePrefs { */ public void fillDefaultStrings() { initString("lang.de.about", "About"); - initString("lang.de.about.info", "Dieses Programm wurde von Paul Bütow im Rahmen der Diplomarbeit \"Objektorientierte Entwicklung eines GUI-basierten Tools für die ereignisbasierte Simulator verteilter Systeme\" bei Prof. Dr.-Ing. Oßmann als 1. Prüfer sowie Betreuer und Prof. Dr. rer. nat. Fassbender als 2. Prüfer erstellt. Bei Fehlern bitte eine kurze Mail mit Fehlerbeschreibung an vs@paul.buetow.org schicken!"); + initString("lang.de.about.info", "Dieses Programm wurde von Paul Bütow im Rahmen der Diplomarbeit \"Objektorientierte Entwicklung eines GUI-basierten Tools für die ereignisbasierte Simulator verteilter Systeme\" bei Prof. Dr.-Ing. Oßmann als 1. Prüfer sowie Betreuer und Prof. Dr. rer. nat. Fassbender als 2. Prüfer erstellt. Bei Fehlern bitte eine kurze Mail mit Fehlerbeschreibung an paul at buetow punkt org schicken!"); initString("lang.de.activate", "aktivieren"); initString("lang.de.activated", "aktiviert"); initString("lang.de.actualize", "Aktualisieren"); diff --git a/sources/prefs/VSPrefs.java b/sources/prefs/VSPrefs.java index 9f3be24..ea128df 100644 --- a/sources/prefs/VSPrefs.java +++ b/sources/prefs/VSPrefs.java @@ -1,33 +1,16 @@ -/* - * Copyright (c) 2008 Paul C. Buetow, vs-sim@dev.buetow.org - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. - * - * All icons of the icons/ folder are under a Creative Commons - * Attribution-Noncommercial-Share Alike License a CC-by-nc-sa. - * - * The icon's homepage is http://code.google.com/p/ultimate-gnome/ - */ - package prefs; import java.awt.Color; -import java.io.*; -import java.util.*; +import java.io.IOException; +import java.io.ObjectInputStream; +import java.io.ObjectOutputStream; +import java.util.ArrayList; +import java.util.Collections; +import java.util.HashMap; +import java.util.Set; +import java.util.Vector; -import serialize.*; +import serialize.VSSerialize; /** * The class VSPrefs, this class is for dynamic data storage. It can hold @@ -36,9 +19,6 @@ import serialize.*; * @author Paul C. Buetow */ public class VSPrefs { - /** Check if we want to overwrite description strings */ - //private boolean useDefaultStrings = false; - /** The Constant BOOLEAN_PREFIX. */ public static final String BOOLEAN_PREFIX = "Boolean: "; @@ -93,9 +73,6 @@ public class VSPrefs { /** The units. */ private HashMap units; - /** The Constant serialVersionUID. */ - private static final long serialVersionUID = 4L; - /** The id counter. */ private static int idCounter; @@ -293,7 +270,7 @@ public class VSPrefs { Boolean val = booleanPrefs.get(key); if (val == null) - return new Boolean(false); + return Boolean.valueOf(false); return val; } @@ -316,7 +293,7 @@ public class VSPrefs { * @param val the val */ public void initBoolean(String key, boolean val) { - initBoolean(key, new Boolean(val)); + initBoolean(key, Boolean.valueOf(val)); } /** @@ -348,7 +325,7 @@ public class VSPrefs { * @param val the val */ public void setBoolean(String key, boolean val) { - setBoolean(key, new Boolean(val)); + setBoolean(key, Boolean.valueOf(val)); } /* Color methods */ @@ -473,7 +450,7 @@ public class VSPrefs { * @param val the val */ public void initFloat(String key, float val) { - initFloat(key, new Float(val)); + initFloat(key, Float.valueOf(val)); } /** @@ -518,7 +495,7 @@ public class VSPrefs { * @param val the val */ public void setFloat(String key, float val) { - setFloat(key, new Float(val)); + setFloat(key, Float.valueOf(val)); } /* Integer methods */ @@ -570,7 +547,7 @@ public class VSPrefs { */ public void initInteger(String key, int val) { if (!integerPrefs.containsKey(key)) - setInteger(key, new Integer(val)); + setInteger(key, Integer.valueOf(val)); } /** @@ -663,7 +640,7 @@ public class VSPrefs { * @param val the val */ public void setInteger(String key, int val) { - setInteger(key, new Integer(val)); + setInteger(key, Integer.valueOf(val)); } /* Integer vector methods */ @@ -801,7 +778,7 @@ public class VSPrefs { * @param val the val */ public void initLong(String key, long val) { - initLong(key, new Long(val)); + initLong(key, Long.valueOf(val)); } /** @@ -855,7 +832,7 @@ public class VSPrefs { * @param val the val */ public void setLong(String key, long val) { - setLong(key, new Long(val)); + setLong(key, Long.valueOf(val)); } /* String methods */ @@ -929,7 +906,7 @@ public class VSPrefs { VSSerialize serialize, ObjectOutputStream objectOutputStream) throws IOException { /** For later backwards compatibility, to add more stuff */ - objectOutputStream.writeObject(new Boolean(false)); + objectOutputStream.writeObject(Boolean.valueOf(false)); objectOutputStream.writeObject(booleanPrefs); objectOutputStream.writeObject(colorPrefs); @@ -943,7 +920,7 @@ public class VSPrefs { objectOutputStream.writeObject(restrictions); /** For later backwards compatibility, to add more stuff */ - objectOutputStream.writeObject(new Boolean(false)); + objectOutputStream.writeObject(Boolean.valueOf(false)); } /* (non-Javadoc) @@ -1198,13 +1175,4 @@ public class VSPrefs { return allKeys; } - - /** - * Not overwrite description string defaults - */ - /* - public void useDefaultStrings(boolean value) { - useDefaultStrings = value; - } - */ } diff --git a/sources/prefs/VSPrefsRestriction.java b/sources/prefs/VSPrefsRestriction.java index 52ab744..27e828d 100644 --- a/sources/prefs/VSPrefsRestriction.java +++ b/sources/prefs/VSPrefsRestriction.java @@ -1,29 +1,9 @@ -/* - * Copyright (c) 2008 Paul C. Buetow, vs-sim@dev.buetow.org - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. - * - * All icons of the icons/ folder are under a Creative Commons - * Attribution-Noncommercial-Share Alike License a CC-by-nc-sa. - * - * The icon's homepage is http://code.google.com/p/ultimate-gnome/ - */ - package prefs; -import java.io.*; +import java.io.IOException; +import java.io.ObjectInputStream; +import java.io.ObjectOutputStream; +import java.io.Serializable; import java.util.Vector; /** @@ -77,8 +57,8 @@ abstract public class VSPrefsRestriction implements Serializable { */ public void writeObject(ObjectOutputStream out) throws IOException { - out.writeObject(new Integer(minValue)); - out.writeObject(new Integer(maxValue)); + out.writeObject(Integer.valueOf(minValue)); + out.writeObject(Integer.valueOf(maxValue)); } /* (non-Javadoc) diff --git a/sources/prefs/VSSerializablePrefs.java b/sources/prefs/VSSerializablePrefs.java index 69ad3f7..b175b41 100644 --- a/sources/prefs/VSSerializablePrefs.java +++ b/sources/prefs/VSSerializablePrefs.java @@ -1,32 +1,12 @@ -/* - * Copyright (c) 2008 Paul C. Buetow, vs-sim@dev.buetow.org - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. - * - * All icons of the icons/ folder are under a Creative Commons - * Attribution-Noncommercial-Share Alike License a CC-by-nc-sa. - * - * The icon's homepage is http://code.google.com/p/ultimate-gnome/ - */ - package prefs; -import java.io.*; //import java.util.*; +import java.io.IOException; +import java.io.ObjectInputStream; +import java.io.ObjectOutputStream; -import serialize.*; +import serialize.VSSerializable; +import serialize.VSSerialize; /** * The class VSSerializablePrefs, this class is used if the VSPrefs should @@ -35,8 +15,6 @@ import serialize.*; * @author Paul C. Buetow */ public class VSSerializablePrefs extends VSPrefs implements VSSerializable { - /** The Constant serialVersionUID. */ - private static final long serialVersionUID = 4L; /* (non-Javadoc) * @see serialize.VSSerializable#serialize(serialize.VSSerialize, * java.io.ObjectOutputStream) @@ -51,7 +29,6 @@ public class VSSerializablePrefs extends VSPrefs implements VSSerializable { * @see serialize.VSSerializable#deserialize(serialize.VSSerialize, * java.io.ObjectInputStream) */ - @SuppressWarnings("unchecked") public synchronized void deserialize(VSSerialize serialize, ObjectInputStream objectInputStream) throws IOException, ClassNotFoundException { diff --git a/sources/prefs/editors/VSAbstractBetterEditor.java b/sources/prefs/editors/VSAbstractBetterEditor.java index 9d3fb88..87296b6 100644 --- a/sources/prefs/editors/VSAbstractBetterEditor.java +++ b/sources/prefs/editors/VSAbstractBetterEditor.java @@ -1,33 +1,13 @@ -/* - * Copyright (c) 2008 Paul C. Buetow, vs-sim@dev.buetow.org - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. - * - * All icons of the icons/ folder are under a Creative Commons - * Attribution-Noncommercial-Share Alike License a CC-by-nc-sa. - * - * The icon's homepage is http://code.google.com/p/ultimate-gnome/ - */ - package prefs.editors; -import java.awt.*; -import java.awt.event.*; -import javax.swing.*; +import java.awt.Color; +import java.awt.Container; +import java.awt.event.ActionEvent; + +import javax.swing.BoxLayout; +import javax.swing.JPanel; -import prefs.*; +import prefs.VSPrefs; /** * The class VSAbstractBetterEditor, is an improved VSAbstractEditor. @@ -35,14 +15,9 @@ import prefs.*; * @author Paul C. Buetow */ public abstract class VSAbstractBetterEditor extends VSAbstractEditor { - /** The serial version uid */ - private static final long serialVersionUID = 1L; - /** The content pane. */ private Container contentPane; - /** The info area. */ - /** The title. */ private String title; diff --git a/sources/prefs/editors/VSAbstractEditor.java b/sources/prefs/editors/VSAbstractEditor.java index 38f0226..e849a50 100644 --- a/sources/prefs/editors/VSAbstractEditor.java +++ b/sources/prefs/editors/VSAbstractEditor.java @@ -1,35 +1,33 @@ -/* - * Copyright (c) 2008 Paul C. Buetow, vs-sim@dev.buetow.org - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. - * - * All icons of the icons/ folder are under a Creative Commons - * Attribution-Noncommercial-Share Alike License a CC-by-nc-sa. - * - * The icon's homepage is http://code.google.com/p/ultimate-gnome/ - */ - package prefs.editors; -import java.awt.*; -import java.awt.event.*; -import javax.swing.*; -import java.util.*; - -import utils.*; -import prefs.*; +import java.awt.Color; +import java.awt.Component; +import java.awt.GridBagLayout; +import java.awt.event.ActionEvent; +import java.awt.event.ActionListener; +import java.awt.event.MouseEvent; +import java.awt.event.MouseListener; +import java.util.ArrayList; +import java.util.Collections; +import java.util.HashMap; +import java.util.Set; +import java.util.Vector; + +import javax.swing.BoxLayout; +import javax.swing.JButton; +import javax.swing.JCheckBox; +import javax.swing.JComboBox; +import javax.swing.JComponent; +import javax.swing.JFrame; +import javax.swing.JLabel; +import javax.swing.JPanel; +import javax.swing.JScrollPane; +import javax.swing.JTextField; + +import prefs.VSPrefs; +import prefs.VSPrefsRestriction; +import utils.VS3Tupel; +import utils.VSFrame; /** * The class VSAbstractEditor, an object of this class is used in order to @@ -38,9 +36,6 @@ import prefs.*; * @author Paul C. Buetow */ public abstract class VSAbstractEditor implements ActionListener { - /** The serial version uid */ - private static final long serialVersionUID = 1L; - /** The boolean keys. */ private ArrayList booleanKeys; @@ -66,7 +61,7 @@ public abstract class VSAbstractEditor implements ActionListener { private HashMap booleanFields; /** The integer fields. */ - private HashMap integerFields; + private HashMap> integerFields; /** The vector fields. */ private HashMap vectorFields; @@ -219,7 +214,7 @@ public abstract class VSAbstractEditor implements ActionListener { colorFields = new HashMap(); floatFields = new HashMap(); - integerFields = new HashMap(); + integerFields = new HashMap>(); vectorFields = new HashMap(); longFields = new HashMap(); booleanFields = new HashMap(); @@ -337,7 +332,7 @@ public abstract class VSAbstractEditor implements ActionListener { * * @return the tupel representing the component */ - protected VS3Tupel createIntegerComponent( + protected VS3Tupel> createIntegerComponent( String fullKey, String key, VSPrefs prefsToEdit) { String descr = prefs.getDescription(fullKey); if (descr == null) @@ -345,7 +340,7 @@ public abstract class VSAbstractEditor implements ActionListener { String label = descr == null ? fullKey : descr; Integer integer = prefsToEdit.getInteger(key); Integer initialSelection[] = { integer }; - JComboBox valComboBox = new JComboBox(initialSelection); + JComboBox valComboBox = new JComboBox<>(initialSelection); VSPrefsRestriction settingRestriction = prefsToEdit.getRestriction(fullKey); @@ -364,10 +359,10 @@ public abstract class VSAbstractEditor implements ActionListener { } for (int i = minValue; i <= maxValue; ++i) - valComboBox.addItem(new Integer(i)); + valComboBox.addItem(Integer.valueOf(i)); valComboBox.setBorder(null); - return new VS3Tupel(label, + return new VS3Tupel>(label, createUnitPanel(prefsToEdit, valComboBox, fullKey), valComboBox); } @@ -571,7 +566,7 @@ public abstract class VSAbstractEditor implements ActionListener { for (String key : integerKeys) { String fullKey = VSPrefs.INTEGER_PREFIX + key; - VS3Tupel tupel = + VS3Tupel> tupel = createIntegerComponent(fullKey, key, prefsToEdit); labels.put(fullKey, tupel.getA()); components.put(fullKey, tupel.getB()); @@ -779,7 +774,7 @@ public abstract class VSAbstractEditor implements ActionListener { for (String fullKey : fullKeys) { String key = fullKey.substring(fullKey.indexOf(": ") + 2); if (fullKey.startsWith(VSPrefs.INTEGER_PREFIX)) { - VS3Tupel tupel = + VS3Tupel> tupel = createIntegerComponent(fullKey, key, prefsToAdd); this.integerKeys.add(prefsKey+key); this.integerFields.put(prefsKey+key, tupel.getC()); @@ -862,7 +857,7 @@ public abstract class VSAbstractEditor implements ActionListener { */ protected void resetPrefs() { for (String key : integerKeys) { - JComboBox valComboBox = integerFields.get(key); + JComboBox valComboBox = integerFields.get(key); valComboBox.setSelectedIndex(0); } @@ -900,7 +895,7 @@ public abstract class VSAbstractEditor implements ActionListener { for (String key : stringKeys) { String keys[] = getKeys(key); - JTextField valField = stringFields.get(keys); + JTextField valField = stringFields.get(key); valField.setText(prefsToEditMap.get(keys[1]).getString(keys[0])); } } @@ -931,7 +926,7 @@ public abstract class VSAbstractEditor implements ActionListener { for (String key : integerKeys) { String keys[] = getKeys(key); - JComboBox valComboBox = integerFields.get(key); + JComboBox valComboBox = integerFields.get(key); prefsToEditMap.get( keys[1]).setInteger(keys[0], (Integer) valComboBox.getSelectedItem()); diff --git a/sources/prefs/editors/VSColorChooser.java b/sources/prefs/editors/VSColorChooser.java index 532cdae..4f53fb4 100644 --- a/sources/prefs/editors/VSColorChooser.java +++ b/sources/prefs/editors/VSColorChooser.java @@ -1,31 +1,14 @@ -/* - * Copyright (c) 2008 Paul C. Buetow, vs-sim@dev.buetow.org - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. - * - * All icons of the icons/ folder are under a Creative Commons - * Attribution-Noncommercial-Share Alike License a CC-by-nc-sa. - * - * The icon's homepage is http://code.google.com/p/ultimate-gnome/ - */ - package prefs.editors; -import java.awt.*; -import javax.swing.*; -import javax.swing.event.*; +import java.awt.BorderLayout; +import java.awt.Color; + +import javax.swing.BorderFactory; +import javax.swing.JColorChooser; +import javax.swing.JPanel; +import javax.swing.JTextField; +import javax.swing.event.ChangeEvent; +import javax.swing.event.ChangeListener; import prefs.VSPrefs; diff --git a/sources/prefs/editors/VSEditorFrame.java b/sources/prefs/editors/VSEditorFrame.java index 3bbee1d..650a619 100644 --- a/sources/prefs/editors/VSEditorFrame.java +++ b/sources/prefs/editors/VSEditorFrame.java @@ -1,34 +1,15 @@ -/* - * Copyright (c) 2008 Paul C. Buetow, vs-sim@dev.buetow.org - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. - * - * All icons of the icons/ folder are under a Creative Commons - * Attribution-Noncommercial-Share Alike License a CC-by-nc-sa. - * - * The icon's homepage is http://code.google.com/p/ultimate-gnome/ - */ - package prefs.editors; -import java.awt.*; -import java.awt.event.*; -import javax.swing.*; +import java.awt.Component; +import java.awt.event.ActionEvent; +import java.awt.event.ActionListener; + +import javax.swing.JButton; +import javax.swing.JFrame; +import javax.swing.JPanel; -import prefs.*; -import utils.*; +import prefs.VSPrefs; +import utils.VSFrame; /** * The class VSEditorFrame, this is a wrapper around an VSAbstractEditor diff --git a/sources/prefs/editors/VSEditorTable.java b/sources/prefs/editors/VSEditorTable.java index 4fff4a2..30ae30c 100644 --- a/sources/prefs/editors/VSEditorTable.java +++ b/sources/prefs/editors/VSEditorTable.java @@ -1,37 +1,22 @@ -/* - * Copyright (c) 2008 Paul C. Buetow, vs-sim@dev.buetow.org - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. - * - * All icons of the icons/ folder are under a Creative Commons - * Attribution-Noncommercial-Share Alike License a CC-by-nc-sa. - * - * The icon's homepage is http://code.google.com/p/ultimate-gnome/ - */ - package prefs.editors; -import java.util.*; +import java.awt.Color; +import java.awt.Component; +import java.awt.Dimension; +import java.util.ArrayList; -import java.awt.*; -//import java.io.*; -import javax.swing.*; -import javax.swing.table.*; -import javax.swing.text.*; +import javax.swing.AbstractCellEditor; +import javax.swing.JTable; +import javax.swing.JTextField; +import javax.swing.JTextPane; +import javax.swing.table.AbstractTableModel; +import javax.swing.table.TableCellEditor; +import javax.swing.table.TableCellRenderer; +import javax.swing.table.TableColumn; +import javax.swing.text.Style; +import javax.swing.text.StyleConstants; -import prefs.*; +import prefs.VSPrefs; /** * The class VSEditorTable, each VSAbstractEditor uses an object of this class @@ -43,12 +28,6 @@ public class VSEditorTable extends JTable { /** The serial version uid */ private static final long serialVersionUID = 1L; - /** The Constant MIN_ROWS. */ - //private static final int MIN_ROWS = 20; - - /** The prefs. */ - //private VSPrefs prefs; - /** The nodes. */ private ArrayList nodes; @@ -59,9 +38,6 @@ public class VSEditorTable extends JTable { * The class VSNode. */ private class VSNode { - /** The serial version uid */ - private static final long serialVersionUID = 1L; - /** The key. */ private String key; diff --git a/sources/prefs/editors/VSProcessEditor.java b/sources/prefs/editors/VSProcessEditor.java index 0009f9a..8035085 100644 --- a/sources/prefs/editors/VSProcessEditor.java +++ b/sources/prefs/editors/VSProcessEditor.java @@ -1,36 +1,15 @@ -/* - * Copyright (c) 2008 Paul C. Buetow, vs-sim@dev.buetow.org - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. - * - * All icons of the icons/ folder are under a Creative Commons - * Attribution-Noncommercial-Share Alike License a CC-by-nc-sa. - * - * The icon's homepage is http://code.google.com/p/ultimate-gnome/ - */ - package prefs.editors; -import java.awt.event.*; -import javax.swing.*; -import java.util.*; +import java.awt.event.ActionEvent; +import java.util.ArrayList; -import core.*; -import protocols.*; -import events.*; +import javax.swing.JButton; +import javax.swing.JPanel; + +import core.VSInternalProcess; +import events.VSRegisteredEvents; import prefs.VSPrefs; +import protocols.VSAbstractProtocol; /** * The class VSProcessEditor, is for editing a VSInternalProcess object. @@ -38,9 +17,6 @@ import prefs.VSPrefs; * @author Paul C. Buetow */ public class VSProcessEditor extends VSAbstractBetterEditor { - /** The serial version uid */ - private static final long serialVersionUID = 1L; - /** The process. */ private VSInternalProcess process; diff --git a/sources/prefs/editors/VSSimulatorEditor.java b/sources/prefs/editors/VSSimulatorEditor.java index 137ca77..53eea0a 100644 --- a/sources/prefs/editors/VSSimulatorEditor.java +++ b/sources/prefs/editors/VSSimulatorEditor.java @@ -1,33 +1,13 @@ -/* - * Copyright (c) 2008 Paul C. Buetow, vs-sim@dev.buetow.org - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. - * - * All icons of the icons/ folder are under a Creative Commons - * Attribution-Noncommercial-Share Alike License a CC-by-nc-sa. - * - * The icon's homepage is http://code.google.com/p/ultimate-gnome/ - */ - package prefs.editors; -import java.awt.event.*; -import javax.swing.*; +import java.awt.event.ActionEvent; -import simulator.*; -import prefs.*; +import javax.swing.JButton; +import javax.swing.JPanel; + +import prefs.VSPrefs; +import simulator.VSSimulator; +import simulator.VSSimulatorFrame; /** * The class VSSimulatorEditor, is for editing a VSSimulator object. @@ -35,9 +15,6 @@ import prefs.*; * @author Paul C. Buetow */ public class VSSimulatorEditor extends VSAbstractBetterEditor { - /** The serial version uid */ - private static final long serialVersionUID = 1L; - /** The constant OPENED_NEW_WINDOW */ public static final boolean OPENED_NEW_WINDOW = true; -- cgit v1.2.3