This is an automated email from the git hooks/post-receive script. ben pushed a commit to branch master in repository autocomplete.
commit 81309b1da3120c814a40cba205e31dd74f9fc56c Author: bobbylight <[email protected]> Date: Sat Dec 12 04:20:47 2009 +0000 Allow specifying the size of the completion choices window. --- src/org/fife/ui/autocomplete/AutoCompletion.java | 26 ++++++++++++++++++++++ 1 file changed, 26 insertions(+) diff --git a/src/org/fife/ui/autocomplete/AutoCompletion.java b/src/org/fife/ui/autocomplete/AutoCompletion.java index 33dea51..9aff77d 100644 --- a/src/org/fife/ui/autocomplete/AutoCompletion.java +++ b/src/org/fife/ui/autocomplete/AutoCompletion.java @@ -75,6 +75,13 @@ public class AutoCompletion implements HierarchyListener { private AutoCompletePopupWindow popupWindow; /** + * The preferred size of the completion choices window. This field exists + * because the user will likely set the preferred size of the window + * before it is actually created. + */ + private Dimension preferredChoicesWindowSize; + + /** * The preferred size of the optional description window. This field * only exists because the user may (and usually will) set the size of * the description window before it exists (it must be parented to a @@ -633,6 +640,9 @@ try { if (renderer!=null) { popupWindow.setListCellRenderer(renderer); } + if (preferredChoicesWindowSize!=null) { + popupWindow.setSize(preferredChoicesWindowSize); + } if (preferredDescWindowSize!=null) { popupWindow.setDescriptionWindowSize( preferredDescWindowSize); @@ -721,10 +731,26 @@ try { /** + * Sets the size of the completion choices window. + * + * @param w The new width. + * @param h The new height. + * @see #setDescriptionWindowSize(int, int) + */ + public void setChoicesWindowSize(int w, int h) { + preferredChoicesWindowSize = new Dimension(w, h); + if (popupWindow!=null) { + popupWindow.setSize(preferredChoicesWindowSize); + } + } + + + /** * Sets the size of the description window. * * @param w The new width. * @param h The new height. + * @see #setChoicesWindowSize(int, int) */ public void setDescriptionWindowSize(int w, int h) { preferredDescWindowSize = new Dimension(w, h); -- Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-java/autocomplete.git _______________________________________________ pkg-java-commits mailing list [email protected] http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/pkg-java-commits

