本文整理匯總了Java中java.beans.VetoableChangeSupport.removeVetoableChangeListener方法的典型用法代碼示例。如果您正苦於以下問題:Java VetoableChangeSupport.removeVetoableChangeListener方法的具體用法?Java VetoableChangeSupport.removeVetoableChangeListener怎麽用?Java VetoableChangeSupport.removeVetoableChangeListener使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類java.beans.VetoableChangeSupport
的用法示例。
在下文中一共展示了VetoableChangeSupport.removeVetoableChangeListener方法的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: testRemoveVetoableChangeListenerStringVetoableChangeListener_property
import java.beans.VetoableChangeSupport; //導入方法依賴的package包/類
public void testRemoveVetoableChangeListenerStringVetoableChangeListener_property() {
MockSource source = new MockSource();
VetoableChangeSupport support = new VetoableChangeSupport(source);
VetoableChangeListener proxy = EventHandler.create(
VetoableChangeListener.class, source, "setText");
String propertyName = "label";
support.addVetoableChangeListener(propertyName, proxy);
assertTrue(support.hasListeners(propertyName));
support.removeVetoableChangeListener(propertyName, proxy);
assertFalse(support.hasListeners(propertyName));
assertEquals(0, support.getVetoableChangeListeners(propertyName).length);
assertEquals(0, support.getVetoableChangeListeners().length);
}
示例2: testRemoveVetoableChangeListenerStringVetoableChangeListener_property_more
import java.beans.VetoableChangeSupport; //導入方法依賴的package包/類
public void testRemoveVetoableChangeListenerStringVetoableChangeListener_property_more() {
MockSource source = new MockSource();
VetoableChangeSupport support = new VetoableChangeSupport(source);
VetoableChangeListener proxy = EventHandler.create(
VetoableChangeListener.class, source, "setText");
String propertyName = "label";
support.addVetoableChangeListener(propertyName, proxy);
support.addVetoableChangeListener(propertyName, proxy);
assertTrue(support.hasListeners(propertyName));
assertEquals(2, support.getVetoableChangeListeners(propertyName).length);
support.removeVetoableChangeListener(propertyName, proxy);
assertTrue(support.hasListeners(propertyName));
assertEquals(1, support.getVetoableChangeListeners(propertyName).length);
assertEquals(1, support.getVetoableChangeListeners().length);
}
示例3: testRemoveVetoableChangeListenerStringVetoableChangeListener_property_diff
import java.beans.VetoableChangeSupport; //導入方法依賴的package包/類
public void testRemoveVetoableChangeListenerStringVetoableChangeListener_property_diff() {
MockSource source = new MockSource();
VetoableChangeSupport support = new VetoableChangeSupport(source);
VetoableChangeListener proxy = EventHandler.create(
VetoableChangeListener.class, source, "setText");
VetoableChangeListener proxy2 = EventHandler.create(
VetoableChangeListener.class, source, "getText");
String propertyName = "label";
support.addVetoableChangeListener(propertyName, proxy);
support.addVetoableChangeListener(propertyName, proxy2);
assertTrue(support.hasListeners(propertyName));
assertEquals(2, support.getVetoableChangeListeners(propertyName).length);
support.removeVetoableChangeListener(propertyName, proxy);
assertTrue(support.hasListeners(propertyName));
assertEquals(1, support.getVetoableChangeListeners(propertyName).length);
assertEquals(1, support.getVetoableChangeListeners().length);
assertSame(proxy2, support.getVetoableChangeListeners(propertyName)[0]);
}
示例4: testRemoveVetoableChangeListenerStringVetoableChangeListener_listener_diff
import java.beans.VetoableChangeSupport; //導入方法依賴的package包/類
public void testRemoveVetoableChangeListenerStringVetoableChangeListener_listener_diff() {
MockSource source = new MockSource();
VetoableChangeSupport support = new VetoableChangeSupport(source);
VetoableChangeListener proxy = EventHandler.create(
VetoableChangeListener.class, source, "setText");
VetoableChangeListener proxy2 = EventHandler.create(
VetoableChangeListener.class, source, "getText");
String propertyName = "label";
support.addVetoableChangeListener(propertyName, proxy);
assertTrue(support.hasListeners(propertyName));
assertEquals(1, support.getVetoableChangeListeners(propertyName).length);
support.removeVetoableChangeListener(propertyName, proxy2);
assertTrue(support.hasListeners(propertyName));
assertEquals(1, support.getVetoableChangeListeners(propertyName).length);
assertEquals(1, support.getVetoableChangeListeners().length);
}
示例5: testRemoveVetoableChangeListenerStringVetoableChangeListener_listener_null
import java.beans.VetoableChangeSupport; //導入方法依賴的package包/類
public void testRemoveVetoableChangeListenerStringVetoableChangeListener_listener_null() {
MockSource source = new MockSource();
VetoableChangeSupport support = new VetoableChangeSupport(source);
VetoableChangeListener proxy = EventHandler.create(
VetoableChangeListener.class, source, "setText");
String propertyName = "label";
support.addVetoableChangeListener(propertyName, null);
assertFalse(support.hasListeners(propertyName));
assertEquals(0, support.getVetoableChangeListeners(propertyName).length);
support.removeVetoableChangeListener(propertyName, proxy);
assertFalse(support.hasListeners(propertyName));
assertEquals(0, support.getVetoableChangeListeners(propertyName).length);
assertEquals(0, support.getVetoableChangeListeners().length);
}
示例6: testRemoveVetoableChangeListenerStringVetoableChangeListener_all
import java.beans.VetoableChangeSupport; //導入方法依賴的package包/類
public void testRemoveVetoableChangeListenerStringVetoableChangeListener_all() {
MockSource source = new MockSource();
VetoableChangeSupport support = new VetoableChangeSupport(source);
VetoableChangeListener proxy = EventHandler.create(
VetoableChangeListener.class, source, "setText");
String propertyName = "label";
support.addVetoableChangeListener(proxy);
assertTrue(support.hasListeners(propertyName));
support.removeVetoableChangeListener(propertyName, proxy);
assertTrue(support.hasListeners(propertyName));
assertEquals(0, support.getVetoableChangeListeners(propertyName).length);
assertEquals(1, support.getVetoableChangeListeners().length);
}
示例7: testRemoveVetoableChangeListenerStringVetoableChangeListener_propertyName_Invalid
import java.beans.VetoableChangeSupport; //導入方法依賴的package包/類
public void testRemoveVetoableChangeListenerStringVetoableChangeListener_propertyName_Invalid() {
MockSource source = new MockSource();
VetoableChangeSupport support = new VetoableChangeSupport(source);
VetoableChangeListener proxy = EventHandler.create(
VetoableChangeListener.class, source, "setText");
String propertyName = "label";
support.addVetoableChangeListener(propertyName, proxy);
assertTrue(support.hasListeners(propertyName));
support.removeVetoableChangeListener(propertyName + "_invalid", proxy);
assertTrue(support.hasListeners(propertyName));
assertEquals(1, support.getVetoableChangeListeners(propertyName).length);
assertEquals(1, support.getVetoableChangeListeners().length);
}
示例8: testRemoveVetoableChangeListenerVetoableChangeListener_invalid
import java.beans.VetoableChangeSupport; //導入方法依賴的package包/類
public void testRemoveVetoableChangeListenerVetoableChangeListener_invalid() {
MockSource source = new MockSource();
VetoableChangeSupport support = new VetoableChangeSupport(source);
VetoableChangeListener proxy = EventHandler.create(
VetoableChangeListener.class, source, "setText");
String propertyName = "label";
assertFalse(support.hasListeners(propertyName));
assertEquals(0, support.getVetoableChangeListeners().length);
support.removeVetoableChangeListener(proxy);
assertFalse(support.hasListeners(propertyName));
assertEquals(0, support.getVetoableChangeListeners(propertyName).length);
assertEquals(0, support.getVetoableChangeListeners().length);
}
示例9: testRemoveVetoableChangeListenerVetoableChangeListener_all
import java.beans.VetoableChangeSupport; //導入方法依賴的package包/類
public void testRemoveVetoableChangeListenerVetoableChangeListener_all() {
MockSource source = new MockSource();
VetoableChangeSupport support = new VetoableChangeSupport(source);
VetoableChangeListener proxy = EventHandler.create(
VetoableChangeListener.class, source, "setText");
String propertyName = "label";
support.addVetoableChangeListener(proxy);
assertTrue(support.hasListeners(propertyName));
support.removeVetoableChangeListener(proxy);
assertFalse(support.hasListeners(propertyName));
assertEquals(0, support.getVetoableChangeListeners(propertyName).length);
assertEquals(0, support.getVetoableChangeListeners().length);
}
示例10: testRemoveVetoableChangeListenerVetoableChangeListener_all_more
import java.beans.VetoableChangeSupport; //導入方法依賴的package包/類
public void testRemoveVetoableChangeListenerVetoableChangeListener_all_more() {
MockSource source = new MockSource();
VetoableChangeSupport support = new VetoableChangeSupport(source);
VetoableChangeListener proxy = EventHandler.create(
VetoableChangeListener.class, source, "setText");
String propertyName = "label";
support.addVetoableChangeListener(proxy);
support.addVetoableChangeListener(proxy);
assertTrue(support.hasListeners(propertyName));
assertEquals(2, support.getVetoableChangeListeners().length);
support.removeVetoableChangeListener(proxy);
assertTrue(support.hasListeners(propertyName));
assertEquals(0, support.getVetoableChangeListeners(propertyName).length);
assertEquals(1, support.getVetoableChangeListeners().length);
}
示例11: testRemoveVetoableChangeListenerVetoableChangeListener_all_more_diff
import java.beans.VetoableChangeSupport; //導入方法依賴的package包/類
public void testRemoveVetoableChangeListenerVetoableChangeListener_all_more_diff() {
MockSource source = new MockSource();
VetoableChangeSupport support = new VetoableChangeSupport(source);
VetoableChangeListener proxy = EventHandler.create(
VetoableChangeListener.class, source, "setText");
VetoableChangeListener proxy2 = EventHandler.create(
VetoableChangeListener.class, source, "getText");
String propertyName = "label";
support.addVetoableChangeListener(proxy);
support.addVetoableChangeListener(proxy2);
assertTrue(support.hasListeners(propertyName));
assertEquals(2, support.getVetoableChangeListeners().length);
support.removeVetoableChangeListener(proxy);
assertTrue(support.hasListeners(propertyName));
assertEquals(0, support.getVetoableChangeListeners(propertyName).length);
assertEquals(1, support.getVetoableChangeListeners().length);
assertEquals(proxy2, support.getVetoableChangeListeners()[0]);
}
示例12: testRemoveVetoableChangeListenerVetoableChangeListener_all_null
import java.beans.VetoableChangeSupport; //導入方法依賴的package包/類
public void testRemoveVetoableChangeListenerVetoableChangeListener_all_null() {
MockSource source = new MockSource();
VetoableChangeSupport support = new VetoableChangeSupport(source);
VetoableChangeListener proxy = EventHandler.create(
VetoableChangeListener.class, source, "setText");
String propertyName = "label";
support.addVetoableChangeListener(null);
assertFalse(support.hasListeners(propertyName));
assertEquals(0, support.getVetoableChangeListeners().length);
support.removeVetoableChangeListener(proxy);
assertFalse(support.hasListeners(propertyName));
assertEquals(0, support.getVetoableChangeListeners(propertyName).length);
assertEquals(0, support.getVetoableChangeListeners().length);
}
示例13: testRemoveVetoableChangeListenerVetoableChangeListener_property
import java.beans.VetoableChangeSupport; //導入方法依賴的package包/類
public void testRemoveVetoableChangeListenerVetoableChangeListener_property() {
MockSource source = new MockSource();
VetoableChangeSupport support = new VetoableChangeSupport(source);
VetoableChangeListener proxy = EventHandler.create(
VetoableChangeListener.class, source, "setText");
String propertyName = "label";
support.addVetoableChangeListener("label", proxy);
assertTrue(support.hasListeners(propertyName));
assertEquals(1, support.getVetoableChangeListeners().length);
support.removeVetoableChangeListener(proxy);
assertTrue(support.hasListeners(propertyName));
assertEquals(1, support.getVetoableChangeListeners(propertyName).length);
assertEquals(1, support.getVetoableChangeListeners().length);
}
示例14: testRemoveVetoableChangeListenerStringVetoableChangeListener_propertyName_Null
import java.beans.VetoableChangeSupport; //導入方法依賴的package包/類
public void testRemoveVetoableChangeListenerStringVetoableChangeListener_propertyName_Null() {
MockSource source = new MockSource();
VetoableChangeSupport support = new VetoableChangeSupport(source);
VetoableChangeListener proxy = EventHandler.create(
VetoableChangeListener.class, source, "setText");
String propertyName = "label";
support.addVetoableChangeListener(propertyName, proxy);
assertTrue(support.hasListeners(propertyName));
support.removeVetoableChangeListener(null, proxy);
}
示例15: testRemoveVetoableChangeListenerStringVetoableChangeListener_propertyName_NoListener
import java.beans.VetoableChangeSupport; //導入方法依賴的package包/類
public void testRemoveVetoableChangeListenerStringVetoableChangeListener_propertyName_NoListener() {
MockSource source = new MockSource();
VetoableChangeSupport support = new VetoableChangeSupport(source);
VetoableChangeListener proxy = EventHandler.create(
VetoableChangeListener.class, source, "setText");
String propertyName = "label";
assertFalse(support.hasListeners(propertyName));
support.removeVetoableChangeListener(propertyName, proxy);
assertFalse(support.hasListeners(propertyName));
assertEquals(0, support.getVetoableChangeListeners(propertyName).length);
assertEquals(0, support.getVetoableChangeListeners().length);
}