Revision 5610 trunk/applications/appgvSIG/src/com/iver/cit/gvsig/gui/preferences/IPreference.java

View differences:

IPreference.java
40 40
 */
41 41
package com.iver.cit.gvsig.gui.preferences;
42 42

  
43
import javax.swing.ImageIcon;
43 44
import javax.swing.JPanel;
44

  
45
/**
46
 * Interface that any entry in the application's preferences dialog must implement.
47
 * In addition to this interface, an abstract class is supplied to ease the addition
48
 * of new pages
49
 * @see com.iver.cit.gvsig.gui.preferences.AbstractPreferencePage
50
 * 
51
 * @author jaume dominguez faus - jaume.dominguez@iver.es
52
 *
53
 */
45 54
public interface IPreference {
46 55
	
56
	/**
57
	 * Returns an identifier for this preferences page that is used to reference
58
	 * it inside the Map.
59
	 * @return String, you'd typically use any kind of <code>this.getClass().getName();</code>
60
	 */
47 61
	String getID();
62
	
63
	/**
64
	 * Returns an string containing the title of the preferences page. This string
65
	 * will be shown whether in the tree entry or in the page header.
66
	 * @return String, the title of the page
67
	 */
48 68
	String getTitle();
69
	
70
	/**
71
	 * The page must be contained in a JPanel and whatever to be shown will be returned
72
	 * by this function.<br>
73
	 * <p>
74
	 * The content is added, removed and repainted automatically upon the events received from
75
	 * the mouse. So, you only have to care about the content and the functionality to make it
76
	 * <br>
77
	 * </p>
78
	 * having sense.
79
	 * @return JPanel holding the contents to be shown in the page.
80
	 */
49 81
	JPanel getPanel();
82
	
83
	/**
84
	 * Returns the ID of the parent of this layer. If this method returns null, which means
85
	 * that this preferences page has no parent, this is new entry in the preferences
86
	 * tree, otherwise this preferences page will be hanging on the page with the ID
87
	 * returned by this.
88
	 * @return 
89
	 */
50 90
	String getParentID();
91
	
92
	/**
93
	 * Initializes the components of this preferences page to the last settings.
94
	 */
51 95
	void initializeValues();
96
	
97
	/**
98
	 * Saves the new settings
99
	 */
52 100
	void storeValues();
101
	
102
	/**
103
	 * Restores the default values of this preferences page's settings.
104
	 */
53 105
	void initializeDefaults();
54 106
	
107
	/**
108
	 * Returns the image that will be shown in the header of this preferences page
109
	 * @return
110
	 */
111
	ImageIcon getIcon();
55 112

  
56 113
}
57 114

  

Also available in: Unified diff