JGoodies Search Release Notes CHANGES IN 1.21.1 ------------------------------------------------------- FIX: Completion manger fires CompletionApplicationEvent on completion insert before the text is changed (regression from 1.20.0). CHANGES IN 1.21.0 ------------------------------------------------------- This version clarifies that the source in CompletionApplicationEvents and CompletionProcessEvents is the text component, not the completion manager, making it easier to use these events as dialog owner. o Added CompletionApplicationEvent#getCompletionManager(). o Added CompletionProcessEvent#getCompletionManager(). o Improved the string representations of these two event types. o Fixed JavaDocs. CHANGES IN 1.20.0 ------------------------------------------------------- o Added CompletionManager#onFocusLost() that allows to invoke the completion manager's focus lost behavior manually. o Fixed docs. CHANGES IN 1.19.5 ------------------------------------------------------- o Clarified that Completion#getCategory is optional and is not used by the default completion renderer. However, custom renderers may present the category. o Clarified that Completion#getRank is optional and not used by this library: Completions are displayed in the order in which they were published, and the rank is not displayed by the default completion renderer. However, custom completion renderers may display the rank, and CompletionProcessors may internally use the rank to sort Completions before they are published. CHANGES IN 1.19.4 ------------------------------------------------------- o FIX: NPE in CompletionInfoView if the primary popup has no associated graphics configuration. CHANGES IN 1.19.3 ------------------------------------------------------- o FIX: Changing the text after a search plus completion selection keeps this selection that may then be applied. o Resets the reference to a pending completion if the completion is deactivated on a component. CHANGES IN 1.19.2 ------------------------------------------------------- o The completion list now uses the font of the completion component, which allows the list cell renderer to use the same font. o The DefaultCompletionRenderer uses the above feature and sets the font in the renderer. o Migrated tests to JUnit 5. CHANGES IN 1.19.1 ------------------------------------------------------- o FIX: Double-click on a completion component that is not the focus owner throws NPE. CHANGES IN 1.19.0 ------------------------------------------------------- o Implementation uses more method references. o Requires JGoodies Common 1.18. CHANGES IN 1.18.2 ------------------------------------------------------- o FIX: A CompletionInfoRenderers that returns a new render component on every call does not update the content of the info popup. CHANGES IN 1.18.1 ------------------------------------------------------- o Implementation uses method references. CHANGES IN 1.18.0 ------------------------------------------------------- o The DefaultCompletionInfoRenderer wraps text. CHANGES IN 1.17.0 ------------------------------------------------------- o Removed all deprecated methods and classes; see the notes below for the replacements. CHANGES IN 1.16.0 ------------------------------------------------------- o Simplified class layout and API due to Java 8 features. o Moved the DefaultCompletion and its builder to Completion. Build default completions now with: new Completion.Builder() .replacementText(...) ... o Moved ValueCompletionBuilder to type ValueCompletion. Build value completions now with: new ValueCompletion.Builder() .value(contact) .replacementText(contact.getDisplayString()) ... o ValueCompletion can now hold a value or lookup a value later by means of a value supplier, for example: new ValueCompletion.Builder() .value(() -> service.findById(searchResult.getObjectId())) .replacementText(searchResult.getDisplayString()) ... CHANGES IN 1.15.2 ------------------------------------------------------- o Improved implementation. CHANGES IN 1.15.1 ------------------------------------------------------- o Marked DefaultCompletion and ValueCompletion constructors as deprecated. Use the associated builders instead. CHANGES IN 1.15.0 (Java 8) ---------------------------------------------- o Moved to Java 8. CHANGES IN 1.14.0 ------------------------------------------------------- o Renamed com.jgoodies.completion.text.* -> com.jgoodies.search.* CHANGES IN 1.13.2 ------------------------------------------------------- o Fixed JavaDoc issues. CHANGES IN 1.13.1 ------------------------------------------------------- o "JGoodies Completion" + "QuickSearch" -> "JGoodies Search". o Removed a System.out. CHANGES IN 1.13.0 ------------------------------------------------------- o Internationalized accessible names. o Completion popup origin moved up one pixel. CHANGES IN 1.12.0 (Java 7) ---------------------------------------------- o Moved to Java 7. o Added CompletionManager#reactivate to manually deactivate and immediately active completion support on a text component. Useful to temporarily cancel the completion activities such as background search, if other user gestures are performed. CHANGES IN 1.11.0 ------------------------------------------------------- o Added AbstractCompletionBuilder#additionalInfo(String, Object...). CHANGES IN 1.10.0 ------------------------------------------------------- o Removed deprecated CaretPosition code from the DefaultCompletion and ValueCompletion classes. CHANGES IN 1.9.0 -------------------------------------------------------- o Fixed NPE when clicking on a deselected completion. o Removed unwanted key handling combinations. o Added CompletionManager#registerCompletionKeyStroke to add a key stroke that does the same as Ctrl Space - initiate a completion lookup and open the popup if completions have been found. o Added builders for DefaultCompletion and ValueCompletion. o Changed the API for setting the caret position. o Added support for multiple completions per field, for example to provide completions for a comma-separated list of photo tags such as "private, vacation, beach, kids". o Added #getCaretPosition to the Completion interface. To get the old behavior, return a value of -1, which indicates that the caret position shall not be changed. If you create Completion instances with the new completion builders, the old behavior is achieved if you just do not call #caretPosition. CHANGES IN 1.8.1 -------------------------------------------------------- o Fixed broken standard keys when the completion popup is visible. o Fixed a typo. o Improved sources. CHANGES IN 1.8.0 -------------------------------------------------------- o Overhauled the key event handling to improve the interaction with other components and utilities that process keys or setup key strokes in input maps. o Replaced the InputMap/ActionMap setup by a single KeyListener. o Fixed the interaction with JGSearchFields by consuming only events that are handled. o Fixed the interaction with the table selection utility. Cursor down does not show completion anymore. o Fixed the interaction with JG*Fields that have a popup menu set. CHANGES IN 1.7.0 -------------------------------------------------------- o Generified ValueCompletion. CHANGES IN 1.6.3 -------------------------------------------------------- o Compiled against the JGoodies Common 1.5. o Source code cleanup. o Fixed and extended the pom.xml: - added schema - fixed scope for dependencies - added build data CHANGES IN 1.6.2 -------------------------------------------------------- o Compiled against the JGoodies Common 1.4. CHANGES IN 1.6.1 -------------------------------------------------------- o The javadocs, main and test sources are delivered as JARs. CHANGES IN 1.6.0 -------------------------------------------------------- o Requires Java 6 and JGoodies Common 1.3. CHANGES IN 1.5.3 -------------------------------------------------------- o Fixed an NPE introduced by the caret position fix. CHANGES IN 1.5.2 -------------------------------------------------------- o Fixed the caret position for CompletionProcessor#isAutoActivatable. o Removed common and worker libs from the distribution. CHANGES IN 1.5.1 -------------------------------------------------------- o Improved the source code style. o Updated libraries. CHANGES IN 1.5.0 -------------------------------------------------------- The CompletionManager fires CompletionApplicationEvents - if a Completion has been inserted (via Enter), - on focus lost for a previously selected Completion. In contrast, version 1.4 fired the application events on every completion selection. On popup item selection, the replacement text is now set in the active text field, where the previous version has set the display string used in the popup. CHANGES IN 1.4.0 -------------------------------------------------------- This update comes with an overhauled keyboard and mouse handling. It shall be easy to use, and it is accessible but does not need a special accessibility mode. Here's how it works: 1) A completion popup is opened automatically or manually with Ctrl+Space or Down. As before, the focus remains in the text field, so a user can type, move the cursor, select text, etc. Unlike before there's no initial selection in the popup. 2) The popup is visible, no item is selected. Options are: o Esc - closes the popup o Tab/Shift+Tab - moves focus from the text field, closes the popup o Single mouse click - applies the clicked completion, closes the popup o Down or Page down - select a completion 3) If a completion is selected it is immediately applied: the completion text is displayed in the text field, and a completion-applied event is fired. 4) The popup is visible, an item is selected. Options are: o Esc - if changed, restores the text, to the one that was active before the popup became visible, closes the popup o Tab/Shift+Tab - moves focus from the text field, closes the popup o Single mouse click - applies the clicked completion, closes the popup o Enter - applies the selected completion, close the popup o Up, Down, - changes the selection, applies the selecttion immediately o Page up, Page down - changes the selection, applies the selection immediately This behavior assumes that a user will select a completion only, if it might be useful. A selection is applied immediately, so it can be used without further action such as Enter in previous versions. Here are differences to the previous version: o Mouse choice uses single click, not double click. o Enter was the only means to apply a selection and close the popup. Now users can also select and move focus from the field. o Esc restores the text used to initiate a search and open the popup. o In the previous version, selection changes did not affect the text field's text in standard mode, and did change the text in accessible mode, where it tried to keep the typed text unselected and appended the rest from the display string. That was fine as long as the display string "matched" the search text. Let's say the user typed "DEH" and the selected completion is "DEHAM - Hamburg", then the text field's text became "DEHAM - Hamburg" with "DEH" not selected, and "AM - Hamburg" was selected. If however, a search text "Hambu" suggests "DEHAM - Hamburg", the text field's text was cleared and replaced by "DEHAM - Hamburg", making it difficult to continue to type. KNOWN LIMITATIONS o Completion category and rank are ignored. CHANGES IN 1.3.0 -------------------------------------------------------- This update release adds optional accessibility support. If enabled, the selected completion is displayed as marked text in the associated text component and the component's accessible name indicates the completion process. By default this feature is disabled. See CompletionManager#setCompletionPreviewEnabled(). If a completion is selected, its display string is set as text. The common prefix between search text and display string is unselected, and the rest of the display string is selected. If the user continues to type, the selected text is cleared and replaced by the typed characters. This works fine, if the search text is a prefix for the completion display strings. And so in accessible mode, one might consider to optimize the search processors to use completion display strings that start with the search text. If the display string does not start with the search text, typing will clear the whole text, and will even clear the typed search string. And that can only be restored by pressing Escape. For example, let's say a search text "DEH" suggests a completion displayed as "DEHAM - Hamburg", then "DEH" remained unselected, and "AM - Hamburg" was appended as selected text. Fine. Let's say a search text "Hambu" suggest a "DEHAM - Hamburg" too, then there's no common prefix between the field's text and the text of the selected completion. Also, the HOME and END keys are no longer bound, because these shall move the text cursor in the completion field instead of changing the completion selection index. CHANGES IN 1.2.1 -------------------------------------------------------- This maintenance release adds sanity checks for invalid Completion replacement texts and display strings. CHANGES IN 1.2.0 -------------------------------------------------------- This maintenance release adds the ValueCompletion implementation, and it uses and requires the JGoodies Common library. CHANGES IN 1.1.2 -------------------------------------------------------- BUG FIXES o Avoids an IllegalComponentStateException, if a completion component becomes not showing while completions are processed for it. o Avoids null components in CompletionApplicationEvents as a result of listener side-effects that reset a CompletionManager's component. o Fixed null components in CompletionApplicationEvents, if the completion application runnable is executed after the CompletionManager's text component has been reset. CHANGES IN 1.1.1 -------------------------------------------------------- o CompletionManager fires the search started state at worker construction time, where it fired at worker start time before. This ensures that start and stop/cancel events are balanced. o Improved CompletionProcessorEvent#toString. CHANGES IN 1.1.0 -------------------------------------------------------- This update fixes bugs and allows to display completions while the background search is still running. BUGS FIXED o The background processes get back to the CompletionManager even on an inactive component. The fix checks that the manager is active on the same component the background process has been created for. o Search continues if an intermediate result has been selected. o CompletionManager ignores the "autoActivationEnabled" setting. NEW FEATURES o CompletionProcessEvent provides the text component. o CompletionProcessListeners can veto against a search and prevent unnecessary search operations, see #searchAllowed. o CompletionManager#setDoubleClickActivationEnabled. CHANGES o CompletionProcessor#search replaces #computeCompletions. - #search returns whether a search was possible or not. - Completions are published from the background, not returned. - Published Completions are displayed immediately. o CompletionProcessor#isAutoActivatable and #search get the caret position. o Renamed CompletionManager#getCompletionProcessor to #getProcessor. o CompletionApplicationEvents are fired after the set has been set by the CompletionManager. CHANGES IN 1.0.0 -------------------------------------------------------- This is the first production release of the JGoodies Completion. It provides all features for the completion lookup and display of the replacement texts in the primary popup and additional info in the secondary popup. A tutorial is available that demonstrates the main features with a few completion processors. CHANGES o Overhauled the completion lookup. - Completions are computed in a background thread - The completion lookup may be canceled, therefore the signature CompletionProcessor#computeCompletions(String content) has been changed to #computeCompletions(String content, CompletionState state) and implementors may ask state.isCancelled() to stop unnecessary computations o New events that describe the completion process: - Added CompletionProcessEvent - Added CompletionProcessListener - Renamed CompletionEvent to CompletionApplicationEvent - Renamed CompletionListener to CompletionApplicationListener o New public CompletionManager features: - #getManager(JTextComponent) - #activate(JTextComponent) - #deactivate() - #isCompletionPopupVisible() o Completion's additionalInfo is an Object, not a String. o Text completion is activated for editable text components only. o CompletionManager is final. o Improved the documentation. o Fixed broken demo.jar. o Reverted popup behavior, works with Java 5, or Java 6_02 or later.