javax.swing.text.JTextComponent.removePropertyChangeListener()方法的使用及代码示例

x33g5p2x  于2022-01-21 转载在 其他  
字(7.5k)|赞(0)|评价(0)|浏览(109)

本文整理了Java中javax.swing.text.JTextComponent.removePropertyChangeListener()方法的一些代码示例,展示了JTextComponent.removePropertyChangeListener()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。JTextComponent.removePropertyChangeListener()方法的具体详情如下:
包路径:javax.swing.text.JTextComponent
类名称:JTextComponent
方法名:removePropertyChangeListener

JTextComponent.removePropertyChangeListener介绍

暂无

代码示例

代码示例来源:origin: groovy/groovy-core

public synchronized void syntheticUnbind() {
  boundTextComponent.removePropertyChangeListener("document", this);
  boundTextComponent.getDocument().removeDocumentListener(this);
  boundTextComponent = null;
}

代码示例来源:origin: net.java.dev.laf-widget/laf-widget

@Override
  public void uninstallListeners() {
    this.jcomp.removePropertyChangeListener(this.propertyChangeListener);
    this.propertyChangeListener = null;
  }
}

代码示例来源:origin: com.google.code.validationframework/validationframework-swing

/**
 * @see Disposable#dispose()
 */
@Override
public void dispose() {
  // Unhook from component
  textComponent.removePropertyChangeListener("document", documentTracker);
  textComponent.getDocument().removeDocumentListener(documentTracker);
}

代码示例来源:origin: org.kohsuke.droovy/groovy

public synchronized void syntheticUnbind() {
  boundTextComponent.removePropertyChangeListener("document", this);
  boundTextComponent.getDocument().removeDocumentListener(this);
  boundTextComponent = null;
}

代码示例来源:origin: dcaoyuan/nbscala

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);
      }
    }
  }
});

代码示例来源:origin: org.codehaus.groovy/groovy-all-minimal

public synchronized void unbind() {
  if (bound) {
    bound = false;
    // fail dirty, no checks
    boundTextComponent.removePropertyChangeListener("document", this);
    boundTextComponent.getDocument().removeDocumentListener(this);
    boundTextComponent = null;
  }
}

代码示例来源:origin: com.thinkaurelius.groovy-shaded-asm/groovy-shaded-asm

public synchronized void syntheticUnbind() {
  boundTextComponent.removePropertyChangeListener("document", this);
  boundTextComponent.getDocument().removeDocumentListener(this);
  boundTextComponent = null;
}

代码示例来源:origin: org.codehaus.groovy/groovy-jdk14

public synchronized void syntheticUnbind() {
  boundTextComponent.removePropertyChangeListener("document", this);
  boundTextComponent.getDocument().removeDocumentListener(this);
  boundTextComponent = null;
}

代码示例来源:origin: org.codehaus.groovy/groovy-swing

public synchronized void syntheticUnbind() {
  boundTextComponent.removePropertyChangeListener("document", this);
  boundTextComponent.getDocument().removeDocumentListener(this);
  boundTextComponent = null;
}

代码示例来源:origin: org.zaproxy/zap

private void removeListenersWithCaret(Caret caret) {
  if (caret != null) {
    textComponent.removeFocusListener(this);
    textComponent.removePropertyChangeListener("editable", this);
  }
}

代码示例来源:origin: net.java.truecommons/truecommons-key-swing

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);
}

代码示例来源:origin: de.schlichtherle.truezip/truezip-swing

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);
}

代码示例来源:origin: net.java.dev.glazedlists/glazedlists_java16

/**
 * 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);
}

代码示例来源:origin: net.java.dev.glazedlists/glazedlists_java15

/**
 * 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);
}

代码示例来源:origin: com.haulmont.thirdparty/glazedlists

/**
 * 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);
}

代码示例来源:origin: it.tidalwave.betterbeansbinding/betterbeansbinding-swingbinding

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;
}

代码示例来源:origin: net.java.dev.beansbinding/beansbinding

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;
}

代码示例来源:origin: org.zaproxy/zap

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);
  }
}

代码示例来源:origin: net.java.abeille/abeille

/** 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;
}

代码示例来源:origin: net.java.abeille/abeille

/** 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);
}

相关文章

JTextComponent类方法