From 21282d8a04aa609ce2cf7dbd959ce4256d78d354 Mon Sep 17 00:00:00 2001 From: Paul Buetow Date: Sat, 14 Jun 2008 19:37:01 +0000 Subject: inventet VSCreateTask dummy instances. This way all the menu texts can be included in those objects. --- sources/simulator/VSCreateTask.java | 39 ++++++++++++++++++++++++++++++++++--- 1 file changed, 36 insertions(+), 3 deletions(-) (limited to 'sources/simulator/VSCreateTask.java') diff --git a/sources/simulator/VSCreateTask.java b/sources/simulator/VSCreateTask.java index 75c5b08..660eae7 100644 --- a/sources/simulator/VSCreateTask.java +++ b/sources/simulator/VSCreateTask.java @@ -41,6 +41,9 @@ public class VSCreateTask { /** The event classname. */ private String eventClassname; + /** The create task menu string. */ + private String menuText; + /** The protocol classname. */ private String protocolClassname; @@ -64,12 +67,24 @@ public class VSCreateTask { /** * Instantiates a new VSCreateTask object. * + * @param menuText the menu text * @param eventClassname the event classname */ - public VSCreateTask(String eventClassname) { + public VSCreateTask(String menuText, String eventClassname) { + this.menuText = menuText; this.eventClassname = eventClassname; } + /** + * Instantiates a new VSCreateTask dummy object. + * + * @param menuText the menu text + */ + public VSCreateTask(String menuText) { + this.menuText = menuText; + this.eventClassname = null; + } + /** * Sets if it is a protocol activation task. * @@ -97,7 +112,7 @@ public class VSCreateTask { } /** - * Checks if is client protocol. + * Sets if it is a client protocol. * * @param isClientProtocol the is client protocol */ @@ -106,7 +121,7 @@ public class VSCreateTask { } /** - * Checks if is client request. + * Sets if it is a client request. * * @param isRequest the is client request */ @@ -114,6 +129,15 @@ public class VSCreateTask { this.isRequest = isRequest; } + /** + * Checks if it is a dummy object.. + * + * @return true, if dummy + */ + public boolean isDummy() { + return eventClassname == null; + } + /** * Sets the protocol classname. * @@ -132,6 +156,15 @@ public class VSCreateTask { this.shortname = shortname; } + /** + * Gets the create tasks menu text. + * + * @return The text + */ + public String getMenuText() { + return menuText; + } + /** * Creates the task. * -- cgit v1.2.3