From 5bb3af861f2bbcd20706cbf130a6b7b0418dd26d Mon Sep 17 00:00:00 2001 From: John Shackleton Date: Wed, 27 Mar 2024 09:47:39 -0500 Subject: [PATCH] Updated edit objectives feaure to include description text. --- ...Arp4754WireframeObjectivesViewHandler.java | 24 +++++++++++-------- 1 file changed, 14 insertions(+), 10 deletions(-) diff --git a/tools/rack/rack.plugin/src/com/ge/research/rack/arp4754/wireframe/ui/Arp4754WireframeObjectivesViewHandler.java b/tools/rack/rack.plugin/src/com/ge/research/rack/arp4754/wireframe/ui/Arp4754WireframeObjectivesViewHandler.java index a6be8c8f..60be9537 100644 --- a/tools/rack/rack.plugin/src/com/ge/research/rack/arp4754/wireframe/ui/Arp4754WireframeObjectivesViewHandler.java +++ b/tools/rack/rack.plugin/src/com/ge/research/rack/arp4754/wireframe/ui/Arp4754WireframeObjectivesViewHandler.java @@ -50,14 +50,8 @@ public class Arp4754WireframeObjectivesViewHandler { @FXML private void initialize() {} - - @FXML - private void objectiveMenuAction(ActionEvent event) throws Exception { - String txt = ((MenuItem) event.getSource()).getText(); - menuObjective.setText(txt); - txtObjectiveQuery.setText(txt + "-query"); - hasResult = true; - + + private boolean setObjectiveDescription(String txt) { if (txt.compareTo("Objective-1-1") == 0) { txtObjectiveDescription.setText( "System development and integral processes activities are defined."); @@ -146,8 +140,18 @@ private void objectiveMenuAction(ActionEvent event) throws Exception { txtObjectiveDescription.setText("Compliance substantiation is provided."); } else { txtObjectiveDescription.setText(""); - hasResult = false; + return false; } + + return true; + } + + @FXML + private void objectiveMenuAction(ActionEvent event) throws Exception { + String txt = ((MenuItem) event.getSource()).getText(); + menuObjective.setText(txt); + txtObjectiveQuery.setText(txt + "-query"); + hasResult = setObjectiveDescription(txt); } @FXML @@ -164,7 +168,7 @@ private void btnObjectiveDoneAction(ActionEvent event) throws Exception { public void setText(String key, String value) { txtObjectiveQuery.setText(key); menuObjective.setText(value); - hasResult = true; + hasResult = setObjectiveDescription(value); } public String getText() {