+ @SuppressWarnings("rawtypes") // JList<?> not in Java 1.6
+ public ListModel(JList list, JPopupMenu popup) {
+ this(list, popup, null);
+ }
+
+ /**
+ * Create a new {@link ListModel}.
+ * <p>
+ * Note that you must take care of passing a {@link JList} that only handles
+ * elements of the type of this {@link ListModel} -- you can also use
+ * {@link ListModel#ListModel(JList6, JPopupMenu)} instead.
+ *
+ * @param list
+ * the {@link JList} we will handle the data of (cannot be NULL,
+ * must only contain elements of the type of this
+ * {@link ListModel})
+ * @param tooltipCreator
+ * use this if you want the list to display tooltips on hover
+ * (can be NULL)
+ */
+ @SuppressWarnings("rawtypes") // JList<?> not in Java 1.6
+ public ListModel(JList list, TooltipCreator<T> tooltipCreator) {
+ this(list, null, tooltipCreator);
+ }
+
+ /**
+ * Create a new {@link ListModel}.
+ * <p>
+ * Note that you must take care of passing a {@link JList} that only handles
+ * elements of the type of this {@link ListModel} -- you can also use
+ * {@link ListModel#ListModel(JList6, JPopupMenu)} instead.
+ *
+ * @param list
+ * the {@link JList} we will handle the data of (cannot be NULL,
+ * must only contain elements of the type of this
+ * {@link ListModel})
+ * @param popup
+ * the popup to use and keep track of (can be NULL)
+ * @param tooltipCreator
+ * use this if you want the list to display tooltips on hover
+ * (can be NULL)
+ */
+ @SuppressWarnings({ "unchecked", "rawtypes" }) // JList<?> not in Java 1.6
+ public ListModel(final JList list, final JPopupMenu popup,
+ TooltipCreator<T> tooltipCreator) {