/** * This private constructor implements the actual construction work and thus * ensures that all public constructors agree on the construction logic. */ private TextComponentMatcherEditor(JTextComponent textComponent, Document document, TextFilterator<? super E> textFilterator, boolean live) { super(textFilterator); this.textComponent = textComponent; this.document = document; this.live = live; registerListeners(live); // if the document is non-empty to begin with! refilter(); }
/** * This private constructor implements the actual construction work and thus * ensures that all public constructors agree on the construction logic. */ private TextComponentMatcherEditor(JTextComponent textComponent, Document document, TextFilterator<? super E> textFilterator, boolean live) { super(textFilterator); this.textComponent = textComponent; this.document = document; this.live = live; registerListeners(live); // if the document is non-empty to begin with! refilter(); }
/** * This private constructor implements the actual construction work and thus * ensures that all public constructors agree on the construction logic. */ private TextComponentMatcherEditor(JTextComponent textComponent, Document document, TextFilterator<? super E> textFilterator, boolean live) { super(textFilterator); this.textComponent = textComponent; this.document = document; this.live = live; registerListeners(live); // if the document is non-empty to begin with! refilter(); }
/** * Toggle between filtering by the keystroke and not. * * @param live <code>true</code> to filter by the keystroke or <code>false</code> * to filter only when {@link java.awt.event.KeyEvent#VK_ENTER Enter} is pressed * within the {@link JTextComponent}. Note that non-live filtering is only * supported if <code>textComponent</code> is a {@link JTextField}. */ public void setLive(boolean live) { if (live == this.live) return; deregisterListeners(this.live); this.live = live; registerListeners(this.live); }
/** * Toggle between filtering by the keystroke and not. * * @param live <code>true</code> to filter by the keystroke or <code>false</code> * to filter only when {@link java.awt.event.KeyEvent#VK_ENTER Enter} is pressed * within the {@link JTextComponent}. Note that non-live filtering is only * supported if <code>textComponent</code> is a {@link JTextField}. */ public void setLive(boolean live) { if (live == this.live) return; deregisterListeners(this.live); this.live = live; registerListeners(this.live); }
/** * Toggle between filtering by the keystroke and not. * * @param live <code>true</code> to filter by the keystroke or <code>false</code> * to filter only when {@link java.awt.event.KeyEvent#VK_ENTER Enter} is pressed * within the {@link JTextComponent}. Note that non-live filtering is only * supported if <code>textComponent</code> is a {@link JTextField}. */ public void setLive(boolean live) { if (live == this.live) return; deregisterListeners(this.live); this.live = live; registerListeners(this.live); }