+ /**
+ * (Try and) keep the elements that were selected when filtering.
+ * <p>
+ * This will use toString on the elements to identify them, and can be a bit
+ * resource intensive.
+ *
+ * @return TRUE if we do
+ */
+ public boolean isKeepSelection() {
+ return keepSelection;
+ }
+
+ /**
+ * (Try and) keep the elements that were selected when filtering.
+ * <p>
+ * This will use toString on the elements to identify them, and can be a bit
+ * resource intensive.
+ *
+ * @param keepSelection
+ * TRUE to try and keep them selected
+ */
+ public void setKeepSelection(boolean keepSelection) {
+ this.keepSelection = keepSelection;
+ }
+
+ /**
+ * The popup to use and keep track of (can be NULL).
+ *
+ * @return the current popup
+ */
+ public JPopupMenu getPopup() {
+ return popup;
+ }
+
+ /**
+ * The popup to use and keep track of (can be NULL).
+ *
+ * @param popup
+ * the new popup
+ */
+ public void setPopup(JPopupMenu popup) {
+ this.popup = popup;
+ }
+
+ /**
+ * You can use a {@link TooltipCreator} if you want the list to display
+ * tooltips on mouse hover (can be NULL).
+ *
+ * @return the current {@link TooltipCreator}
+ */
+ public TooltipCreator<T> getTooltipCreator() {
+ return tooltipCreator;
+ }
+
+ /**
+ * You can use a {@link TooltipCreator} if you want the list to display
+ * tooltips on mouse hover (can be NULL).
+ *
+ * @param tooltipCreator
+ * the new {@link TooltipCreator}
+ */
+ public void setTooltipCreator(TooltipCreator<T> tooltipCreator) {
+ this.tooltipCreator = tooltipCreator;
+ }
+