本文整理汇总了Java中java.awt.Component.removePropertyChangeListener方法的典型用法代码示例。如果您正苦于以下问题:Java Component.removePropertyChangeListener方法的具体用法?Java Component.removePropertyChangeListener怎么用?Java Component.removePropertyChangeListener使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类java.awt.Component
的用法示例。
在下文中一共展示了Component.removePropertyChangeListener方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: onDispose
import java.awt.Component; //导入方法依赖的package包/类
@Override
protected void onDispose(Component w) {
String pn = propertyName;
if (pn == null) {
w.removePropertyChangeListener(this);
} else {
w.removePropertyChangeListener(pn, this);
}
}
示例2: detachFrom
import java.awt.Component; //导入方法依赖的package包/类
protected void detachFrom(Component jc) {
listenedTo.remove(jc);
if (extListener != null && extListener.accept (jc)) {
extListener.stopListeningTo(jc);
}
if (isProbablyAContainer(jc)) {
detachFromHierarchyOf((Container) jc);
} else if (jc instanceof JList) {
((JList) jc).removeListSelectionListener(this);
} else if (jc instanceof JComboBox) {
((JComboBox) jc).removeActionListener(this);
} else if (jc instanceof JTree) {
((JTree) jc).getSelectionModel().removeTreeSelectionListener(this);
} else if (jc instanceof JToggleButton) {
((AbstractButton) jc).removeActionListener(this);
} else if (jc instanceof JTextComponent) {
((JTextComponent) jc).getDocument().removeDocumentListener(this);
} else if (jc instanceof JColorChooser) {
((JColorChooser) jc).getSelectionModel().removeChangeListener(this);
} else if (jc instanceof JSpinner) {
((JSpinner) jc).removeChangeListener(this);
} else if (jc instanceof JSlider) {
((JSlider) jc).removeChangeListener(this);
} else if (jc instanceof JTable) {
((JTable) jc).getSelectionModel().removeListSelectionListener(this);
}
if (accept(jc) && !(jc instanceof JPanel)) {
jc.removePropertyChangeListener("name", this);
Object key = wizardPage.getMapKeyFor(jc);
if (key != null) {
if (logger.isLoggable(Level.FINE)) {
logger.fine("Named component removed from hierarchy: " + // NOI18N
key + ". Removing any corresponding " + // NOI18N
"value from the wizard settings map."); // NOI18N
}
wizardPage.removeFromMap(key);
}
}
if (logger.isLoggable(Level.FINE) && accept(jc)) {
logger.fine("Stop listening to " + jc); // NOI18N
}
}