1 7 package com.inversoft.beans; 8 9 10 import java.util.ArrayList ; 11 import java.util.Iterator ; 12 import java.util.List ; 13 14 15 21 public class SynchronizedIndexedBeanProperty extends IndexedBeanProperty { 22 23 26 protected SynchronizedIndexedBeanProperty() throws BeanException { 27 super(); 28 } 29 30 33 public SynchronizedIndexedBeanProperty(String propertyName, Class beanClass) 34 throws BeanException { 35 super(propertyName, beanClass); 36 } 37 38 41 public SynchronizedIndexedBeanProperty(String propertyName, String beanClass) 42 throws BeanException { 43 super(propertyName, beanClass); 44 } 45 46 47 53 public void addPropertyListener(PropertyListener listener) { 54 synchronized (super.propertyListeners) { 55 super.addPropertyListener(listener); 56 } 57 } 58 59 65 public void removePropertyListener(PropertyListener listener) { 66 synchronized (super.propertyListeners) { 67 super.removePropertyListener(listener); 68 } 69 } 70 71 76 public Iterator getPropertyListeners() { 77 synchronized (super.propertyListeners) { 78 List newList = (List ) ((ArrayList ) super.propertyListeners).clone(); 79 return newList.iterator(); 80 } 81 } 82 83 88 public boolean hasPropertyListeners() { 89 synchronized (super.propertyListeners) { 90 return super.hasPropertyListeners(); 91 } 92 } 93 94 100 public void addConversionListener(ConversionListener listener) { 101 synchronized (super.conversionListeners) { 102 super.addConversionListener(listener); 103 } 104 } 105 106 112 public void removeConversionListener(ConversionListener listener) { 113 synchronized (super.conversionListeners) { 114 super.removeConversionListener(listener); 115 } 116 } 117 118 123 public Iterator getConversionListeners() { 124 synchronized (super.conversionListeners) { 125 List newList = (List ) ((ArrayList ) super.conversionListeners).clone(); 126 return newList.iterator(); 127 } 128 } 129 130 135 public boolean hasConversionListeners() { 136 synchronized (super.conversionListeners) { 137 return super.hasConversionListeners(); 138 } 139 } 140 } 141 | Popular Tags |