protected void initComponents() { setEditable(true); _autoCompletion = createAutoCompletion(); }
public AutoCompletionComboBox(final Object items[]) { super(items); initComponents(); }
JideTitledBorder.LEADING, JideTitledBorder.ABOVE_TOP), BorderFactory.createEmptyBorder(0, 0, 0, 0))); JComboBox autoCompletionComboBox = new AutoCompletionComboBox(_fontNames); autoCompletionComboBox.setName("AutoCompletion JComboBox (Strict)"); autoCompletionComboBox.setToolTipText("AutoCompletion JComboBox (Strict)"); panel.add(Box.createVerticalStrut(12), JideBoxLayout.FIX); AutoCompletionComboBox autoCompletionComboBoxNotStrict = new AutoCompletionComboBox(_fontNames); autoCompletionComboBoxNotStrict.setStrict(false); autoCompletionComboBoxNotStrict.setName("AutoCompletion JComboBox (Not strict)"); autoCompletionComboBoxNotStrict.setToolTipText("AutoCompletion JComboBox (Not strict)"); panel.add(new JLabel("AutoCompletion JComboBox (Not strict)")); panel.add(Box.createVerticalStrut(3), JideBoxLayout.FIX);
/** * Gets the strict completion property. * * @return the value of strict completion property. * * @see #setStrictCompletion(boolean) */ public boolean isStrictCompletion() { return getAutoCompletion().isStrictCompletion(); }
@Override protected void setSelectedIndex(int index, boolean incremental) { Object property = AutoCompletionComboBox.this.getClientProperty("JComboBox.isTableCellEditor"); if (property instanceof Boolean && (Boolean) property) { _preventActionEvent = true; } try { super.setSelectedIndex(index, incremental); } finally { _preventActionEvent = false; } } });
/** * Sets the strict completion property. If true, in case insensitive searching, it will always use the exact item in * the Searchable to replace whatever user types. For example, when Searchable has an item "Arial" and user types in * "AR", if this flag is true, it will auto-completed as "Arial". If false, it will be auto-completed as "ARial". Of * course, this flag will only make a difference if Searchable is case insensitive. * * @param strictCompletion */ public void setStrictCompletion(boolean strictCompletion) { getAutoCompletion().setStrictCompletion(strictCompletion); }
/** * Gets the strict property. * * @return the value of strict property. */ public boolean isStrict() { return getAutoCompletion().isStrict(); }
public AutoCompletionComboBox(Vector<?> items) { super(items); initComponents(); }
/** * Sets the strict property. If true, it will not allow user to type in anything that is not in the known item list. * If false, user can type in whatever he/she wants. If the text can match with a item in the known item list, it * will still auto-complete. * * @param strict true or false. */ public void setStrict(boolean strict) { getAutoCompletion().setStrict(strict); }
public AutoCompletionComboBox(ComboBoxModel aModel) { super(aModel); initComponents(); }
public AutoCompletionComboBox() { initComponents(); }