Skip to content
Snippets Groups Projects
Commit db88da52 authored by Nils Vreman's avatar Nils Vreman
Browse files

Added some more helptext as well as updated a bug with the tasklabel.

parent 366e2c94
Branches
No related tags found
No related merge requests found
...@@ -13,8 +13,8 @@ public class TasksetTab extends TabPanel { ...@@ -13,8 +13,8 @@ public class TasksetTab extends TabPanel {
private static final String[] fieldTexts = new String[] { private static final String[] fieldTexts = new String[] {
"To add a task to the taskset, press the \"Add Task\" button, located in the panel titled \"Taskset\". Once this button is pressed, a dialog window will open to let you specify the attributes of the task to add. \nThis application will only allow for integer attributes to be specified. Other input (such as special characters or letters) will result in the task not being added to the taskset. \nAlthough it is possible to add a task with a deadline greater than the period, the scheduling algorithm will consider this an unschedulable task. Make sure to check this if the solution does not show. For information regarding priorities: Read the \"Priorities\" help-tab", "To add a task to the taskset, press the \"Add Task\" button, located in the panel titled \"Taskset\". Once this button is pressed, a dialog window will open to let you specify the attributes of the task to add. \nThis application will only allow for integer attributes to be specified. Other input (such as special characters or letters) will result in the task not being added to the taskset. \nAlthough it is possible to add a task with a deadline greater than the period, the scheduling algorithm will consider this an unschedulable task. Make sure to check this if the solution does not show. For information regarding priorities: Read the \"Priorities\" help-tab",
"Remove TasksText", "To remove a task from the taskset, press the task to remove. This highlights the task. When the task to be removed is highlighted, press the \"Remove Task\" button. The taskset will automatically shift the priorities of consecutive tasks to fit the scheduling policy.",
"Change TasksText", "To change a tasks attributes, simply click the attribute you want to change and enter a new value. To confirm the new value, either press <Enter> or click anywhere else in the window panel. If the value was not entered correctly (for example the field was left empty), the last known valid number will be substituted into the attribute box.",
"Clear TasksetText", "Clear TasksetText",
"PrioritiesText", "PrioritiesText",
"Load TasksetText", "Load TasksetText",
......
...@@ -78,6 +78,8 @@ public class TaskLabel extends JTextField implements FocusListener { ...@@ -78,6 +78,8 @@ public class TaskLabel extends JTextField implements FocusListener {
public void focusLost(FocusEvent e) { public void focusLost(FocusEvent e) {
if (!previousText.equals(getText()) && getText().matches("[0-9]+")) { if (!previousText.equals(getText()) && getText().matches("[0-9]+")) {
updateListener.update(); updateListener.update();
} else {
setText(previousText);
} }
} }
} }
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment