From 88e1a72084591fee004da32a537541d4c656c99f Mon Sep 17 00:00:00 2001 From: Bob Jacobsen Date: Mon, 6 Jul 2026 15:15:31 -0400 Subject: [PATCH 1/4] Refactor deferred end of group processing for flexibility --- src/org/openlcb/cdi/swing/CdiPanel.java | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/src/org/openlcb/cdi/swing/CdiPanel.java b/src/org/openlcb/cdi/swing/CdiPanel.java index 7d148b63..b047a1b1 100644 --- a/src/org/openlcb/cdi/swing/CdiPanel.java +++ b/src/org/openlcb/cdi/swing/CdiPanel.java @@ -359,7 +359,7 @@ public java.awt.Dimension getMaximumSize() { createHelper.add(lineHelper); // Calls into JMRI to add the Create Sensor and Create Turnout buttons. - factory.handleGroupPaneEnd(createHelper); + factory.handleManualPaneEnd(createHelper); sensorHelperPanel = new CollapsiblePanel("Sensor/Turnout creation", createHelper); sensorHelperPanel.setBackground(getForeground()); sensorHelperPanel.setExpanded(false); @@ -3215,6 +3215,19 @@ public void handleGroupPaneEnd(JPanel pane) { return; } + /** + * Similar to handleGroupPaneEnd, this asserts that the + * processing should happen on the current group + * which has been manually (e.g. not from CDI) created. + * + * @param pane The GUI panel that has been populated with the + * representation of the group. In {@link CdiPanel}, + * this is a {@link GroupPane}. + */ + public void handleManualPaneEnd(JPanel panel) { + return; + } + /** * Allow separate processing of an Event ID entry field * @param field The proposed EventID entry field From a273ef2942780b122ddb17811070c8facbc383b1 Mon Sep 17 00:00:00 2001 From: Bob Jacobsen Date: Mon, 6 Jul 2026 15:20:06 -0400 Subject: [PATCH 2/4] complete refactor --- src/org/openlcb/cdi/swing/CdiPanel.java | 1 + 1 file changed, 1 insertion(+) diff --git a/src/org/openlcb/cdi/swing/CdiPanel.java b/src/org/openlcb/cdi/swing/CdiPanel.java index b047a1b1..d80ca87c 100644 --- a/src/org/openlcb/cdi/swing/CdiPanel.java +++ b/src/org/openlcb/cdi/swing/CdiPanel.java @@ -3225,6 +3225,7 @@ public void handleGroupPaneEnd(JPanel pane) { * this is a {@link GroupPane}. */ public void handleManualPaneEnd(JPanel panel) { + handleGroupPaneEnd(pane); // default implementation provides same function return; } From f0b17f9b5994fb3620c90646c344f7680280f318 Mon Sep 17 00:00:00 2001 From: Bob Jacobsen Date: Mon, 6 Jul 2026 15:25:40 -0400 Subject: [PATCH 3/4] CI found javadoc errors --- src/org/openlcb/Message.java | 1 + src/org/openlcb/cdi/swing/CdiPanel.java | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/src/org/openlcb/Message.java b/src/org/openlcb/Message.java index accb43b4..136f168b 100644 --- a/src/org/openlcb/Message.java +++ b/src/org/openlcb/Message.java @@ -69,6 +69,7 @@ public String toString() { /** * Get the numerical value of the MTI + * @return The MTI as a standard full value */ abstract public int getMTI(); } diff --git a/src/org/openlcb/cdi/swing/CdiPanel.java b/src/org/openlcb/cdi/swing/CdiPanel.java index d80ca87c..3ddc2b8b 100644 --- a/src/org/openlcb/cdi/swing/CdiPanel.java +++ b/src/org/openlcb/cdi/swing/CdiPanel.java @@ -3224,7 +3224,7 @@ public void handleGroupPaneEnd(JPanel pane) { * representation of the group. In {@link CdiPanel}, * this is a {@link GroupPane}. */ - public void handleManualPaneEnd(JPanel panel) { + public void handleManualPaneEnd(JPanel pane) { handleGroupPaneEnd(pane); // default implementation provides same function return; } From 028df349abdecc789ac7f5014201a22c1f86055b Mon Sep 17 00:00:00 2001 From: Bob Jacobsen Date: Mon, 6 Jul 2026 17:36:35 -0400 Subject: [PATCH 4/4] trying to understand @Override error --- src/org/openlcb/cdi/swing/CdiPanel.java | 20 +++++++++----------- 1 file changed, 9 insertions(+), 11 deletions(-) diff --git a/src/org/openlcb/cdi/swing/CdiPanel.java b/src/org/openlcb/cdi/swing/CdiPanel.java index 3ddc2b8b..54202327 100644 --- a/src/org/openlcb/cdi/swing/CdiPanel.java +++ b/src/org/openlcb/cdi/swing/CdiPanel.java @@ -359,7 +359,7 @@ public java.awt.Dimension getMaximumSize() { createHelper.add(lineHelper); // Calls into JMRI to add the Create Sensor and Create Turnout buttons. - factory.handleManualPaneEnd(createHelper); + factory.handleManualEnd(createHelper); sensorHelperPanel = new CollapsiblePanel("Sensor/Turnout creation", createHelper); sensorHelperPanel.setBackground(getForeground()); sensorHelperPanel.setExpanded(false); @@ -3204,29 +3204,27 @@ public void handleGroupPaneStart(JPanel pane) { } /** - * Called after a group have been constructedd. - * Paired with {@link handleGroupPaneStart}. + * Similar to handleGroupPaneEnd, this asserts that the + * processing should happen on the current group + * which has been manually (e.g. not from CDI) created. * * @param pane The GUI panel that has been populated with the * representation of the group. In {@link CdiPanel}, * this is a {@link GroupPane}. */ - public void handleGroupPaneEnd(JPanel pane) { - return; + public void handleManualEnd(JPanel pane) { + handleGroupPaneEnd(pane); // default implementation provides same function } /** - * Similar to handleGroupPaneEnd, this asserts that the - * processing should happen on the current group - * which has been manually (e.g. not from CDI) created. + * Called after a group have been constructedd. + * Paired with {@link handleGroupPaneStart}. * * @param pane The GUI panel that has been populated with the * representation of the group. In {@link CdiPanel}, * this is a {@link GroupPane}. */ - public void handleManualPaneEnd(JPanel pane) { - handleGroupPaneEnd(pane); // default implementation provides same function - return; + public void handleGroupPaneEnd(JPanel pane) { } /**