/** * Prompt user for input. * * @param prompt Prompt message to display. * @param title Text to display. * @param callback The callback to receive the text input. If the dialog was cancelled, the text * input will be returned as null. */ public static void input(String prompt, String title, IInputCallback callback) { input(prompt, title, null, callback); }
@EventHandler(value = "click", target = "btnAddSubscription") private void onClick$btnAddSubscription() { DialogUtil.input("Enter the name of the channel to subscribe to:", "Subscribe to Channel", (channel) -> { if (channel != null && !channels.contains(channel)) { channels.add(channel); channels2.add(channel); subscribe(channel, true); } }); }