Skip to content

Package: JavaBeanSupport

JavaBeanSupport

nameinstructionbranchcomplexitylinemethod
JavaBeanSupport()
M: 15 C: 0
0%
M: 0 C: 0
100%
M: 1 C: 0
0%
M: 3 C: 0
0%
M: 1 C: 0
0%
addPropertyChangeListener(PropertyChangeListener)
M: 5 C: 0
0%
M: 0 C: 0
100%
M: 1 C: 0
0%
M: 2 C: 0
0%
M: 1 C: 0
0%
addPropertyChangeListener(String, PropertyChangeListener)
M: 6 C: 0
0%
M: 0 C: 0
100%
M: 1 C: 0
0%
M: 2 C: 0
0%
M: 1 C: 0
0%
addVetoableChangeListener(String, VetoableChangeListener)
M: 6 C: 0
0%
M: 0 C: 0
100%
M: 1 C: 0
0%
M: 2 C: 0
0%
M: 1 C: 0
0%
addVetoableChangeListener(VetoableChangeListener)
M: 5 C: 0
0%
M: 0 C: 0
100%
M: 1 C: 0
0%
M: 2 C: 0
0%
M: 1 C: 0
0%
getPropertyChangeListeners()
M: 4 C: 0
0%
M: 0 C: 0
100%
M: 1 C: 0
0%
M: 1 C: 0
0%
M: 1 C: 0
0%
getPropertyChangeListeners(String)
M: 5 C: 0
0%
M: 0 C: 0
100%
M: 1 C: 0
0%
M: 1 C: 0
0%
M: 1 C: 0
0%
getVetoableChangeListeners()
M: 4 C: 0
0%
M: 0 C: 0
100%
M: 1 C: 0
0%
M: 1 C: 0
0%
M: 1 C: 0
0%
getVetoableChangeListeners(String)
M: 5 C: 0
0%
M: 0 C: 0
100%
M: 1 C: 0
0%
M: 1 C: 0
0%
M: 1 C: 0
0%
removePropertyChangeListener(PropertyChangeListener)
M: 5 C: 0
0%
M: 0 C: 0
100%
M: 1 C: 0
0%
M: 2 C: 0
0%
M: 1 C: 0
0%
removePropertyChangeListener(String, PropertyChangeListener)
M: 6 C: 0
0%
M: 0 C: 0
100%
M: 1 C: 0
0%
M: 2 C: 0
0%
M: 1 C: 0
0%
removeVetoableChangeListener(String, VetoableChangeListener)
M: 6 C: 0
0%
M: 0 C: 0
100%
M: 1 C: 0
0%
M: 2 C: 0
0%
M: 1 C: 0
0%
removeVetoableChangeListener(VetoableChangeListener)
M: 5 C: 0
0%
M: 0 C: 0
100%
M: 1 C: 0
0%
M: 2 C: 0
0%
M: 1 C: 0
0%

Coverage

1: /*
2: * *********************************************************************************************************************
3: *
4: * Mistral: open source imaging engine
5: * http://tidalwave.it/projects/mistral
6: *
7: * Copyright (C) 2003 - 2023 by Tidalwave s.a.s. (http://tidalwave.it)
8: *
9: * *********************************************************************************************************************
10: *
11: * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with
12: * the License. You may obtain a copy of the License at
13: *
14: * http://www.apache.org/licenses/LICENSE-2.0
15: *
16: * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on
17: * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the
18: * specific language governing permissions and limitations under the License.
19: *
20: * *********************************************************************************************************************
21: *
22: * git clone https://bitbucket.org/tidalwave/mistral-src
23: * git clone https://github.com/tidalwave-it/mistral-src
24: *
25: * *********************************************************************************************************************
26: */
27: package it.tidalwave.image.metadata;
28:
29: import java.beans.PropertyChangeListener;
30: import java.beans.PropertyChangeSupport;
31: import java.beans.VetoableChangeListener;
32: import java.beans.VetoableChangeSupport;
33:
34: /***********************************************************************************************************************
35: *
36: * Code adapted from AbstractBean by SwingLabs.
37: *
38: * @author Fabrizio Giudici
39: *
40: **********************************************************************************************************************/
41: public abstract class JavaBeanSupport
42: {
43: protected final PropertyChangeSupport pcs = new PropertyChangeSupport(this);
44: protected final VetoableChangeSupport vetoableChangeSupport = new VetoableChangeSupport(this);
45:
46: public final void addPropertyChangeListener (final PropertyChangeListener listener)
47: {
48: pcs.addPropertyChangeListener(listener);
49: }
50:
51: public final void removePropertyChangeListener (final PropertyChangeListener listener)
52: {
53: pcs.removePropertyChangeListener(listener);
54: }
55:
56: public final PropertyChangeListener[] getPropertyChangeListeners()
57: {
58: return pcs.getPropertyChangeListeners();
59: }
60:
61: public final void addPropertyChangeListener (final String propertyName, final PropertyChangeListener listener)
62: {
63: pcs.addPropertyChangeListener(propertyName, listener);
64: }
65:
66: public final void removePropertyChangeListener (final String propertyName, final PropertyChangeListener listener)
67: {
68: pcs.removePropertyChangeListener(propertyName, listener);
69: }
70:
71: public final PropertyChangeListener[] getPropertyChangeListeners (final String propertyName)
72: {
73: return pcs.getPropertyChangeListeners(propertyName);
74: }
75:
76: public final void addVetoableChangeListener (final VetoableChangeListener listener)
77: {
78: vetoableChangeSupport.addVetoableChangeListener(listener);
79: }
80:
81: public final void removeVetoableChangeListener (final VetoableChangeListener listener)
82: {
83: vetoableChangeSupport.removeVetoableChangeListener(listener);
84: }
85:
86: public final VetoableChangeListener[] getVetoableChangeListeners()
87: {
88: return vetoableChangeSupport.getVetoableChangeListeners();
89: }
90:
91: public final void addVetoableChangeListener (final String propertyName, final VetoableChangeListener listener)
92: {
93: vetoableChangeSupport.addVetoableChangeListener(propertyName, listener);
94: }
95:
96: public final void removeVetoableChangeListener (final String propertyName, final VetoableChangeListener listener)
97: {
98: vetoableChangeSupport.removeVetoableChangeListener(propertyName, listener);
99: }
100:
101: public final VetoableChangeListener[] getVetoableChangeListeners (final String propertyName)
102: {
103: return vetoableChangeSupport.getVetoableChangeListeners(propertyName);
104: }
105: }