View Javadoc

1   /***
2    * <)))<
3    *
4    */
5   package net.sf.echobinding.model;
6   
7   import java.beans.PropertyChangeListener;
8   
9   import nextapp.echo2.app.event.ActionListener;
10  
11  /***
12   *
13   */
14  public interface ComponentModel {
15  
16  	/***
17  	 * Determines the enabled state of this <code>Component</code>.
18  	 * Disabled<code>Component</code>s are not eligible to receive user input.
19  	 * The application container may render disabled components with an altered
20  	 * appearance. 
21  	 * 
22  	 * @return true if the component is enabled
23  	 * @see #verifyInput(java.lang.String, java.lang.Object)
24  	 */
25  	boolean isEnabled();
26  
27  	/***
28  	 * Returns the visibility state of this <code>Component</code>.
29  	 * Non-visible components will not be seen by the rendering application
30  	 * container, and will not be rendered in any fashion on the user 
31  	 * interface.  Rendering Application Containers should ensure that no 
32  	 * information about the state of an invisible component is provided to 
33  	 * the user interface for security purposes. 
34  	 *
35  	 * @return the visibility state of this <code>Component</code>
36  	 */
37  	boolean isVisible();
38  
39  	/***
40  	 * Sets the enabled state of the <code>Component</code>.
41  	 * 
42  	 * @param newValue the new state
43  	 * @see #isEnabled
44  	 */
45  	void setEnabled(boolean newValue);
46  
47  	/***
48  	 * Sets the visibility state of this <code>Component</code>.
49  	 * 
50  	 * @param newValue the new visibility state
51  	 * @see #isVisible()
52  	 */
53  	void setVisible(boolean newValue);
54  
55  
56  	/***
57  	 * Adds a <code>PropertyChangeListener</code> to the set of listeners.
58  	 * @param listener
59  	 */
60  	void addPropertyChangeListener(PropertyChangeListener listener);
61  
62  
63  	/***
64  	 * Adds a ActionListener to the set of ActionListeners.
65  	 * 
66  	 * @param listener
67  	 */
68  	void addActionListener(ActionListener listener);
69  }