dbalek commented on code in PR #4203:
URL: https://github.com/apache/netbeans/pull/4203#discussion_r900104591


##########
platform/openide.dialogs/src/org/openide/NotifyDescriptor.java:
##########
@@ -1326,4 +1336,110 @@ public void setSelected(boolean selected) {
             }
         }
     }
+
+    /** Notification providing a composed input of multiple nested selection 
lists and/or input lines.
+    * @since 7.63
+    */
+    public static final class ComposedInput extends NotifyDescriptor {
+
+        private final List<NotifyDescriptor> inputs = new ArrayList<>();
+        private final Callback callback;
+        private int total;
+
+        /** Construct dialog with the specified title and nested inputs.
+        * @param title title of the dialog
+        * @param total total number of nested inputs
+        * @param callback callback used to create nested inputs
+        * @since 7.63
+        */
+        public ComposedInput(final String title, final int total, final 
Callback callback) {
+            super(null, title, OK_CANCEL_OPTION, PLAIN_MESSAGE, null, null);
+            this.callback = callback;
+            this.total = total;
+        }
+
+        /**
+         * Total number of nested inputs.
+         * @since 7.63
+         */
+        public int getTotalInputs() {
+            return total;
+        }
+
+        /**
+         * Lazy creates nested input of the given ordinal.
+         * @param number input number from interval &lt;1, totalInputs+1&gt;
+         * @return nested selection list, input line, or null
+         * @since 7.63
+         */
+        public NotifyDescriptor getInput(int number) {
+            NotifyDescriptor step = callback.getInput(number);
+            if (step != null) {

Review Comment:
   Calling again with the same ordinal just refines the original step (e.g. 
different items could be provided for a quick pick input step.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists

Reply via email to