public synchronized void syntheticUnbind() { boundTextComponent.removePropertyChangeListener("document", this); boundTextComponent.getDocument().removeDocumentListener(this); boundTextComponent = null; }
@Override public void uninstallListeners() { this.jcomp.removePropertyChangeListener(this.propertyChangeListener); this.propertyChangeListener = null; } }
/** * @see Disposable#dispose() */ @Override public void dispose() { // Unhook from component textComponent.removePropertyChangeListener("document", documentTracker); textComponent.getDocument().removeDocumentListener(documentTracker); }
public synchronized void syntheticUnbind() { boundTextComponent.removePropertyChangeListener("document", this); boundTextComponent.getDocument().removeDocumentListener(this); boundTextComponent = null; }
public void propertyChange(PropertyChangeEvent evt) { if (!(evt.getNewValue() instanceof FilteredKeymap)) { // We have to do that lazily, because the property change // is fired *before* the keymap is actually changed! component.removePropertyChangeListener("keymap", this); if (EventQueue.isDispatchThread()) { EventQueue.invokeLater(new KeymapUpdater()); } else { RequestProcessor.getDefault().post(new KeymapUpdater(), 100); } } } });
public synchronized void unbind() { if (bound) { bound = false; // fail dirty, no checks boundTextComponent.removePropertyChangeListener("document", this); boundTextComponent.getDocument().removeDocumentListener(this); boundTextComponent = null; } }
public synchronized void syntheticUnbind() { boundTextComponent.removePropertyChangeListener("document", this); boundTextComponent.getDocument().removeDocumentListener(this); boundTextComponent = null; }
public synchronized void syntheticUnbind() { boundTextComponent.removePropertyChangeListener("document", this); boundTextComponent.getDocument().removeDocumentListener(this); boundTextComponent = null; }
public synchronized void syntheticUnbind() { boundTextComponent.removePropertyChangeListener("document", this); boundTextComponent.getDocument().removeDocumentListener(this); boundTextComponent = null; }
private void removeListenersWithCaret(Caret caret) { if (caret != null) { textComponent.removeFocusListener(this); textComponent.removePropertyChangeListener("editable", this); } }
private void changeText( final @Nullable JTextComponent oldTC, final @Nullable JTextComponent newTC, final boolean update) { if (newTC == oldTC) return; Document oldDocument = null; if (null != oldTC) { oldTC.removePropertyChangeListener("document", listener); oldDocument = oldTC.getDocument(); } Document newDocument = null; if (null != newTC) { newDocument = newTC.getDocument(); newTC.addPropertyChangeListener("document", listener); } changeDocument(oldDocument, newDocument, update); }
private void changeText( final @CheckForNull JTextComponent oldTC, final @CheckForNull JTextComponent newTC, final boolean update) { if (newTC == oldTC) return; Document oldDocument = null; if (null != oldTC) { oldTC.removePropertyChangeListener("document", listener); oldDocument = oldTC.getDocument(); } Document newDocument = null; if (null != newTC) { newDocument = newTC.getDocument(); newTC.addPropertyChangeListener("document", listener); } changeDocument(oldDocument, newDocument, update); }
/** * Stop listening. */ private void deregisterListeners(boolean live) { if (live) { document.removeDocumentListener(filterHandler); } else { JTextField textField = (JTextField) textComponent; textField.removeActionListener(filterHandler); } if (textComponent != null) textComponent.removePropertyChangeListener(filterHandler); }
/** * Stop listening. */ private void deregisterListeners(boolean live) { if (live) { document.removeDocumentListener(filterHandler); } else { JTextField textField = (JTextField) textComponent; textField.removeActionListener(filterHandler); } if (textComponent != null) textComponent.removePropertyChangeListener(filterHandler); }
/** * Stop listening. */ private void deregisterListeners(boolean live) { if (live) { document.removeDocumentListener(filterHandler); } else { JTextField textField = (JTextField) textComponent; textField.removeActionListener(filterHandler); } if (textComponent != null) textComponent.removePropertyChangeListener(filterHandler); }
protected void listeningStopped() { cachedText = null; component.removePropertyChangeListener("document", handler); if (property != PROPERTY_BASE) { component.removeFocusListener(handler); } if ((property == ON_ACTION_OR_FOCUS_LOST) && (component instanceof JTextField)) { ((JTextField) component).removeActionListener(handler); } uninstallDocumentListener(); document = null; handler = null; }
protected void listeningStopped() { cachedText = null; component.removePropertyChangeListener("document", handler); if (property != PROPERTY_BASE) { component.removeFocusListener(handler); } if (property == ON_ACTION_OR_FOCUS_LOST && (component instanceof JTextField)) { ((JTextField)component).removeActionListener(handler); } uninstallDocumentListener(); document = null; handler = null; }
public void setEnforceVisibilityOnFocusGain(boolean visible) { if (enforceCaretVisibility == visible) { return; } enforceCaretVisibility = visible; if (enforceCaretVisibility) { setupWithCaret(textComponent.getCaret()); textComponent.addPropertyChangeListener("caret", this); } else { removeListenersWithCaret(textComponent.getCaret()); textComponent.removePropertyChangeListener("caret", this); } }
/** Deinstalls the UI for a component */ public void uninstallUI(JComponent c) { component.removePropertyChangeListener(this); component.getDocument().removeDocumentListener(this); rootView.setView(null); // sets inner view of root view to null component.removeAll(); component.setKeymap(null); component.setCaret(null); getEditorUI().uninstallUI(component); Registry.removeComponent(component); // Clear the editorUI so it will be recreated according to the kit // of the component for which the installUI() is called editorUI = null; component = null; }
/** Called when UI is being removed from JTextComponent */ public void deinstall(JTextComponent c) { component = null; // invalidate if (flasher != null) { setBlinkRate(0); } Utilities.getEditorUI(c).removeLayer(DrawLayerFactory.CARET_LAYER_NAME); c.removeMouseMotionListener(this); c.removeMouseListener(this); if (focusListener != null) { c.removeFocusListener(focusListener); focusListener = null; } c.removePropertyChangeListener(this); modelChanged(listenDoc, null); }