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 7d148b63..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.handleGroupPaneEnd(createHelper); + factory.handleManualEnd(createHelper); sensorHelperPanel = new CollapsiblePanel("Sensor/Turnout creation", createHelper); sensorHelperPanel.setBackground(getForeground()); sensorHelperPanel.setExpanded(false); @@ -3203,6 +3203,19 @@ public void handleGroupPaneStart(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 handleManualEnd(JPanel pane) { + handleGroupPaneEnd(pane); // default implementation provides same function + } + /** * Called after a group have been constructedd. * Paired with {@link handleGroupPaneStart}. @@ -3212,7 +3225,6 @@ public void handleGroupPaneStart(JPanel pane) { * this is a {@link GroupPane}. */ public void handleGroupPaneEnd(JPanel pane) { - return; } /**