convex.gui.models.ComboModel Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of convex-gui Show documentation
Show all versions of convex-gui Show documentation
Convex desktop GUI and test applications
The newest version!
package convex.gui.models;
import javax.swing.DefaultComboBoxModel;
import convex.core.util.Utils;
@SuppressWarnings("serial")
public class ComboModel extends DefaultComboBoxModel {
public ComboModel() {
super();
}
public void ensureContains(E target) {
if (!contains(target)) addElement(target);
}
public boolean contains(E target) {
int n=getSize();
for (int i=0; i