summaryrefslogtreecommitdiff
path: root/sources
diff options
context:
space:
mode:
Diffstat (limited to 'sources')
-rw-r--r--sources/core/VSMessage.java4
-rw-r--r--sources/core/VSTaskManager.java53
-rw-r--r--sources/events/VSEvent.java1
-rw-r--r--sources/events/VSProcessEvent.java4
-rw-r--r--sources/events/VSRegisteredEvents.java10
-rw-r--r--sources/events/implementations/ProcessCrashEvent.java2
-rw-r--r--sources/events/implementations/ProcessRecoverEvent.java2
-rw-r--r--sources/events/implementations/ProtocolActivateEvent.java11
-rw-r--r--sources/events/implementations/ProtocolEvent.java52
-rw-r--r--sources/prefs/VSDefaultPrefs.java23
-rw-r--r--sources/protocols/VSProtocol.java21
-rw-r--r--sources/protocols/VSRegisteredProtocols.java52
-rw-r--r--sources/simulator/VSLogging.java4
-rw-r--r--sources/simulator/VSSimulation.java84
14 files changed, 207 insertions, 116 deletions
diff --git a/sources/core/VSMessage.java b/sources/core/VSMessage.java
index 1bd4ca6..3989539 100644
--- a/sources/core/VSMessage.java
+++ b/sources/core/VSMessage.java
@@ -59,5 +59,9 @@ public class VSMessage extends VSPrefs implements VSEvent {
public boolean equals(VSMessage message) {
return messageID == message.getMessageID();
}
+
+ public void logg(String message) {
+ //System.out.println(message);
+ }
}
diff --git a/sources/core/VSTaskManager.java b/sources/core/VSTaskManager.java
index f8d3f63..474bc45 100644
--- a/sources/core/VSTaskManager.java
+++ b/sources/core/VSTaskManager.java
@@ -204,21 +204,21 @@ public class VSTaskManager {
}
public synchronized LinkedList<VSTask> getProtocolTasks(VSProtocol protocol) {
- LinkedList<VSTask> protocolVSTasks = new LinkedList<VSTask>();
+ LinkedList<VSTask> protocolTasks = new LinkedList<VSTask>();
for (VSTask task : fullfilledProgrammedTasks)
if (task.isProtocol(protocol))
- protocolVSTasks.addLast(task);
+ protocolTasks.addLast(task);
for (VSTask task : globalTasks)
if (task.isProtocol(protocol))
- protocolVSTasks.addLast(task);
+ protocolTasks.addLast(task);
for (VSTask task : tasks)
if (task.isProtocol(protocol))
- protocolVSTasks.addLast(task);
+ protocolTasks.addLast(task);
- return protocolVSTasks;
+ return protocolTasks;
}
public synchronized LinkedList<VSTask> getNonProtocolTasks(VSProtocol protocol) {
@@ -239,11 +239,10 @@ public class VSTaskManager {
return nonProtocolTasks;
}
- public synchronized void modifyProtocolTasks(VSProtocol protocol, LinkedList<VSTask> protocolVSTasks) {
+ public synchronized void modifyProtocolTasks(VSProtocol protocol, LinkedList<VSTask> protocolTasks) {
VSProcess process = protocol.getProcess();
LinkedList<VSTask> nonProtocolTasks = getNonProtocolTasks(protocol);
- //System.out.println("NON PROTO: " + nonProtocolTasks);
- ListIterator<VSTask> iter1 = protocolVSTasks.listIterator(0);
+ ListIterator<VSTask> iter1 = protocolTasks.listIterator(0);
ListIterator<VSTask> iter2 = nonProtocolTasks.listIterator(0);
long localTime = process.getTime();
@@ -258,7 +257,7 @@ public class VSTaskManager {
insert(task);
}
- for (VSTask task : protocolVSTasks) {
+ for (VSTask task : protocolTasks) {
if (task.getTaskTime() < localTime)
fullfilledProgrammedTasks.addLast(task);
else
@@ -267,25 +266,37 @@ public class VSTaskManager {
}
public String toString() {
- final String taskManager = prefs.getString("lang.taskmanager");
- String descr = "fullfilled: ";
+ StringBuffer buffer = new StringBuffer();
- for (VSTask task : fullfilledProgrammedTasks)
- descr += task + "; ";
+ buffer.append(prefs.getString("lang.task.manager"));
+ buffer.append(" (");
+ buffer.append(prefs.getString("lang.tasks.fullfilled"));
+ buffer.append(": ");
+
+ for (VSTask task : fullfilledProgrammedTasks) {
+ buffer.append(task);
+ buffer.append("; ");
+ }
- descr += "global: ";
+ buffer.append(prefs.getString("lang.tasks.global"));
- for (VSTask task : globalTasks)
- descr += task + "; ";
+ for (VSTask task : globalTasks) {
+ buffer.append(task);
+ buffer.append("; ");
+ }
- descr += "local: ";
+ buffer.append(prefs.getString("lang.tasks.local"));
- for (VSTask task : tasks)
- descr += task + "; ";
+ for (VSTask task : tasks) {
+ buffer.append(task);
+ buffer.append("; ");
+ }
+
+ String descr = buffer.toString();
if (descr.endsWith("; "))
- return taskManager + " (" + descr.substring(0, descr.length()-2) + ")";
+ return descr.substring(0, descr.length()-2) + ")";
- return taskManager + " (" + descr + ")";
+ return descr + ")";
}
}
diff --git a/sources/events/VSEvent.java b/sources/events/VSEvent.java
index 2435320..2223d22 100644
--- a/sources/events/VSEvent.java
+++ b/sources/events/VSEvent.java
@@ -4,4 +4,5 @@ import core.VSProcess;
public interface VSEvent {
public void init(VSProcess process);
+ public void logg(String message);
}
diff --git a/sources/events/VSProcessEvent.java b/sources/events/VSProcessEvent.java
index 28f6b86..dcffa5e 100644
--- a/sources/events/VSProcessEvent.java
+++ b/sources/events/VSProcessEvent.java
@@ -12,5 +12,9 @@ abstract public class VSProcessEvent implements VSEvent {
this.prefs = process.getPrefs();
}
+ public void logg(String message) {
+ process.logg(message);
+ }
+
abstract public void onStart();
}
diff --git a/sources/events/VSRegisteredEvents.java b/sources/events/VSRegisteredEvents.java
new file mode 100644
index 0000000..38676ca
--- /dev/null
+++ b/sources/events/VSRegisteredEvents.java
@@ -0,0 +1,10 @@
+package events;
+
+import java.util.*;
+
+import prefs.*;
+import core.*;
+import utils.*;
+
+public final class VSRegisteredEvents {
+}
diff --git a/sources/events/implementations/ProcessCrashEvent.java b/sources/events/implementations/ProcessCrashEvent.java
index de5dfa5..c82fdb4 100644
--- a/sources/events/implementations/ProcessCrashEvent.java
+++ b/sources/events/implementations/ProcessCrashEvent.java
@@ -5,7 +5,7 @@ import events.VSProcessEvent;
public class ProcessCrashEvent extends VSProcessEvent {
public void onStart() {
- process.logg(prefs.getString("lang.crashed"));
process.isCrashed(true);
+ logg(prefs.getString("lang.crashed"));
}
}
diff --git a/sources/events/implementations/ProcessRecoverEvent.java b/sources/events/implementations/ProcessRecoverEvent.java
index 6522537..f0b54d4 100644
--- a/sources/events/implementations/ProcessRecoverEvent.java
+++ b/sources/events/implementations/ProcessRecoverEvent.java
@@ -5,7 +5,7 @@ import events.VSProcessEvent;
public class ProcessRecoverEvent extends VSProcessEvent {
public void onStart() {
- process.logg(prefs.getString("lang.recovered"));
process.isCrashed(false);
+ logg(prefs.getString("lang.recovered"));
}
}
diff --git a/sources/events/implementations/ProtocolActivateEvent.java b/sources/events/implementations/ProtocolActivateEvent.java
deleted file mode 100644
index 6522537..0000000
--- a/sources/events/implementations/ProtocolActivateEvent.java
+++ /dev/null
@@ -1,11 +0,0 @@
-package events.implementations;
-
-import core.VSProcess;
-import events.VSProcessEvent;
-
-public class ProcessRecoverEvent extends VSProcessEvent {
- public void onStart() {
- process.logg(prefs.getString("lang.recovered"));
- process.isCrashed(false);
- }
-}
diff --git a/sources/events/implementations/ProtocolEvent.java b/sources/events/implementations/ProtocolEvent.java
new file mode 100644
index 0000000..442407d
--- /dev/null
+++ b/sources/events/implementations/ProtocolEvent.java
@@ -0,0 +1,52 @@
+package events.implementations;
+
+import core.VSProcess;
+import events.VSProcessEvent;
+import protocols.VSRegisteredProtocols;
+
+public class ProtocolEvent extends VSProcessEvent {
+ private String protocolClassname;
+ private boolean isClientProtocol; /* true = client, false = server */
+ private boolean isProtocolActivation; /* true = activate, false = deactivate */
+
+ public void setProtocolClassname(String protocolClassname) {
+ this.protocolClassname = protocolClassname;
+ }
+
+ public String getProtocolClassname() {
+ return protocolClassname;
+ }
+
+ public void isClientProtocol(boolean isClientProtocol) {
+ this.isClientProtocol = isClientProtocol;
+ }
+
+ public boolean isClientProtocol() {
+ return isClientProtocol;
+ }
+
+ public void isProtocolActivation(boolean isProtocolActivation) {
+ this.isProtocolActivation = isProtocolActivation;
+ }
+
+ public boolean isProtocolActivation() {
+ return isProtocolActivation;
+ }
+
+ public void onStart() {
+ String type = isClientProtocol ? "client" : "server";
+ String name = VSRegisteredProtocols.getProtocolName(protocolClassname);
+ process.setBoolean("sim."+name.toLowerCase()+"."+type+".enabled!", isProtocolActivation);
+
+ StringBuffer buffer = new StringBuffer();
+ buffer.append(VSRegisteredProtocols.getProtocolShortname(protocolClassname));
+ buffer.append(" ");
+ buffer.append(isClientProtocol
+ ? prefs.getString("lang.client") : prefs.getString("lang.server"));
+ buffer.append(" ");
+ buffer.append(isProtocolActivation
+ ? prefs.getString("lang.activated") : prefs.getString("lang.deactivated"));
+
+ logg(buffer.toString());
+ }
+}
diff --git a/sources/prefs/VSDefaultPrefs.java b/sources/prefs/VSDefaultPrefs.java
index 98d8083..1ffe175 100644
--- a/sources/prefs/VSDefaultPrefs.java
+++ b/sources/prefs/VSDefaultPrefs.java
@@ -39,25 +39,30 @@ public class VSDefaultPrefs extends VSPrefs {
}
public void fillDefaultStrings() {
+ initString("lang.clientrequest.start", "Clientanfrage starten");
initString("lang.about", "About");
initString("lang.about.info!", "Dieses Programm wurde von Paul Bütow im Rahmen der Diplomarbeit bei Prof. Dr.-Ing. Oßmann erstellt. Dieses Programm stellt noch keinesfalls eine fertige Version dar, da es sich noch in Entwicklung befindet und die Diplomarbeit erst mitte August abgeschlossen sein wird! Bei Fehlern bitte eine kurze Mail mitsamt Fehlerbeschreibung an paul@buetow.org schicken! Dieser Simulator wird später außerdem unter einer open source Linzenz (wahrscheinlich der GNU General Public License) freigegeben!");
initString("lang.activate", "aktivieren");
initString("lang.activated", "Aktiviert");
initString("lang.actualize", "Aktualisieren");
initString("lang.cancel", "Abbrechen");
- initString("lang.global", "Global");
- initString("lang.local", "Lokal");
initString("lang.client", "Client");
initString("lang.close", "Schliessen");
initString("lang.colorchooser", "Farbauswahl");
initString("lang.colorchooser2", "Bitte Farbe auswählen");
initString("lang.crash", "Abstürzen");
initString("lang.crashed", "Abgestürzt");
+ initString("lang.deactivate", "deaktivieren");
initString("lang.default", "Defaults");
initString("lang.edit", "Editieren");
initString("lang.editor", "Editor");
+ initString("lang.event", "Ereignis");
+ initString("lang.events.process", "Prozessereignisse");
+ initString("lang.events.protocol", "Protokollereignisse");
initString("lang.file", "Datei");
initString("lang.filter", "Filter");
+ initString("lang.global", "Global");
+ initString("lang.local", "Lokal");
initString("lang.logging.active", "Logging");
initString("lang.logging.clear", "Loggs löschen");
initString("lang.message", "Nachricht");
@@ -77,10 +82,8 @@ public class VSDefaultPrefs extends VSPrefs {
initString("lang.prefs.protocol", "Protokolleinstellungen");
initString("lang.prefs.protocol.info!", "Änderungen werden erst nach Betätigen des \"Übernehmen\" oder \"OK\" Knopfes übernommen!");
initString("lang.process", "Prozess");
- initString("lang.process.clock.variance", "Uhrabweichung");
initString("lang.process.id", "PID");
initString("lang.process.new", "Neuer Prozess");
- initString("lang.process.task", "Prozessereignis");
initString("lang.process.time.local", "Lokale Zeit");
initString("lang.protocol", "Protokoll");
initString("lang.protocol.client", "Clientseite");
@@ -93,7 +96,7 @@ public class VSDefaultPrefs extends VSPrefs {
initString("lang.recovered", "Wiederbelebt");
initString("lang.remove", "Entfernen");
initString("lang.replay", "Wiederholen");
- initString("lang.requesttime", "Requestzeit");
+ initString("lang.requests", "Anfragen");
initString("lang.reset", "Reset");
initString("lang.save", "Speichern");
initString("lang.saveas", "Speichern unter");
@@ -107,11 +110,13 @@ public class VSDefaultPrefs extends VSPrefs {
initString("lang.start", "Starten");
initString("lang.stop", "Stoppen");
initString("lang.takeover", "Übernehmen");
- initString("lang.taskmanager", "Taskmanager");
+ initString("lang.task.manager", "Aufgabenmanager");
+ initString("lang.tasks.fullfilled", "Abgelaufene Aufgaben");
+ initString("lang.tasks.global", "Globale Aufgaben");
+ initString("lang.tasks.local", "Lokale Aufgaben");
+ initString("lang.time", "Zeit");
initString("lang.time.lamport", "Lamportzeit");
initString("lang.time.vector", "Vektorzeit");
- initString("lang.time", "Zeit");
- initString("lang.event", "Ereignis");
initString("lang.type", "Typ");
initString("name", "Verteilte Systeme v0.2-devel");
}
@@ -150,7 +155,7 @@ public class VSDefaultPrefs extends VSPrefs {
initIntegerUnit("window.prefs.xsize", 350, "X-Grösse des Einstellungsfensters", 550, 3200, "px");
initIntegerUnit("window.prefs.ysize", 600, "Y-Grösse des Einstellungsfensters", 640, 2400, "px");
initIntegerUnit("window.loggsize", 300, "Y-Grösse des Loggingfensters", 100, 1000, "px");
- initIntegerUnit("window.splitsize", 265, null, 100, 1000, "px");
+ initIntegerUnit("window.splitsize", 285, null, 100, 1000, "px");
initIntegerUnit("window.xsize", 1024, "X-Grösse des Hauptfensters", 800, 3200, "px");
initIntegerUnit("window.ysize", 768, "Y-Grösse des Hauptfensters", 600, 2400, "px");
}
diff --git a/sources/protocols/VSProtocol.java b/sources/protocols/VSProtocol.java
index 761c427..a7c5823 100644
--- a/sources/protocols/VSProtocol.java
+++ b/sources/protocols/VSProtocol.java
@@ -34,6 +34,10 @@ abstract public class VSProtocol extends VSPrefs implements VSEvent {
return VSRegisteredProtocols.getProtocolName(protocolClassname);
}
+ public final String getProtocolShortname() {
+ return VSRegisteredProtocols.getProtocolShortname(protocolClassname);
+ }
+
public final VSProcess getProcess() {
return process;
}
@@ -99,7 +103,7 @@ abstract public class VSProtocol extends VSPrefs implements VSEvent {
abstract protected void onServerReset();
abstract protected void onServerRecv(VSMessage message);
- protected void logg(String message) {
+ public void logg(String message) {
process.logg(toString() + "; " + message);
}
@@ -112,15 +116,18 @@ abstract public class VSProtocol extends VSPrefs implements VSEvent {
}
public String toString() {
- String type = new String();
+ StringBuffer buffer = new StringBuffer();
- if (currentContextIsServer)
- type += prefs.getString("lang.server");
+ buffer.append(prefs.getString("lang.protocol"));
+ buffer.append(": ");
+ buffer.append(getProtocolShortname());
+ buffer.append(" ");
+ if (currentContextIsServer)
+ buffer.append(prefs.getString("lang.server"));
else
- type += prefs.getString("lang.client");
+ buffer.append(prefs.getString("lang.client"));
- return prefs.getString("lang.protocol") + ": "
- + VSRegisteredProtocols.getProtocolName(getProtocolClassname()) + " " + type;// + "; ID: " + getID();
+ return buffer.toString();
}
}
diff --git a/sources/protocols/VSRegisteredProtocols.java b/sources/protocols/VSRegisteredProtocols.java
index d3bcc20..d58385b 100644
--- a/sources/protocols/VSRegisteredProtocols.java
+++ b/sources/protocols/VSRegisteredProtocols.java
@@ -8,20 +8,22 @@ import utils.*;
public final class VSRegisteredProtocols {
private static HashMap<String,String> protocolClassnames;
+ private static HashMap<String,String> protocolShortnames;
private static HashMap<String,String> protocolNames;
private static VSPrefs prefs;
public static void init(VSPrefs prefs_) {
prefs = prefs_;
protocolNames = new HashMap<String, String>();
+ protocolShortnames = new HashMap<String, String>();
protocolClassnames = new HashMap<String, String>();
- registerProtocol("protocols.implementations.DummyProtocol");
- registerProtocol("protocols.implementations.PingPongProtocol");
- registerProtocol("protocols.implementations.ExternalTimeSyncProtocol");
- registerProtocol("protocols.implementations.InternalTimeSyncProtocol");
- registerProtocol("protocols.implementations.BroadcastSturmProtocol");
- registerProtocol("protocols.implementations.BerkelyTimeProtocol");
+ registerProtocol("protocols.implementations.BerkelyTimeProtocol", "Berkeley Algorithmus zur internen Sync.", "Berkeley");
+ registerProtocol("protocols.implementations.BroadcastSturmProtocol", "Broadcaststurm", null);
+ registerProtocol("protocols.implementations.DummyProtocol", "Beispiel/Dummy", null);
+ registerProtocol("protocols.implementations.ExternalTimeSyncProtocol", "Christians Methode zur externen Sync.", "Christians");
+ registerProtocol("protocols.implementations.InternalTimeSyncProtocol", "Interne Synchronisation", "Interne Sync.");
+ registerProtocol("protocols.implementations.PingPongProtocol", "Ping Pong", null);
}
public static Vector<String> getProtocolNames() {
@@ -36,6 +38,18 @@ public final class VSRegisteredProtocols {
return vector;
}
+ public static Vector<String> getProtocolClassnames() {
+ Set<String> set = protocolNames.keySet();
+ Vector<String> vector = new Vector<String>();
+
+ for (String protocolClassname : set)
+ vector.add(protocolClassname);
+
+ Collections.sort(vector);
+
+ return vector;
+ }
+
public static String getProtocolClassname(String protocolName) {
return protocolClassnames.get(protocolName);
}
@@ -44,6 +58,10 @@ public final class VSRegisteredProtocols {
return protocolNames.get(protocolClassname);
}
+ public static String getProtocolShortname(String protocolClassname) {
+ return protocolShortnames.get(protocolClassname);
+ }
+
public static VSProtocol getProtocolInstanceByName(String protocolName, VSProcess process) {
final String protocolClassname = protocolClassnames.get(protocolName);
final Object protocolObj = new VSClassLoader().newInstance(protocolClassname);
@@ -57,26 +75,12 @@ public final class VSRegisteredProtocols {
return null;
}
- public static void registerProtocol(String protocolClassname) {
- int index = protocolClassname.lastIndexOf('.');
-
- if (index < 0) {
- protocolNames.put(protocolClassname, protocolClassname);
- protocolClassnames.put(protocolClassname, protocolClassname);
- return;
- }
-
- String protocolName = protocolClassname.substring(index + 1);
- index = protocolName.lastIndexOf("Protocol");
-
- if (index < 0 || index != protocolName.length() - 8) {
- protocolNames.put(protocolClassname, protocolName);
- protocolClassnames.put(protocolName, protocolClassname);
- return;
- }
+ private static void registerProtocol(String protocolClassname, String protocolName, String protocolShortname) {
+ if (protocolShortname == null)
+ protocolShortname = protocolName;
- protocolName = protocolName.substring(0, index);
protocolNames.put(protocolClassname, protocolName);
+ protocolShortnames.put(protocolClassname, protocolShortname);
protocolClassnames.put(protocolName, protocolClassname);
}
}
diff --git a/sources/simulator/VSLogging.java b/sources/simulator/VSLogging.java
index c819a76..547d598 100644
--- a/sources/simulator/VSLogging.java
+++ b/sources/simulator/VSLogging.java
@@ -45,9 +45,9 @@ public class VSLogging {
buffer.append(": ");
buffer.append(message);
- if (isPaused)
+ if (isPaused)
pauseLines.add(buffer);
- else
+ else
loggFiltered(buffer);
}
diff --git a/sources/simulator/VSSimulation.java b/sources/simulator/VSSimulation.java
index 12b154a..0b84685 100644
--- a/sources/simulator/VSSimulation.java
+++ b/sources/simulator/VSSimulation.java
@@ -7,8 +7,9 @@ import javax.swing.*;
import javax.swing.event.*;
import javax.swing.border.*;
-import prefs.*;
import core.*;
+import prefs.*;
+import protocols.*;
import utils.*;
public class VSSimulation extends VSFrame implements ActionListener {
@@ -304,7 +305,7 @@ public class VSSimulation extends VSFrame implements ActionListener {
splitPane2.setTopComponent(comboBox);
splitPane2.setBottomComponent(splitPane1);
- return splitPane2;
+ return splitPane2;
}
private JPanel createLabelPanel(String text) {
@@ -327,7 +328,7 @@ public class VSSimulation extends VSFrame implements ActionListener {
JScrollPane scrollPane = new JScrollPane(createTaskTable(localTasks));
panel.add(scrollPane);
- initAddPanel(panel);
+ initAddPanel(panel);
return panel;
}
@@ -350,44 +351,47 @@ public class VSSimulation extends VSFrame implements ActionListener {
return table;
}
- private void initAddPanel(JPanel panel) {
- JPanel panel1 = new JPanel();
+ private void initAddPanel(JPanel panel) {
+ JPanel panel1 = new JPanel();
panel1.setLayout(new BoxLayout(panel1, BoxLayout.X_AXIS));
-
- panel1.add(new JTextField());
- panel1.add(new JLabel(" ms "));
- JButton takeoverButton = new JButton(prefs.getString("lang.takeover"));
- panel1.add(takeoverButton);
-
- JComboBox comboBox = new JComboBox();
- comboBox.addItem("-- Prozessereignisse --");
- comboBox.addItem("Prozessabsturz");
- comboBox.addItem("Prozesswiederbelebung");
- comboBox.addItem("-- Protokollereignisse --");
- comboBox.addItem("BerkelyTime Client aktivieren");
- comboBox.addItem("BerkelyTime Client deaktivieren");
- comboBox.addItem("BerkelyTime Server aktivieren");
- comboBox.addItem("BerkelyTime Server deaktivieren");
- comboBox.addItem("ExternalTimeSync Client aktivieren");
- comboBox.addItem("ExternalTimeSync Client deaktivieren");
- comboBox.addItem("ExternalTimeSync Server aktivieren");
- comboBox.addItem("ExternalTimeSync Server deaktivieren");
- comboBox.addItem("InternalTimeSync Client aktivieren");
- comboBox.addItem("InternalTimeSync Client deaktivieren");
- comboBox.addItem("InternalTimeSync Server aktivieren");
- comboBox.addItem("InternalTimeSync Server deaktivieren");
- comboBox.addItem("PingPong Client aktivieren");
- comboBox.addItem("PingPong Client deaktivieren");
- comboBox.addItem("PingPong Server aktivieren");
- comboBox.addItem("PingPong Server deaktivieren");
- comboBox.addItem("-- Anfragen --");
- comboBox.addItem("BerkelyTime Anfrage starten");
- comboBox.addItem("ExternalTimeSync Anfrage starten");
- comboBox.addItem("InternalTimeSync Anfrage starten");
- comboBox.addItem("PingPong Anfrage starten");
- panel.add(comboBox);
- panel.add(panel1);
- }
+
+ panel1.add(new JTextField());
+ panel1.add(new JLabel(" ms "));
+ JButton takeoverButton = new JButton(prefs.getString("lang.takeover"));
+ panel1.add(takeoverButton);
+
+ JComboBox comboBox = new JComboBox();
+ comboBox.addItem("-- " + prefs.getString("lang.events.process") + " --");
+ comboBox.addItem("Prozessabsturz");
+ comboBox.addItem("Prozesswiederbelebung");
+
+ comboBox.addItem("-- " + prefs.getString("lang.events.protocol") + " --");
+
+ Vector<String> protocolClassnames = VSRegisteredProtocols.getProtocolClassnames();
+ String activate = prefs.getString("lang.activate");
+ String deactivate = prefs.getString("lang.deactivate");
+ String client = prefs.getString("lang.client");
+ String server = prefs.getString("lang.server");
+
+ for (String protocolClassname : protocolClassnames) {
+ String protocolShortname = VSRegisteredProtocols.getProtocolShortname(protocolClassname);
+ comboBox.addItem(protocolShortname + " " + client + " " + activate);
+ comboBox.addItem(protocolShortname + " " + client + " " + deactivate);
+ comboBox.addItem(protocolShortname + " " + server + " " + activate);
+ comboBox.addItem(protocolShortname + " " + server + " " + deactivate);
+ }
+
+ comboBox.addItem("-- " + prefs.getString("lang.requests") + " --");
+ String clientrequest = prefs.getString("lang.clientrequest.start");
+
+ for (String protocolClassname : protocolClassnames) {
+ String protocolShortname = VSRegisteredProtocols.getProtocolShortname(protocolClassname);
+ comboBox.addItem(protocolShortname + " " + clientrequest);
+ }
+
+ panel.add(comboBox);
+ panel.add(panel1);
+ }
public int getSplitSize() {
return splitPaneH.getDividerLocation();