From 3a8c6531a45bc72842f92c68afc5cae1a7ed92a9 Mon Sep 17 00:00:00 2001 From: Paul Buetow Date: Thu, 14 Aug 2008 06:30:15 +0000 Subject: final --- ROADMAP | 7 --- sources/core/VSTask.java | 5 -- sources/prefs/editors/VSAbstractEditor.java | 54 +++++++++---------- sources/simulator/VSLogging.java | 2 +- sources/utils/VS3Tupel.java | 84 +++++++++++++++++++++++++++++ sources/utils/VSTupel.java | 84 ----------------------------- 6 files changed, 112 insertions(+), 124 deletions(-) create mode 100644 sources/utils/VS3Tupel.java delete mode 100644 sources/utils/VSTupel.java diff --git a/ROADMAP b/ROADMAP index f2ac831..00be321 100644 --- a/ROADMAP +++ b/ROADMAP @@ -1,10 +1,3 @@ -TODO -hot links -siehe spaeter -> kapitel () - P1 -> Prozess 1? -Must do: - Literaturangaben komplettieren - Evtl.: Beschreiben, dass Aktivierung/Deaktivierung prioritaet hat bei Ereigniseditor Ereigniseintritt bei Lamport und Vektorzeiten? diff --git a/sources/core/VSTask.java b/sources/core/VSTask.java index 12a7dbb..ccb4d98 100644 --- a/sources/core/VSTask.java +++ b/sources/core/VSTask.java @@ -346,11 +346,6 @@ public class VSTask implements Comparable, VSSerializable { return event; } - /** - * Logg a message. - * - * @param message the message to log - */ /* private void log(String message) { process.log(message); diff --git a/sources/prefs/editors/VSAbstractEditor.java b/sources/prefs/editors/VSAbstractEditor.java index e793a3c..8f03ba4 100644 --- a/sources/prefs/editors/VSAbstractEditor.java +++ b/sources/prefs/editors/VSAbstractEditor.java @@ -337,7 +337,7 @@ public abstract class VSAbstractEditor implements ActionListener { * * @return the tupel representing the component */ - protected VSTupel createIntegerComponent( + protected VS3Tupel createIntegerComponent( String fullKey, String key, VSPrefs prefsToEdit) { String descr = prefsToEdit.getDescription(fullKey); String label = descr == null ? fullKey : descr; @@ -365,7 +365,7 @@ public abstract class VSAbstractEditor implements ActionListener { valComboBox.addItem(new Integer(i)); valComboBox.setBorder(null); - return new VSTupel(label, + return new VS3Tupel(label, createUnitPanel(prefsToEdit, valComboBox, fullKey), valComboBox); } @@ -379,7 +379,7 @@ public abstract class VSAbstractEditor implements ActionListener { * * @return the tupel representing the component */ - protected VSTupel createVectorComponent( + protected VS3Tupel createVectorComponent( String fullKey, String key, VSPrefs prefsToEdit) { String descr = prefsToEdit.getDescription(fullKey); String label = descr == null ? fullKey : descr; @@ -389,7 +389,7 @@ public abstract class VSAbstractEditor implements ActionListener { valField.setBorder(null); valField.setText(vec.toString()); - return new VSTupel(label, + return new VS3Tupel(label, createUnitPanel(prefsToEdit, valField, fullKey), valField); } @@ -400,7 +400,7 @@ public abstract class VSAbstractEditor implements ActionListener { * @param key the key * @param prefsToEdit the prefs to edit */ - protected VSTupel createBooleanComponent( + protected VS3Tupel createBooleanComponent( String fullKey, String key, VSPrefs prefsToEdit) { final String activated = prefs.getString("lang.activated"); String descr = prefsToEdit.getDescription(fullKey); @@ -409,7 +409,7 @@ public abstract class VSAbstractEditor implements ActionListener { prefsToEdit.getBoolean(key)); valField.setBackground(Color.WHITE); valField.setBorder(null); - return new VSTupel(label, + return new VS3Tupel(label, createUnitPanel(prefsToEdit, valField, fullKey), valField); } @@ -422,7 +422,7 @@ public abstract class VSAbstractEditor implements ActionListener { * * @return the tupel representing the component */ - protected VSTupel createLongComponent( + protected VS3Tupel createLongComponent( String fullKey, String key, VSPrefs prefsToEdit) { String descr = prefsToEdit.getDescription(fullKey); String label = descr == null ? fullKey : descr; @@ -436,7 +436,7 @@ public abstract class VSAbstractEditor implements ActionListener { }); valField.setText(""+prefsToEdit.getLong(key)); valField.setBorder(null); - return new VSTupel(label, + return new VS3Tupel(label, createUnitPanel(prefsToEdit, valField, fullKey), valField); } @@ -449,7 +449,7 @@ public abstract class VSAbstractEditor implements ActionListener { * * @return the tupel representing the component */ - protected VSTupel createFloatComponent( + protected VS3Tupel createFloatComponent( String fullKey, String key, VSPrefs prefsToEdit) { String descr = prefsToEdit.getDescription(fullKey); String label = descr == null ? fullKey : descr; @@ -463,7 +463,7 @@ public abstract class VSAbstractEditor implements ActionListener { }); valField.setText(""+prefsToEdit.getFloat(key)); valField.setBorder(null); - return new VSTupel(label, + return new VS3Tupel(label, createUnitPanel(prefsToEdit, valField, fullKey), valField); } @@ -476,7 +476,7 @@ public abstract class VSAbstractEditor implements ActionListener { * * @return the tupel representing the component */ - protected VSTupel createColorComponent( + protected VS3Tupel createColorComponent( String fullKey, String key, final VSPrefs prefsToEdit) { String descr = prefsToEdit.getDescription(fullKey); String label = descr == null ? fullKey : descr; @@ -507,7 +507,7 @@ public abstract class VSAbstractEditor implements ActionListener { } }); valField.setBorder(null); - return new VSTupel(label, + return new VS3Tupel(label, createUnitPanel(prefsToEdit, valField, fullKey), valField); } @@ -520,7 +520,7 @@ public abstract class VSAbstractEditor implements ActionListener { * * @return the tupel representing the component */ - protected VSTupel createStringComponent( + protected VS3Tupel createStringComponent( String fullKey, String key, VSPrefs prefsToEdit) { String descr = prefsToEdit.getDescription(fullKey); String label = descr == null ? fullKey : descr; @@ -534,7 +534,7 @@ public abstract class VSAbstractEditor implements ActionListener { }); valField.setText(prefsToEdit.getString(key)); valField.setBorder(null); - return new VSTupel(label, + return new VS3Tupel(label, createUnitPanel(prefsToEdit, valField, fullKey), valField); } @@ -557,7 +557,7 @@ public abstract class VSAbstractEditor implements ActionListener { for (String key : integerKeys) { String fullKey = VSPrefs.INTEGER_PREFIX + key; - VSTupel tupel = + VS3Tupel tupel = createIntegerComponent(fullKey, key, prefsToEdit); labels.put(fullKey, tupel.getA()); components.put(fullKey, tupel.getB()); @@ -566,7 +566,7 @@ public abstract class VSAbstractEditor implements ActionListener { for (String key : vectorKeys) { String fullKey = VSPrefs.VECTOR_PREFIX + key; - VSTupel tupel = + VS3Tupel tupel = createVectorComponent(fullKey, key, prefsToEdit); labels.put(fullKey, tupel.getA()); components.put(fullKey, tupel.getB()); @@ -575,7 +575,7 @@ public abstract class VSAbstractEditor implements ActionListener { for (String key : booleanKeys) { String fullKey = VSPrefs.BOOLEAN_PREFIX + key; - VSTupel tupel = + VS3Tupel tupel = createBooleanComponent(fullKey, key, prefsToEdit); labels.put(fullKey, tupel.getA()); components.put(fullKey, tupel.getB()); @@ -584,7 +584,7 @@ public abstract class VSAbstractEditor implements ActionListener { for (String key : longKeys) { String fullKey = VSPrefs.LONG_PREFIX + key; - VSTupel tupel = + VS3Tupel tupel = createLongComponent(fullKey, key, prefsToEdit); labels.put(fullKey, tupel.getA()); components.put(fullKey, tupel.getB()); @@ -594,7 +594,7 @@ public abstract class VSAbstractEditor implements ActionListener { for (String key : floatKeys) { String fullKey = VSPrefs.FLOAT_PREFIX + key; - VSTupel tupel = + VS3Tupel tupel = createFloatComponent(fullKey, key, prefsToEdit); labels.put(fullKey, tupel.getA()); components.put(fullKey, tupel.getB()); @@ -604,7 +604,7 @@ public abstract class VSAbstractEditor implements ActionListener { for (String key : colorKeys) { String fullKey = VSPrefs.COLOR_PREFIX + key; - VSTupel tupel = + VS3Tupel tupel = createColorComponent(fullKey, key, prefsToEdit); labels.put(fullKey, tupel.getA()); components.put(fullKey, tupel.getB()); @@ -613,7 +613,7 @@ public abstract class VSAbstractEditor implements ActionListener { for (String key : stringKeys) { String fullKey = VSPrefs.STRING_PREFIX + key; - VSTupel tupel = + VS3Tupel tupel = createStringComponent(fullKey, key, prefsToEdit); labels.put(fullKey, tupel.getA()); components.put(fullKey, tupel.getB()); @@ -765,42 +765,42 @@ public abstract class VSAbstractEditor implements ActionListener { for (String fullKey : fullKeys) { String key = fullKey.substring(fullKey.indexOf(": ") + 2); if (fullKey.startsWith(VSPrefs.INTEGER_PREFIX)) { - VSTupel tupel = + VS3Tupel tupel = createIntegerComponent(fullKey, key, prefsToAdd); this.integerKeys.add(prefsKey+key); this.integerFields.put(prefsKey+key, tupel.getC()); addVariable(prefsKey, tupel.getA(), tupel.getB(), prefsToAdd); } else if (fullKey.startsWith(VSPrefs.VECTOR_PREFIX)) { - VSTupel tupel = + VS3Tupel tupel = createVectorComponent(fullKey, key, prefsToAdd); this.vectorKeys.add(prefsKey+key); this.vectorFields.put(prefsKey+key, tupel.getC()); addVariable(prefsKey, tupel.getA(), tupel.getB(), prefsToAdd); } else if (fullKey.startsWith(VSPrefs.BOOLEAN_PREFIX)) { - VSTupel tupel = + VS3Tupel tupel = createBooleanComponent(fullKey, key, prefsToAdd); this.booleanKeys.add(prefsKey + key); this.booleanFields.put(prefsKey+key, tupel.getC()); addVariable(prefsKey, tupel.getA(), tupel.getB(), prefsToAdd); } else if (fullKey.startsWith(VSPrefs.LONG_PREFIX)) { - VSTupel tupel = + VS3Tupel tupel = createLongComponent(fullKey, key, prefsToAdd); this.longKeys.add(prefsKey+key); this.longFields.put(prefsKey+key, tupel.getC()); addVariable(prefsKey, tupel.getA(), tupel.getB(), prefsToAdd); } else if (fullKey.startsWith(VSPrefs.FLOAT_PREFIX)) { - VSTupel tupel = + VS3Tupel tupel = createFloatComponent(fullKey, key, prefsToAdd); this.floatKeys.add(prefsKey + key); this.floatFields.put(prefsKey+key, tupel.getC()); addVariable(prefsKey, tupel.getA(), tupel.getB(), prefsToAdd); } else if (fullKey.startsWith(VSPrefs.STRING_PREFIX)) { - VSTupel tupel = + VS3Tupel tupel = createStringComponent(fullKey, key, prefsToAdd); this.stringKeys.add(prefsKey + key); this.stringFields.put(prefsKey+key, tupel.getC()); diff --git a/sources/simulator/VSLogging.java b/sources/simulator/VSLogging.java index 41fe8e1..f85ad75 100644 --- a/sources/simulator/VSLogging.java +++ b/sources/simulator/VSLogging.java @@ -81,7 +81,7 @@ public class VSLogging { /** * Sets the simulator canvas. * - * @param simulatorVisualization the simulator canvas + * @param sv the simulator canvas */ public void setSimulatorCanvas(VSSimulatorVisualization sv) { this.simulatorVisualization = sv; diff --git a/sources/utils/VS3Tupel.java b/sources/utils/VS3Tupel.java new file mode 100644 index 0000000..4d4c896 --- /dev/null +++ b/sources/utils/VS3Tupel.java @@ -0,0 +1,84 @@ +/* + * Copyright (c) 2008 Paul C. Buetow, vs@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 utils; + +/** + * The class VS3Tupel, an object of this class represents a 3-Tupel of objects. + * Each object can have its own type. + * + * @author Paul C. Buetow + */ +public final class VS3Tupel { + /** The serial version uid */ + private static final long serialVersionUID = 1L; + + /** The a. */ + private A a; + + /** The b. */ + private B b; + + /** The c. */ + private C c; + + /** + * Instantiates a new tupel. + * + * @param a the a + * @param b the b + * @param c the c + */ + public VS3Tupel(A a, B b, C c) { + this.a = a; + this.b = b; + this.c = c; + } + + /** + * Gets the a. + * + * @return the a + */ + public A getA() { + return a; + } + + /** + * Gets the b. + * + * @return the b + */ + public B getB() { + return b; + } + + /** + * Gets the c. + * + * @return the c + */ + public C getC() { + return c; + } +} diff --git a/sources/utils/VSTupel.java b/sources/utils/VSTupel.java deleted file mode 100644 index 87bd825..0000000 --- a/sources/utils/VSTupel.java +++ /dev/null @@ -1,84 +0,0 @@ -/* - * Copyright (c) 2008 Paul C. Buetow, vs@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 utils; - -/** - * The class VSTupel, an object of this class represents a 3-Tupel of objects. - * Each object can have its own type. - * - * @author Paul C. Buetow - */ -public final class VSTupel { - /** The serial version uid */ - private static final long serialVersionUID = 1L; - - /** The a. */ - private A a; - - /** The b. */ - private B b; - - /** The c. */ - private C c; - - /** - * Instantiates a new tupel. - * - * @param a the a - * @param b the b - * @param c the c - */ - public VSTupel(A a, B b, C c) { - this.a = a; - this.b = b; - this.c = c; - } - - /** - * Gets the a. - * - * @return the a - */ - public A getA() { - return a; - } - - /** - * Gets the b. - * - * @return the b - */ - public B getB() { - return b; - } - - /** - * Gets the c. - * - * @return the c - */ - public C getC() { - return c; - } -} -- cgit v1.2.3