public void remove(int offs, int len) throws BadLocationException { super.remove(offs, len); final List oldSuggestions = suggestions; suggestions = recentResourceNamesModel.getResourceNamesStartingWith(AutoCompletionTextField.this.getText()); if (!oldSuggestions.equals(suggestions)) { comboBoxModel.fireContentsChanged(); } }
/** * Inserts some content into the document. * Inserting content causes a write lock to be held while the * actual changes are taking place, followed by notification * to the observers on the thread that grabbed the write lock. * <p/> * This method is thread safe, although most Swing methods * are not. Please see * <A HREF="http://java.sun.com/products/jfc/swingdoc-archive/threads.html">Threads * and Swing</A> for more information. * * @param offs the starting offset >= 0 * @param str the string to insert; does nothing with null/empty strings * @param a the attributes for the inserted content * @throws BadLocationException the given insert position is not a valid * position within the document * @see Document#insertString */ public void insertString(int offs, @NotNull String str, AttributeSet a) throws BadLocationException { super.insertString(offs, str, a); int newOffs = offs + str.length(); if (overwrite && newOffs < getLength()) { int len = Math.min(str.length(), getLength() - newOffs); super.remove(newOffs, len); } }
/** {@inheritDoc} */ @Override public void remove(int offset, int length) throws BadLocationException { final int curLen = getLength(); final String currentContent = getText(0, curLen); final String newText = currentContent.substring(0, offset) + currentContent.substring(length + offset, curLen); if (allowNegative && offset == 0 && newText.equals("-")) { value = 0; } else { value = checkInput(newText, offset); } super.remove(offset, length); }
@Override public void remove(int i, int i1) throws BadLocationException { if(updatingTextField) super.remove(i, i1); } });
@Override public void remove(int offset,int length) throws BadLocationException { if (offset>=m_userTypedTextStart) super.remove(offset,length); } @Override
@Override public void remove(int offs, int len) throws BadLocationException { if (!readOnly) { super.remove(offs, len); } }
@Override public void remove(int offs, int len) throws BadLocationException { if (selecting) return; super.remove(offs, len); }
public void remove(int offset,int length) throws BadLocationException { if (offset>=m_userTypedTextStart) super.remove(offset,length); } public void insertString(int offset,String string,AttributeSet attributeSet) throws BadLocationException {
@Override public void remove(int i, int i1) throws BadLocationException { if (!lendo || limitOffset <= i) { super.remove(i, i1); } } }
/** {@inheritDoc} */ public void remove(int offs, int len) throws BadLocationException { super.remove(offs, len); if (cacheToken != null) { if (cacheToken.getStartOffset() >= offs) { cacheToken = null; } } }
@Override public void remove(final int offs, final int len) throws BadLocationException { super.remove(offs, len); // if its a valid number weve changed try { Integer.parseInt(IntTextField.this.getText()); notifyListeners(); } catch (final NumberFormatException e) { // ignore malformed input } } }
@Override public void remove (int offs, int len) throws BadLocationException { // do the job in the parent class first super.remove (offs, len); // signal value changed to container field.triggerValueChanged(); }
@Override public void remove(int offs, int len) throws BadLocationException { String str = getText(0, getLength()); str = str.substring(0, offs) + str.substring(offs + len); if (!str.equals("") && !str.equals(".")) { super.remove(offs, len); } } }
public void remove(int offs, int len) throws BadLocationException { super.remove(offs, len); final List oldSuggestions = suggestions; suggestions = recentURLsModel.getURLsStartingWith(AutoCompletionTextField.this.getText()); if (!oldSuggestions.equals(suggestions)) { comboBoxModel.fireContentsChanged(); } }
@Override public void remove(int offs, int len) throws BadLocationException { String oldValue = TextFieldPropertyChange.this.getText(); super.remove(offs, len); String newValue = TextFieldPropertyChange.this.getText(); if (!ignoreEvents && !oldValue.equals(newValue)) { TextFieldPropertyChange.this.firePropertyChange(TEXT_PROPERTY, oldValue, newValue); } } }
/** * Removes all text from TextBox; take no other action. * * @throws BadLocationException Bad Location Error. */ public void removeAllText() throws BadLocationException { if (getLength() > 0) { super.remove(0, getLength()); } }
private void setText(String text) throws BadLocationException { // remove all text and insert the completed string super.remove(0, getLength()); super.insertString(0, text, null); }
private void setText(final String text) { try { // remove all text and insert the completed string super.remove(0, getLength()); super.insertString(0, text, null); } catch (final BadLocationException e) { throw new RuntimeException(e.toString()); } }
@Override public void remove(int offs, int len) throws BadLocationException { super.remove(offs, len); dEditor.getTextField().getCaret().setDot(offs); } });
@Override public void remove(int offs, int len) throws BadLocationException { oldDate = getDate(); super.remove(offs, len); if (getCurrentWriter() == null) { fireListeners(oldDate, getDate()); } else { oldDateSetted = true; } }