diff options
Diffstat (limited to 'src/net')
36 files changed, 64 insertions, 326 deletions
diff --git a/src/net/java/sip/communicator/impl/configuration/ChangeEventDispatcher.java b/src/net/java/sip/communicator/impl/configuration/ChangeEventDispatcher.java index cba6a07..c38b2b6 100644 --- a/src/net/java/sip/communicator/impl/configuration/ChangeEventDispatcher.java +++ b/src/net/java/sip/communicator/impl/configuration/ChangeEventDispatcher.java @@ -7,10 +7,9 @@ package net.java.sip.communicator.impl.configuration; import java.util.*; +import java.beans.*; import net.java.sip.communicator.service.configuration.*; -import net.java.sip.communicator.service.configuration.event.*; -import net.java.sip.communicator.util.*; /** * This is a utility class that can be used by objects that support constrained @@ -245,8 +244,8 @@ public class ChangeEventDispatcher * change to be rolled back. */ public void fireVetoableChange(String propertyName, - Object oldValue, Object newValue) throws - PropertyVetoException + Object oldValue, Object newValue) + //throws PropertyVetoException { if (vetoableChangeListeners == null && vetoableChangeChildren == null) { @@ -255,7 +254,7 @@ public class ChangeEventDispatcher PropertyChangeEvent evt = new PropertyChangeEvent(source, propertyName, oldValue, newValue); - fireVetoableChange(evt); + fireVetoableChange(evt); } /** @@ -269,8 +268,8 @@ public class ChangeEventDispatcher * @exception PropertyVetoException if at least one of the recipients has * vetoed the change. */ - public void fireVetoableChange(PropertyChangeEvent evt) throws - PropertyVetoException + public void fireVetoableChange(PropertyChangeEvent evt) + // throws PropertyVetoException { Object oldValue = evt.getOldValue(); @@ -304,7 +303,11 @@ public class ChangeEventDispatcher { VetoableChangeListener target = targets[i]; // don't catch the exception - let it bounce to the caller. - target.vetoableChange(evt); + try { + target.vetoableChange(evt); + } catch (PropertyVetoException e) { + throw new ConfigPropertyVetoExceoption(e.getLocalizedMessage(), evt); + } } } diff --git a/src/net/java/sip/communicator/impl/configuration/ConfigurationServiceImpl.java b/src/net/java/sip/communicator/impl/configuration/ConfigurationServiceImpl.java index f47374b..7be5509 100644 --- a/src/net/java/sip/communicator/impl/configuration/ConfigurationServiceImpl.java +++ b/src/net/java/sip/communicator/impl/configuration/ConfigurationServiceImpl.java @@ -8,10 +8,10 @@ package net.java.sip.communicator.impl.configuration; import java.io.*; import java.util.*; +import java.beans.*; import net.java.sip.communicator.impl.configuration.xml.*; import net.java.sip.communicator.service.configuration.*; -import net.java.sip.communicator.service.configuration.event.*; import net.java.sip.communicator.service.fileaccess.*; import net.java.sip.communicator.util.*; import net.java.sip.communicator.util.xml.*; @@ -78,7 +78,7 @@ public class ConfigurationServiceImpl * at least one propertychange listener. */ public void setProperty(String propertyName, Object property) - throws PropertyVetoException + // throws PropertyVetoException { setProperty(propertyName, property, false); } @@ -104,7 +104,7 @@ public class ConfigurationServiceImpl */ public void setProperty(String propertyName, Object property, boolean isSystem) - throws PropertyVetoException + // throws PropertyVetoException { Object oldValue = getProperty(propertyName); @@ -144,7 +144,7 @@ public class ConfigurationServiceImpl * to the disk. */ public void setProperties(Map<String, Object> properties) - throws PropertyVetoException + // throws PropertyVetoException { //first check whether the changes are ok with everyone Map<String, Object> oldValues @@ -254,7 +254,7 @@ public class ConfigurationServiceImpl * at least one propertychange listener. */ public void removeProperty(String propertyName) - throws PropertyVetoException + // throws PropertyVetoException { List<String> childPropertyNames = getPropertyNamesByPrefix(propertyName, false); diff --git a/src/net/java/sip/communicator/impl/gui/UIServiceImpl.java b/src/net/java/sip/communicator/impl/gui/UIServiceImpl.java index 6a056d9..2a1d361 100644 --- a/src/net/java/sip/communicator/impl/gui/UIServiceImpl.java +++ b/src/net/java/sip/communicator/impl/gui/UIServiceImpl.java @@ -10,6 +10,7 @@ import java.awt.*; import java.awt.event.*; import java.util.*; import java.util.List; +import java.beans.*; import javax.swing.*; diff --git a/src/net/java/sip/communicator/impl/gui/main/call/CallPeerAdapter.java b/src/net/java/sip/communicator/impl/gui/main/call/CallPeerAdapter.java index 8de2e98..3683bf7 100644 --- a/src/net/java/sip/communicator/impl/gui/main/call/CallPeerAdapter.java +++ b/src/net/java/sip/communicator/impl/gui/main/call/CallPeerAdapter.java @@ -7,12 +7,12 @@ package net.java.sip.communicator.impl.gui.main.call; import javax.swing.*; +import java.beans.*; import net.java.sip.communicator.impl.gui.*; import net.java.sip.communicator.impl.gui.utils.*; import net.java.sip.communicator.service.protocol.*; import net.java.sip.communicator.service.protocol.event.*; -import net.java.sip.communicator.util.*; /** * The <tt>CallPeerAdapter</tt> is an adapter that implements all common diff --git a/src/net/java/sip/communicator/impl/gui/main/call/OneToOneCallPeerPanel.java b/src/net/java/sip/communicator/impl/gui/main/call/OneToOneCallPeerPanel.java index 1e68e33..1047c7d 100644 --- a/src/net/java/sip/communicator/impl/gui/main/call/OneToOneCallPeerPanel.java +++ b/src/net/java/sip/communicator/impl/gui/main/call/OneToOneCallPeerPanel.java @@ -9,6 +9,7 @@ package net.java.sip.communicator.impl.gui.main.call; import java.awt.*; import java.awt.event.*; import java.util.*; +import java.beans.*; import javax.swing.*; diff --git a/src/net/java/sip/communicator/impl/gui/main/call/conference/CallPeerMenu.java b/src/net/java/sip/communicator/impl/gui/main/call/conference/CallPeerMenu.java index c0cd1e3..38d93d2 100644 --- a/src/net/java/sip/communicator/impl/gui/main/call/conference/CallPeerMenu.java +++ b/src/net/java/sip/communicator/impl/gui/main/call/conference/CallPeerMenu.java @@ -8,6 +8,7 @@ package net.java.sip.communicator.impl.gui.main.call.conference; import java.awt.*; import java.awt.event.*; +import java.beans.*; import javax.swing.*; @@ -16,7 +17,6 @@ import net.java.sip.communicator.impl.gui.main.call.*; import net.java.sip.communicator.impl.gui.utils.*; import net.java.sip.communicator.service.protocol.*; import net.java.sip.communicator.service.protocol.event.*; -import net.java.sip.communicator.util.*; import net.java.sip.communicator.util.swing.*; /** diff --git a/src/net/java/sip/communicator/impl/gui/main/call/conference/ConferenceMemberPanel.java b/src/net/java/sip/communicator/impl/gui/main/call/conference/ConferenceMemberPanel.java index 6a8ebf6..1b50bf7 100644 --- a/src/net/java/sip/communicator/impl/gui/main/call/conference/ConferenceMemberPanel.java +++ b/src/net/java/sip/communicator/impl/gui/main/call/conference/ConferenceMemberPanel.java @@ -7,10 +7,10 @@ package net.java.sip.communicator.impl.gui.main.call.conference; import java.awt.*; +import java.beans.*; import net.java.sip.communicator.impl.gui.*; import net.java.sip.communicator.service.protocol.*; -import net.java.sip.communicator.util.*; /** * The <tt>ConferenceMemberPanel</tt> renders <tt>ConferenceMember</tt> details. diff --git a/src/net/java/sip/communicator/impl/gui/utils/ConfigurationManager.java b/src/net/java/sip/communicator/impl/gui/utils/ConfigurationManager.java index 1894dd7..81e54bb 100644 --- a/src/net/java/sip/communicator/impl/gui/utils/ConfigurationManager.java +++ b/src/net/java/sip/communicator/impl/gui/utils/ConfigurationManager.java @@ -7,13 +7,13 @@ package net.java.sip.communicator.impl.gui.utils; import java.util.*; +import java.beans.*; import org.osgi.framework.*; import net.java.sip.communicator.impl.gui.*; import net.java.sip.communicator.service.configuration.*; import net.java.sip.communicator.service.protocol.*; -import net.java.sip.communicator.util.*; /** * diff --git a/src/net/java/sip/communicator/impl/media/CallSessionImpl.java b/src/net/java/sip/communicator/impl/media/CallSessionImpl.java index da56b05..d608767 100644 --- a/src/net/java/sip/communicator/impl/media/CallSessionImpl.java +++ b/src/net/java/sip/communicator/impl/media/CallSessionImpl.java @@ -14,6 +14,7 @@ import java.net.*; import java.text.*; import java.util.*; import java.util.List; +import java.beans.*; import javax.media.*; import javax.media.control.*; diff --git a/src/net/java/sip/communicator/impl/media/MediaControl.java b/src/net/java/sip/communicator/impl/media/MediaControl.java index 8ac6cd1..95d3c1a 100644 --- a/src/net/java/sip/communicator/impl/media/MediaControl.java +++ b/src/net/java/sip/communicator/impl/media/MediaControl.java @@ -10,6 +10,7 @@ import java.awt.Dimension; import java.io.*; import java.net.*; import java.util.*; +import java.beans.*; import javax.media.*; import javax.media.control.*; diff --git a/src/net/java/sip/communicator/impl/media/notify/AudioNotifierServiceImpl.java b/src/net/java/sip/communicator/impl/media/notify/AudioNotifierServiceImpl.java index 2fad5ad..2979676 100644 --- a/src/net/java/sip/communicator/impl/media/notify/AudioNotifierServiceImpl.java +++ b/src/net/java/sip/communicator/impl/media/notify/AudioNotifierServiceImpl.java @@ -8,11 +8,11 @@ package net.java.sip.communicator.impl.media.notify; import java.net.*; import java.util.*; +import java.beans.*; import net.java.sip.communicator.impl.media.*; import net.java.sip.communicator.impl.media.device.*; import net.java.sip.communicator.service.audionotifier.*; -import net.java.sip.communicator.util.*; /** * The implementation of the AudioNotifierService. diff --git a/src/net/java/sip/communicator/impl/msghistory/MessageHistoryServiceImpl.java b/src/net/java/sip/communicator/impl/msghistory/MessageHistoryServiceImpl.java index 6ad3cb4..d456187 100644 --- a/src/net/java/sip/communicator/impl/msghistory/MessageHistoryServiceImpl.java +++ b/src/net/java/sip/communicator/impl/msghistory/MessageHistoryServiceImpl.java @@ -8,6 +8,7 @@ package net.java.sip.communicator.impl.msghistory; import java.io.*; import java.util.*; +import java.beans.*; import org.osgi.framework.*; diff --git a/src/net/java/sip/communicator/impl/neomedia/MediaStreamImpl.java b/src/net/java/sip/communicator/impl/neomedia/MediaStreamImpl.java index 0aba6a6..d5137fc 100644 --- a/src/net/java/sip/communicator/impl/neomedia/MediaStreamImpl.java +++ b/src/net/java/sip/communicator/impl/neomedia/MediaStreamImpl.java @@ -9,6 +9,7 @@ package net.java.sip.communicator.impl.neomedia; import java.io.*; import java.net.*; import java.util.*; +import java.beans.*; import javax.media.*; import javax.media.control.*; diff --git a/src/net/java/sip/communicator/impl/neomedia/device/AudioMixerMediaDevice.java b/src/net/java/sip/communicator/impl/neomedia/device/AudioMixerMediaDevice.java index 3a4e35e..482a463 100644 --- a/src/net/java/sip/communicator/impl/neomedia/device/AudioMixerMediaDevice.java +++ b/src/net/java/sip/communicator/impl/neomedia/device/AudioMixerMediaDevice.java @@ -9,6 +9,7 @@ package net.java.sip.communicator.impl.neomedia.device; import java.io.*; import java.net.*; import java.util.*; +import java.beans.*; import javax.media.*; import javax.media.protocol.*; diff --git a/src/net/java/sip/communicator/impl/neomedia/notify/AudioNotifierServiceImpl.java b/src/net/java/sip/communicator/impl/neomedia/notify/AudioNotifierServiceImpl.java index 318092b..a27c24e 100644 --- a/src/net/java/sip/communicator/impl/neomedia/notify/AudioNotifierServiceImpl.java +++ b/src/net/java/sip/communicator/impl/neomedia/notify/AudioNotifierServiceImpl.java @@ -8,11 +8,11 @@ package net.java.sip.communicator.impl.neomedia.notify; import java.net.*; import java.util.*; +import java.beans.*; import net.java.sip.communicator.impl.neomedia.*; import net.java.sip.communicator.impl.neomedia.device.*; import net.java.sip.communicator.service.audionotifier.*; -import net.java.sip.communicator.util.*; /** * The implementation of the AudioNotifierService. diff --git a/src/net/java/sip/communicator/impl/netaddr/NetworkAddressManagerServiceImpl.java b/src/net/java/sip/communicator/impl/netaddr/NetworkAddressManagerServiceImpl.java index 61b69b9..3eaf10b 100644 --- a/src/net/java/sip/communicator/impl/netaddr/NetworkAddressManagerServiceImpl.java +++ b/src/net/java/sip/communicator/impl/netaddr/NetworkAddressManagerServiceImpl.java @@ -9,9 +9,9 @@ package net.java.sip.communicator.impl.netaddr; import java.io.*; import java.net.*; import java.util.*; +import java.beans.*; import net.java.sip.communicator.service.configuration.*; -import net.java.sip.communicator.service.configuration.event.*; import net.java.sip.communicator.service.netaddr.*; import net.java.sip.communicator.util.*; import net.java.stun4j.*; diff --git a/src/net/java/sip/communicator/impl/protocol/sip/CallPeerMediaHandler.java b/src/net/java/sip/communicator/impl/protocol/sip/CallPeerMediaHandler.java index 266e5c8..676c54f 100644 --- a/src/net/java/sip/communicator/impl/protocol/sip/CallPeerMediaHandler.java +++ b/src/net/java/sip/communicator/impl/protocol/sip/CallPeerMediaHandler.java @@ -9,6 +9,7 @@ package net.java.sip.communicator.impl.protocol.sip; import java.awt.Component; import java.net.*; import java.util.*; +import java.beans.*; import java.awt.Dimension; /* disambiguates java.awt.List and java.util.List */ diff --git a/src/net/java/sip/communicator/impl/protocol/sip/CallPeerSipImpl.java b/src/net/java/sip/communicator/impl/protocol/sip/CallPeerSipImpl.java index c9cc903..41eac43 100644 --- a/src/net/java/sip/communicator/impl/protocol/sip/CallPeerSipImpl.java +++ b/src/net/java/sip/communicator/impl/protocol/sip/CallPeerSipImpl.java @@ -9,6 +9,7 @@ package net.java.sip.communicator.impl.protocol.sip; import java.net.*; import java.text.*; import java.util.*; +import java.beans.*; import javax.sip.*; import javax.sip.address.*; diff --git a/src/net/java/sip/communicator/impl/protocol/sip/CallSipImpl.java b/src/net/java/sip/communicator/impl/protocol/sip/CallSipImpl.java index 9079df2..933ea4f 100644 --- a/src/net/java/sip/communicator/impl/protocol/sip/CallSipImpl.java +++ b/src/net/java/sip/communicator/impl/protocol/sip/CallSipImpl.java @@ -7,6 +7,7 @@ package net.java.sip.communicator.impl.protocol.sip; import java.util.*; +import java.beans.*; import javax.sip.*; import javax.sip.address.*; diff --git a/src/net/java/sip/communicator/impl/protocol/sip/OperationSetTelephonyConferencingSipImpl.java b/src/net/java/sip/communicator/impl/protocol/sip/OperationSetTelephonyConferencingSipImpl.java index 31159fa..a560c95 100644 --- a/src/net/java/sip/communicator/impl/protocol/sip/OperationSetTelephonyConferencingSipImpl.java +++ b/src/net/java/sip/communicator/impl/protocol/sip/OperationSetTelephonyConferencingSipImpl.java @@ -9,6 +9,7 @@ package net.java.sip.communicator.impl.protocol.sip; import java.io.*; import java.text.*; import java.util.*; +import java.beans.*; import javax.sip.*; import javax.sip.address.*; diff --git a/src/net/java/sip/communicator/impl/protocol/sip/OperationSetVideoTelephonySipImpl.java b/src/net/java/sip/communicator/impl/protocol/sip/OperationSetVideoTelephonySipImpl.java index 7ab40d2..e50874c 100644 --- a/src/net/java/sip/communicator/impl/protocol/sip/OperationSetVideoTelephonySipImpl.java +++ b/src/net/java/sip/communicator/impl/protocol/sip/OperationSetVideoTelephonySipImpl.java @@ -7,10 +7,10 @@ package net.java.sip.communicator.impl.protocol.sip; import java.awt.*; +import java.beans.*; import net.java.sip.communicator.service.protocol.*; import net.java.sip.communicator.service.protocol.event.*; -import net.java.sip.communicator.util.*; /** * Implements <tt>OperationSetVideoTelephony</tt> in order to give access to diff --git a/src/net/java/sip/communicator/service/configuration/PropertyVetoException.java b/src/net/java/sip/communicator/service/configuration/ConfigPropertyVetoExceoption.java index b6bd5d8..fe66815 100644 --- a/src/net/java/sip/communicator/service/configuration/PropertyVetoException.java +++ b/src/net/java/sip/communicator/service/configuration/ConfigPropertyVetoExceoption.java @@ -6,7 +6,7 @@ */ package net.java.sip.communicator.service.configuration; -import net.java.sip.communicator.util.*; +import java.beans.*; /** * A PropertyVetoException is thrown when a proposed change to a @@ -14,7 +14,7 @@ import net.java.sip.communicator.util.*; * * @author Emil Ivov */ -public class PropertyVetoException +public class ConfigPropertyVetoExceoption extends RuntimeException { /** @@ -30,7 +30,7 @@ public class PropertyVetoException * @param message Descriptive message * @param evt A PropertyChangeEvent describing the vetoed change. */ - public PropertyVetoException(String message, PropertyChangeEvent evt) + public ConfigPropertyVetoExceoption(String message, PropertyChangeEvent evt) { super(message); diff --git a/src/net/java/sip/communicator/service/configuration/ConfigurationService.java b/src/net/java/sip/communicator/service/configuration/ConfigurationService.java index d7eddc6..0912675 100644 --- a/src/net/java/sip/communicator/service/configuration/ConfigurationService.java +++ b/src/net/java/sip/communicator/service/configuration/ConfigurationService.java @@ -8,9 +8,8 @@ package net.java.sip.communicator.service.configuration; import java.io.*; import java.util.*; +import java.beans.*; -import net.java.sip.communicator.service.configuration.event.*; -import net.java.sip.communicator.util.*; import net.java.sip.communicator.util.xml.*; /** @@ -55,11 +54,11 @@ public interface ConfigurationService * <p> * @param propertyName the name of the property to change. * @param property the new value of the specified property. - * @throws PropertyVetoException in case the changed has been refused by + * @throws ConfigPropertyVetoExceoption in case the changed has been refused by * at least one propertychange listener. */ - public void setProperty(String propertyName, Object property) - throws PropertyVetoException; + public void setProperty(String propertyName, Object property); + // throws PropertyVetoException; /** * Sets the property with the specified name to the specified. Calling @@ -75,13 +74,13 @@ public interface ConfigurationService * @param isSystem specifies whether or not the property being is a System * property and should be resolved against the system * property set - * @throws PropertyVetoException in case the changed has been refused by + * @throws ConfigPropertyVetoExceoption in case the changed has been refused by * at least one propertychange listener. */ public void setProperty(String propertyName, Object property, - boolean isSystem) - throws PropertyVetoException; + boolean isSystem); + // throws PropertyVetoException; /** * Sets a set of specific properties to specific values as a batch operation @@ -98,13 +97,13 @@ public interface ConfigurationService * @param properties * a <code>Map</code> of property names to their new values to be * set - * @throws PropertyVetoException + * @throws ConfigPropertyVetoExceoption * if a change in at least one of the properties has been * refused by at least one of the * <code>VetoableChangeListener</code>s */ - public void setProperties(Map<String, Object> properties) - throws PropertyVetoException; + public void setProperties(Map<String, Object> properties); + // throws PropertyVetoException; /** * Returns the value of the property with the specified name or null if no @@ -123,11 +122,11 @@ public interface ConfigurationService * All properties with prefix propertyName will also be removed. * <p> * @param propertyName the name of the property to change. - * @throws PropertyVetoException in case the changed has been refused by + * @throws ConfigPropertyVetoExceoption in case the changed has been refused by * at least one propertychange listener. */ - public void removeProperty(String propertyName) - throws PropertyVetoException; + public void removeProperty(String propertyName); + // throws PropertyVetoException; /** * Returns a <tt>java.util.List</tt> of <tt>String</tt>s containing the diff --git a/src/net/java/sip/communicator/service/configuration/event/VetoableChangeListener.java b/src/net/java/sip/communicator/service/configuration/event/VetoableChangeListener.java deleted file mode 100644 index 3c52135..0000000 --- a/src/net/java/sip/communicator/service/configuration/event/VetoableChangeListener.java +++ /dev/null @@ -1,46 +0,0 @@ -/* - * SIP Communicator, the OpenSource Java VoIP and Instant Messaging client. - * - * Distributable under LGPL license. - * See terms of license at gnu.org. - */ -package net.java.sip.communicator.service.configuration.event; - -import java.util.*; - -import net.java.sip.communicator.service.configuration.*; -import net.java.sip.communicator.util.*; - -/** - * A VetoableChange event gets fired whenever a property is about to change. - * One can register a VetoableChangeListener with the ConfigurationService so as - * to be notified in advance of any property updates. The purpose of a - * VetoableChaneListener is that it allows registered instances to veto or in - * other words cancel events by throwing a PropertyVetoException. In case - * none of the registered listeners has thrown an exception, the property is - * changed and a propertyChange event is dispatched to all registered - * PropertyChangeListener-s - * - * @author Emil Ivov - */ -public interface VetoableChangeListener - extends EventListener -{ - - /** - * This method gets called when a constrained property is about to change. - * Note that the method only warns about the change and in case none of - * the interested listeners vetos it (i.e. no PropertyVetoException - * is thrown) the propertyChange method will be called next to indicate - * that the change has taken place. In case you don't want to be notified - * for pending changes over constrained properties you should provide - * an empty implementation of the method. - * - * @param evt a <tt>PropertyChangeEvent</tt> object describing the - * event source and the property that has changed. - * @exception PropertyVetoException if the recipient wishes the property - * change to be rolled back. - */ - void vetoableChange(PropertyChangeEvent evt) - throws PropertyVetoException; -} diff --git a/src/net/java/sip/communicator/service/media/CallSession.java b/src/net/java/sip/communicator/service/media/CallSession.java index 236b785..4ba8db2 100644 --- a/src/net/java/sip/communicator/service/media/CallSession.java +++ b/src/net/java/sip/communicator/service/media/CallSession.java @@ -9,11 +9,11 @@ package net.java.sip.communicator.service.media; import java.awt.*; import java.net.*; import java.text.*; +import java.beans.*; import net.java.sip.communicator.service.media.event.*; import net.java.sip.communicator.service.protocol.*; import net.java.sip.communicator.service.protocol.event.*; -import net.java.sip.communicator.util.*; /** * A CallSession contains parameters associated with a particular Call such as diff --git a/src/net/java/sip/communicator/service/neomedia/AbstractMediaStream.java b/src/net/java/sip/communicator/service/neomedia/AbstractMediaStream.java index f57070e..2bfcfff 100644 --- a/src/net/java/sip/communicator/service/neomedia/AbstractMediaStream.java +++ b/src/net/java/sip/communicator/service/neomedia/AbstractMediaStream.java @@ -6,7 +6,8 @@ */ package net.java.sip.communicator.service.neomedia; -import net.java.sip.communicator.util.*; +import java.beans.*; + /** * Abstract base implementation of <tt>MediaStream</tt> to ease the diff --git a/src/net/java/sip/communicator/service/neomedia/MediaStream.java b/src/net/java/sip/communicator/service/neomedia/MediaStream.java index fb82d91..4046333 100644 --- a/src/net/java/sip/communicator/service/neomedia/MediaStream.java +++ b/src/net/java/sip/communicator/service/neomedia/MediaStream.java @@ -8,10 +8,10 @@ package net.java.sip.communicator.service.neomedia; import java.net.*; import java.util.*; +import java.beans.*; import net.java.sip.communicator.service.neomedia.device.*; import net.java.sip.communicator.service.neomedia.format.*; -import net.java.sip.communicator.util.*; /** * The <tt>MediaStream</tt> class represents a (generally) bidirectional RTP diff --git a/src/net/java/sip/communicator/service/protocol/CallPeer.java b/src/net/java/sip/communicator/service/protocol/CallPeer.java index 48ed3a5..09fe7de 100644 --- a/src/net/java/sip/communicator/service/protocol/CallPeer.java +++ b/src/net/java/sip/communicator/service/protocol/CallPeer.java @@ -7,9 +7,9 @@ package net.java.sip.communicator.service.protocol; import java.net.*; +import java.beans.*; import net.java.sip.communicator.service.protocol.event.*; -import net.java.sip.communicator.util.*; /** * The CallPeer is an interface that represents peers in a call. diff --git a/src/net/java/sip/communicator/service/protocol/ConferenceMember.java b/src/net/java/sip/communicator/service/protocol/ConferenceMember.java index ab4e6cf..0f67a3b 100644 --- a/src/net/java/sip/communicator/service/protocol/ConferenceMember.java +++ b/src/net/java/sip/communicator/service/protocol/ConferenceMember.java @@ -6,7 +6,8 @@ */ package net.java.sip.communicator.service.protocol; -import net.java.sip.communicator.util.*; +import java.beans.*; + /** * Represents a member and its details in a telephony conference managed by a diff --git a/src/net/java/sip/communicator/service/protocol/OperationSetVideoTelephony.java b/src/net/java/sip/communicator/service/protocol/OperationSetVideoTelephony.java index 6c7a444..dec4647 100644 --- a/src/net/java/sip/communicator/service/protocol/OperationSetVideoTelephony.java +++ b/src/net/java/sip/communicator/service/protocol/OperationSetVideoTelephony.java @@ -7,9 +7,9 @@ package net.java.sip.communicator.service.protocol; import java.awt.*; +import java.beans.*; import net.java.sip.communicator.service.protocol.event.*; -import net.java.sip.communicator.util.*; /** * Represents an <tt>OperationSet</tt> giving access to video-specific diff --git a/src/net/java/sip/communicator/util/PropertyChangeEvent.java b/src/net/java/sip/communicator/util/PropertyChangeEvent.java deleted file mode 100644 index 4903209..0000000 --- a/src/net/java/sip/communicator/util/PropertyChangeEvent.java +++ /dev/null @@ -1,111 +0,0 @@ -/* - * SIP Communicator, the OpenSource Java VoIP and Instant Messaging client. - * - * Distributable under LGPL license. - * See terms of license at gnu.org. - */ -package net.java.sip.communicator.util; - -import java.util.*; - -/** - * A "ConfigurationChange" event gets delivered whenever a someone changes a - * configuration property. A ConfigurationEvent object is sent as an argument to - * the ConfigurationChangeListener methods. - * <P> - * Normally ConfigurationChangeEvents are accompanied by the name and the old - * and new values of the changed property. If the new value is a primitive type - * (such as int or boolean) it must be wrapped as the corresponding java.lang.* - * Object type (such as Integer or Boolean). - * <P> - * Null values may be provided for the old and the new values if their true - * values are not known. - * <P> - * An event source may send a null object as the name to indicate that an - * arbitrary set of if its properties have changed. In this case the old and new - * values should also be null. - * <P> - * In the case where the event reflects the change of a constrained property, it - * will first be dispatched to all propertyWillChange methods and only in case - * that none of them has objected (no ChangeVetoException has been thrown) the - * propertyChange method is called. - * - * @author Emil Ivov - */ -public class PropertyChangeEvent - extends EventObject -{ - - /** - * name of the property that changed. May be null, if not known. - * - * @serial - */ - private final String propertyName; - - /** - * New value for property. May be null if not known. - * - * @serial - */ - private final Object newValue; - - /** - * Previous value for property. May be null if not known. - * - * @serial - */ - private final Object oldValue; - - /** - * Constructs a new <tt>PropertyChangeEvent</tt>. - * - * @param source The bean that fired the event. - * @param propertyName The programmatic name of the property that was - * changed. - * @param oldValue The old value of the property. - * @param newValue The new value of the property. - */ - public PropertyChangeEvent(Object source, String propertyName, - Object oldValue, Object newValue) - { - super(source); - - this.propertyName = propertyName; - this.newValue = newValue; - this.oldValue = oldValue; - } - - /** - * Gets the programmatic name of the property that was changed. - * - * @return The programmatic name of the property that was changed. May be - * null if multiple properties have changed. - */ - public String getPropertyName() - { - return propertyName; - } - - /** - * Sets the new value for the property, expressed as an Object. - * - * @return The new value for the property, expressed as an Object. May be - * null if multiple properties have changed. - */ - public Object getNewValue() - { - return newValue; - } - - /** - * Gets the old value for the property, expressed as an Object. - * - * @return The old value for the property, expressed as an Object. May be - * null if multiple properties have changed. - */ - public Object getOldValue() - { - return oldValue; - } -} diff --git a/src/net/java/sip/communicator/util/PropertyChangeListener.java b/src/net/java/sip/communicator/util/PropertyChangeListener.java deleted file mode 100644 index 01e01d4..0000000 --- a/src/net/java/sip/communicator/util/PropertyChangeListener.java +++ /dev/null @@ -1,28 +0,0 @@ -/* - * SIP Communicator, the OpenSource Java VoIP and Instant Messaging client. - * - * Distributable under LGPL license. - * See terms of license at gnu.org. - */ -package net.java.sip.communicator.util; - -import java.util.*; - -/** - * A "ConfigurationChange" event gets fired whenever a configuration property - * changes. Depending on whether the property was constrained or not, the - * propertyChange or vetoableChange methods get called. - * - * @author Emil Ivov - */ -public interface PropertyChangeListener - extends EventListener -{ - /** - * This method gets called when a bound property is changed. - * - * @param evt A PropertyChangeEvent object describing the event source and - * the property that has changed. - */ - void propertyChange(PropertyChangeEvent evt); -} diff --git a/src/net/java/sip/communicator/util/PropertyChangeNotifier.java b/src/net/java/sip/communicator/util/PropertyChangeNotifier.java index 31f0876..29927c3 100644 --- a/src/net/java/sip/communicator/util/PropertyChangeNotifier.java +++ b/src/net/java/sip/communicator/util/PropertyChangeNotifier.java @@ -7,6 +7,7 @@ package net.java.sip.communicator.util;
import java.util.*;
+import java.beans.*;
/**
* Represents a source of <tt>PropertyChangeEvent</tt>s which notifies
diff --git a/src/net/java/sip/communicator/util/PropertyChangeSupport.java b/src/net/java/sip/communicator/util/PropertyChangeSupport.java deleted file mode 100644 index ee46bfd..0000000 --- a/src/net/java/sip/communicator/util/PropertyChangeSupport.java +++ /dev/null @@ -1,93 +0,0 @@ -/*
- * SIP Communicator, the OpenSource Java VoIP and Instant Messaging client.
- *
- * Distributable under LGPL license.
- * See terms of license at gnu.org.
- */
-package net.java.sip.communicator.util;
-
-/**
- * Represents a mechanism to easily add to a specific <tt>Object</tt> by means
- * of composition support for firing <tt>PropertyChangeEvent</tt>s to
- * <tt>PropertyChangeListener</tt>s.
- *
- * @author Lubomir Marinov
- */
-public class PropertyChangeSupport
- extends PropertyChangeNotifier
-{
-
- /**
- * The <tt>Object</tt> to be reported as the source of the
- * <tt>PropertyChangeEvent</tt>s fired by this instance.
- */
- private final Object source;
-
- /**
- * Initializes a new <tt>PropertyChangeSupport</tt> which is to fire
- * <tt>PropertyChangeEvent</tt>s and to report their source as a specific
- * <tt>Object</tt>
- *
- * @param source the <tt>Object</tt> to be reported as the source of the
- * <tt>PropertyChangeEvent</tt>s fired by the new instance
- */
- public PropertyChangeSupport(Object source)
- {
- this.source = source;
- }
-
- /**
- * Fires a new <tt>PropertyChangeEvent</tt> to the
- * <tt>PropertyChangeListener</tt>s registered with this
- * <tt>PropertyChangeSupport</tt> in order to notify about a change in the
- * value of a specific property which had its old value modified to a
- * specific new value.
- *
- * @param property the name of the property of this
- * <tt>PropertyChangeSupport</tt> which had its value changed
- * @param oldValue the value of the property with the specified name before
- * the change
- * @param newValue the value of the property with the specified name after
- * the change
- * @see PropertyChangeNotifier#firePropertyChange(String, Object, Object)
- */
- @Override
- public void firePropertyChange(
- String property,
- Object oldValue,
- Object newValue)
- {
- super.firePropertyChange(property, oldValue, newValue);
- }
-
- /**
- * Gets the <tt>Object</tt> to be reported as the source of a new
- * <tt>PropertyChangeEvent</tt> which is to notify the
- * <tt>PropertyChangeListener</tt>s registered with this
- * <tt>PropertyChangeSupport</tt> about the change in the value of a
- * property with a specific name from a specific old value to a specific new
- * value.
- *
- * @param property the name of the property which had its value changed from
- * the specified old value to the specified new value
- * @param oldValue the value of the property with the specified name before
- * the change
- * @param newValue the value of the property with the specified name after
- * the change
- * @return the <tt>Object</tt> to be reported as the source of the new
- * <tt>PropertyChangeEvent</tt> which is to notify the
- * <tt>PropertyChangeListener</tt>s registered with this
- * <tt>PropertyChangeSupport</tt> about the change in the value of the
- * property with the specified name from the specified old value to the
- * specified new value
- * @see PropertyChangeNotifier#getPropertyChangeSource(String, Object, Object)
- */
- @Override
- protected Object getPropertyChangeSource(
- String property,
- Object oldValue,
- Object newValue)
- {
- return source;
- }
-}
diff --git a/src/net/java/sip/communicator/util/swing/SIPCommDialog.java b/src/net/java/sip/communicator/util/swing/SIPCommDialog.java index 8a7817a..6227ef2 100644 --- a/src/net/java/sip/communicator/util/swing/SIPCommDialog.java +++ b/src/net/java/sip/communicator/util/swing/SIPCommDialog.java @@ -205,7 +205,7 @@ public abstract class SIPCommDialog { SIPCommFrame.saveSizeAndLocation(this); } - catch (PropertyVetoException e1) + catch (ConfigPropertyVetoExceoption e1) { logger.error("The proposed property change " + "represents an unacceptable value"); diff --git a/src/net/java/sip/communicator/util/swing/SIPCommFrame.java b/src/net/java/sip/communicator/util/swing/SIPCommFrame.java index e2741f3..3a7c856 100644 --- a/src/net/java/sip/communicator/util/swing/SIPCommFrame.java +++ b/src/net/java/sip/communicator/util/swing/SIPCommFrame.java @@ -11,7 +11,7 @@ import java.awt.event.*; import java.awt.image.*; import java.net.*; import java.util.*; - +import java.beans.*; import javax.swing.*; import net.java.sip.communicator.service.configuration.*; @@ -192,7 +192,7 @@ public abstract class SIPCommFrame { saveSizeAndLocation(this); } - catch (PropertyVetoException e) + catch (ConfigPropertyVetoExceoption e) { logger .error( @@ -212,7 +212,7 @@ public abstract class SIPCommFrame * <tt>PropertyVetoListener</tt>s. */ static void saveSizeAndLocation(Component component) - throws PropertyVetoException + throws ConfigPropertyVetoExceoption { Map<String, Object> props = new HashMap<String, Object>(); String className |