This is an automated email from the git hooks/post-receive script. pini pushed a commit to tag upstream/1.1.0_beta1 in repository sikuli.
commit 5bf33740dd0d12f590cb3804171ceab2d106f147 Author: Raimund Hocke <[email protected]> Date: Wed Feb 19 14:17:30 2014 +0100 added popSelect (select from options in a drop down) and extended popAsk (yes no question) --- .../src/main/java/org/sikuli/basics/SikuliX.java | 26 +++++++++++++++++++++- 1 file changed, 25 insertions(+), 1 deletion(-) diff --git a/Basics/src/main/java/org/sikuli/basics/SikuliX.java b/Basics/src/main/java/org/sikuli/basics/SikuliX.java index f12398b..0ba6ef6 100644 --- a/Basics/src/main/java/org/sikuli/basics/SikuliX.java +++ b/Basics/src/main/java/org/sikuli/basics/SikuliX.java @@ -344,13 +344,37 @@ public class SikuliX { } public static boolean popAsk(String msg) { - int ret = JOptionPane.showConfirmDialog(null, msg, "IDE: ... something to decide! ", JOptionPane.YES_NO_OPTION); + return popAsk(msg, null); + } + + public static boolean popAsk(String msg, String title) { + if (title == null) title = "... something to decide!"; + int ret = JOptionPane.showConfirmDialog(null, msg, title, JOptionPane.YES_NO_OPTION); if (ret == JOptionPane.CLOSED_OPTION || ret == JOptionPane.NO_OPTION) { return false; } return true; } + public static String popSelect(String msg, String[] options, String preset) { + return popSelect(msg, null, options, preset); + } + + public static String popSelect(String msg, String[] options) { + return popSelect(msg, null, options, options[0]); + } + + public static String popSelect(String msg, String title, String[] options) { + return popSelect(msg, title, options, options[0]); + } + + public static String popSelect(String msg, String title, String[] options, String preset) { + if (title == null) { + title = "... something to select!"; + } + return (String) JOptionPane.showInputDialog(null, msg, title, JOptionPane.PLAIN_MESSAGE, null, options, preset); + } + /** * request user's input as one line of text <br> * with hidden = true: <br> -- Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-java/sikuli.git _______________________________________________ pkg-java-commits mailing list [email protected] http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/pkg-java-commits

