diff options
| author | Paul Buetow <paul@buetow.org> | 2009-01-27 23:04:44 +0000 |
|---|---|---|
| committer | Paul Buetow <paul@buetow.org> | 2009-01-27 23:04:44 +0000 |
| commit | aaddfbb50b7c7701a47362b8788eb9dfa9fe2be7 (patch) | |
| tree | 1d8b4a384b9953c914b86728b79b2350645672ac | |
| parent | 245e4e67d83b5461e66b22150d163f1c0155a217 (diff) | |
on the good way making english language support working
| -rw-r--r-- | sources/core/VSTask.java | 3 | ||||
| -rw-r--r-- | sources/core/VSTaskManager.java | 3 | ||||
| -rw-r--r-- | sources/events/VSAbstractEvent.java | 16 | ||||
| -rw-r--r-- | sources/events/implementations/VSProcessCrashEvent.java | 11 | ||||
| -rw-r--r-- | sources/events/implementations/VSProcessRecoverEvent.java | 11 | ||||
| -rw-r--r-- | sources/events/internal/VSAbstractInternalEvent.java | 10 | ||||
| -rw-r--r-- | sources/events/internal/VSProtocolEvent.java | 4 | ||||
| -rw-r--r-- | sources/protocols/VSAbstractProtocol.java | 11 | ||||
| -rw-r--r-- | sources/simulator/VSCreateTask.java | 3 | ||||
| -rw-r--r-- | sources/simulator/VSSimulator.java | 14 |
10 files changed, 61 insertions, 25 deletions
diff --git a/sources/core/VSTask.java b/sources/core/VSTask.java index 87e34bf..381b268 100644 --- a/sources/core/VSTask.java +++ b/sources/core/VSTask.java @@ -1,5 +1,6 @@ /* - * Copyright (c) 2008 Paul C. Buetow, vs@dev.buetow.org + * VS-Simulator (http://vs-sim.buetow.org) + * Copyright (c) 2008 -2009 by Dipl.-Inform. (FH) Paul C. Buetow * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License diff --git a/sources/core/VSTaskManager.java b/sources/core/VSTaskManager.java index 5d30c53..8de8d80 100644 --- a/sources/core/VSTaskManager.java +++ b/sources/core/VSTaskManager.java @@ -1,5 +1,6 @@ /* - * Copyright (c) 2008 Paul C. Buetow, vs@dev.buetow.org + * VS-Simulator (http://vs-sim.buetow.org) + * Copyright (c) 2008 -2009 by Dipl.-Inform. (FH) Paul C. Buetow * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License diff --git a/sources/events/VSAbstractEvent.java b/sources/events/VSAbstractEvent.java index a9399eb..ac9a61f 100644 --- a/sources/events/VSAbstractEvent.java +++ b/sources/events/VSAbstractEvent.java @@ -1,5 +1,6 @@ /* - * Copyright (c) 2008 Paul C. Buetow, vs@dev.buetow.org + * VS-Simulator (http://vs-sim.buetow.org) + * Copyright (c) 2008 - 2009 by Dipl.-Inform. (FH) Paul C. Buetow * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License @@ -30,7 +31,6 @@ import core.VSInternalProcess; import exceptions.*; import prefs.*; import serialize.*; -//import utils.*; /** * The class VSAbstractEvent. This abstract class defines the basic framework @@ -202,6 +202,15 @@ abstract public class VSAbstractEvent extends VSSerializablePrefs { */ abstract public void onStart(); + /** + * Every event has to be able to set its own shortname + * + * @param shortName The saved short name. May be overwritten due wrong lang + * + * @return The event's shortname + */ + abstract protected String createShortname(String savedShortname); + /* (non-Javadoc) * @see serialize.VSSerializable#serialize(serialize.VSSerialize, * java.io.ObjectOutputStream) @@ -242,8 +251,9 @@ abstract public class VSAbstractEvent extends VSSerializablePrefs { objectInputStream.readObject(); int id = ((Integer) objectInputStream.readObject()).intValue(); - this.eventShortname = (String) objectInputStream.readObject(); + String savedEventShortname = (String) objectInputStream.readObject(); this.eventClassname = (String) objectInputStream.readObject(); + this.eventShortname = createShortname(savedEventShortname); if (VSSerialize.DEBUG) System.out.println(eventClassname); diff --git a/sources/events/implementations/VSProcessCrashEvent.java b/sources/events/implementations/VSProcessCrashEvent.java index 1493b8c..382906b 100644 --- a/sources/events/implementations/VSProcessCrashEvent.java +++ b/sources/events/implementations/VSProcessCrashEvent.java @@ -1,5 +1,6 @@ /* - * Copyright (c) 2008 Paul C. Buetow, vs@dev.buetow.org + * VS-Simulator (http://vs-sim.buetow.org) + * Copyright (c) 2008 - 2009 by Dipl.-Inform. (FH) Paul C. Buetow * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License @@ -24,6 +25,7 @@ package events.implementations; import events.*; +import simulator.*; /** * The class VSProcessCrashEvent. This event makes a process to crash. @@ -49,6 +51,13 @@ public class VSProcessCrashEvent extends VSAbstractEvent } /* (non-Javadoc) + * @see events.VSAbstractEvent#createShortname()() + */ + protected String createShortname(String savedShortname) { + return VSMain.prefs.getString("lang.en.process.crash"); + } + + /* (non-Javadoc) * @see events.VSAbstractEvent#onStart() */ public void onStart() { diff --git a/sources/events/implementations/VSProcessRecoverEvent.java b/sources/events/implementations/VSProcessRecoverEvent.java index 0143bbb..e7c87db 100644 --- a/sources/events/implementations/VSProcessRecoverEvent.java +++ b/sources/events/implementations/VSProcessRecoverEvent.java @@ -1,5 +1,6 @@ /* - * Copyright (c) 2008 Paul C. Buetow, vs@dev.buetow.org + * VS-Simulator (http://vs-sim.buetow.org) + * Copyright (c) 2008 - 2009 by Dipl.-Inform. (FH) Paul C. Buetow * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License @@ -24,6 +25,7 @@ package events.implementations; import events.*; +import simulator.*; /** * The class VSProcessRecoverEvent. This event makes a process to recover if @@ -50,6 +52,13 @@ public class VSProcessRecoverEvent extends VSAbstractEvent } /* (non-Javadoc) + * @see events.VSAbstractEvent#createShortname()() + */ + protected String createShortname(String savedShortname) { + return VSMain.prefs.getString("lang.en.process.recover"); + } + + /* (non-Javadoc) * @see events.VSAbstractEvent#onStart() */ public void onStart() { diff --git a/sources/events/internal/VSAbstractInternalEvent.java b/sources/events/internal/VSAbstractInternalEvent.java index 5921945..ae0e2b8 100644 --- a/sources/events/internal/VSAbstractInternalEvent.java +++ b/sources/events/internal/VSAbstractInternalEvent.java @@ -1,5 +1,6 @@ /* - * Copyright (c) 2008 Paul C. Buetow, vs@dev.buetow.org + * VS-Simulator (http://vs-sim.buetow.org) + * Copyright (c) 2008 - 2009 by Dipl.-Inform. (FH) Paul C. Buetow * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License @@ -39,6 +40,13 @@ abstract public class VSAbstractInternalEvent extends VSAbstractEvent { private static final long serialVersionUID = 1L; /* (non-Javadoc) + * @see events.VSAbstractEvent#createShortname()() + */ + protected String createShortname(String savedShortname) { + return savedShortname; + } + + /* (non-Javadoc) * @see serialize.VSSerializable#serialize(serialize.VSSerialize, * java.io.ObjectOutputStream) */ diff --git a/sources/events/internal/VSProtocolEvent.java b/sources/events/internal/VSProtocolEvent.java index b4a01ce..92af81e 100644 --- a/sources/events/internal/VSProtocolEvent.java +++ b/sources/events/internal/VSProtocolEvent.java @@ -1,5 +1,6 @@ /* - * Copyright (c) 2008 Paul C. Buetow, vs@dev.buetow.org + * VS-Simulator (http://vs-sim.buetow.org) + * Copyright (c) 2008 - 2009 by Dipl.-Inform. (FH) Paul C. Buetow * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License @@ -29,7 +30,6 @@ import core.VSInternalProcess; import events.*; import protocols.VSAbstractProtocol; import serialize.VSSerialize; -//import simulator.VSSimulatorVisualization; /** * The class VSProtocolEvent, this event is used if a protocol (server or diff --git a/sources/protocols/VSAbstractProtocol.java b/sources/protocols/VSAbstractProtocol.java index 7c84312..43c8958 100644 --- a/sources/protocols/VSAbstractProtocol.java +++ b/sources/protocols/VSAbstractProtocol.java @@ -1,5 +1,6 @@ /* - * Copyright (c) 2008 Paul C. Buetow, vs@dev.buetow.org + * VS-Simulator (http://vs-sim.buetow.org) + * Copyright (c) 2008 - 2009 by Dipl.-Inform. (FH) Paul C. Buetow * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License @@ -31,7 +32,6 @@ import events.*; import events.internal.*; import serialize.*; import simulator.VSSimulatorVisualization; -//import utils.*; /** * The class VSAbstractProtocol, this class defined the basic framework of a @@ -404,6 +404,13 @@ abstract public class VSAbstractProtocol extends VSAbstractEvent { } /* (non-Javadoc) + * @see events.VSAbstractEvent#createShortname()() + */ + protected String createShortname(String savedShortname) { + return savedShortname; + } + + /* (non-Javadoc) * @see prefs.VSPrefs#toString() */ public String toString() { diff --git a/sources/simulator/VSCreateTask.java b/sources/simulator/VSCreateTask.java index 260980a..1b24255 100644 --- a/sources/simulator/VSCreateTask.java +++ b/sources/simulator/VSCreateTask.java @@ -1,5 +1,6 @@ /* - * Copyright (c) 2008 Paul C. Buetow, vs@dev.buetow.org + * VS-Simulator (http://vs-sim.buetow.org) + * Copyright (c) 2008 by Dipl.-Inform. (FH) Paul C. Buetow * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License diff --git a/sources/simulator/VSSimulator.java b/sources/simulator/VSSimulator.java index 779de07..fdcf40d 100644 --- a/sources/simulator/VSSimulator.java +++ b/sources/simulator/VSSimulator.java @@ -1,5 +1,6 @@ /* - * Copyright (c) 2008 Paul C. Buetow, vs@dev.buetow.org + * VS-Simulator (http://vs-sim.buetow.org) + * Copyright (c) 2008 - 2009 by Dipl.-Inform. (FH) Paul C. Buetow * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License @@ -33,12 +34,10 @@ import javax.swing.table.*; import core.*; import events.*; -//import events.internal.*; import exceptions.*; import prefs.*; import prefs.editors.*; import serialize.*; -//import utils.*; /** * The class VSSimulator, an object of this class represents a whole simulator. @@ -78,9 +77,6 @@ public class VSSimulator extends JPanel implements VSSerializable { /** The processes combo box. */ private JComboBox processesComboBox; - /** The global add panel. */ - //private JPanel globalAddPanel; - /** The local add panel. */ private JPanel localAddPanel; @@ -90,9 +86,6 @@ public class VSSimulator extends JPanel implements VSSerializable { /** The loging panel. */ private JPanel logingPanel; - /** The tools panel. */ - //private JPanel toolsPanel; - /** The split pane1. */ private JSplitPane splitPane1; @@ -150,9 +143,6 @@ public class VSSimulator extends JPanel implements VSSerializable { /** The task manager local editor. */ private VSTaskManagerCellEditor taskManagerLocalEditor; - /** The simulator has started. */ - //private boolean hasStarted = false; - /** The last selected process num. */ private int lastSelectedProcessNum; |
