View Javadoc

1   /*
2    * Copyright (c) 2003-2008 by Cosylab d. d.
3    *
4    * This file is part of CosyBeans.
5    *
6    * CosyBeans is free software: you can redistribute it and/or modify
7    * it under the terms of the GNU General Public License as published by
8    * the Free Software Foundation, either version 3 of the License, or
9    * (at your option) any later version.
10   *
11   * CosyBeans is distributed in the hope that it will be useful,
12   * but WITHOUT ANY WARRANTY; without even the implied warranty of
13   * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14   * GNU General Public License for more details.
15   *
16   * You should have received a copy of the GNU General Public License
17   * along with CosyBeans.  If not, see <http://www.gnu.org/licenses/>.
18   */
19  
20  package com.cosylab.gui.displayers;
21  
22  import java.beans.PropertyChangeListener;
23  
24  
25  /**
26   * <code>DataStateProvider</code> interface marks those components, which can
27   * provide <code>DataState</code> Java property to describe theier data
28   * quality state.
29   *
30   * @author <a href="mailto:igor.kriznar@cosylab.com">Igor Kriznar</a>
31   *
32   * @see com.cosylab.gui.displayers.DataState
33   */
34  public interface DataStateProvider
35  {
36  	/** Property name for data state. */
37  	public String DATA_STATE = "dataState";
38  
39  	/**
40  	 * Adds property change listener, which receives notifications when data
41  	 * state changes.
42  	 *
43  	 * @param l new listener
44  	 */
45  	public void addPropertyChangeListener(PropertyChangeListener l);
46  
47  	/**
48  	 * Adds property change listener, which receives notifications when data
49  	 * state changes.
50  	 *
51  	 * @param propertyName the property name for which events will be received
52  	 * @param l new listener
53  	 */
54  	public void addPropertyChangeListener(String propertyName,
55  	    PropertyChangeListener l);
56  
57  	/**
58  	 * Returns data quality state. This property is changed by data consumer
59  	 * interface. In case of multiple displayer, this state indicates integral
60  	 * state for all contained data consumers.
61  	 *
62  	 * @return dynamic data quality state
63  	 */
64  	public DataState getDataState();
65  
66  	/**
67  	 * Removes property change listener.
68  	 *
69  	 * @param l removed listener
70  	 */
71  	public void removePropertyChangeListener(PropertyChangeListener l);
72  
73  	/**
74  	 * Removes property change listener.
75  	 *
76  	 * @param propertyName the property name for which listener is removed
77  	 * @param l removed listener
78  	 */
79  	public void removePropertyChangeListener(String propertyName,
80  	    PropertyChangeListener l);
81  }
82  
83  /* __oOo__ */