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

View differences:

AbstractPreferencePage.java
49 49
import javax.swing.JLabel;
50 50
import javax.swing.JPanel;
51 51
import javax.swing.border.EmptyBorder;
52

  
52
/**
53
 * The abstract class that any preference page should extend.
54
 * 
55
 * @author jaume dominguez faus - jaume.dominguez
56
 *
57
 */
53 58
public abstract class AbstractPreferencePage extends JPanel implements IPreference{
54 59

  
55 60
	private GridBagLayout gridBag;
56
	private String name;
57

  
61
	
58 62
	/**
59 63
	 * The number of components already added to the layout manager.
60 64
	 */
61 65
	protected int y;
62 66

  
67
	private String title;
68

  
69
	private String parentID;
70

  
63 71
	/**
64 72
	 * Creates a new preference page.
65
	 * @param name The internal name. The option pane's label is set to the
66
	 * value of the property named <code>options.<i>name</i>.label</code>.
67 73
	 */
68
	public AbstractPreferencePage(String name)
74
	public AbstractPreferencePage()
69 75
	{
70
		this.name = name;
71 76
		setLayout(gridBag = new GridBagLayout());
72 77
	} 
73 78
	
74
	public void performOK()
75
	{
76
		
77
	}
78
	public void performDefaults()
79
	{
80
		
81
	}
82
	
83 79
	/**
84 80
	 * Adds a labeled component to the option pane. Components are
85 81
	 * added in a vertical fashion, one per row. The label is
......
181 177
	 * added in a vertical fashion, one per row.
182 178
	 * @param comp The component
183 179
	 * @param fill Fill parameter to GridBagConstraints
184
	 * @since jEdit 4.2pre2
185 180
	 */
186 181
	public void addComponent(Component comp, int fill)
187 182
	{
......
227 222
	}
228 223
	
229 224
	/**
230
	 *@return a label which has the same tooltiptext as the Component
225
	 *	@return a label which has the same tooltiptext as the Component
231 226
	 *    that it is a label for. This is used to create labels from inside
232
	 *    AbstractOptionPane.
233
	 *    @since jEdit 4.3pre4
227
	 *    AbstractPreferencePage.
234 228
	 */
235 229
	public JLabel newLabel(String label, Component comp) 
236 230
	{
......
249 243
		}
250 244
		return retval;
251 245
	}
246
	
247
	public final void setParentID(String parentID) {
248
		this.parentID = parentID;
249
	}
252 250

  
253
	public abstract String getID();
254

  
255
	public abstract String getTitle();
256

  
257
	public abstract JPanel getPanel();
258

  
259
	public abstract String getParentID();
260

  
261
	public abstract void initializeValues();
262

  
263
	public abstract void storeValues();
264

  
265
	public abstract void initializeDefaults() ;
251
	public final void setTitle(String title) {
252
		this.title = title;
253
	}
254
	
255
	public String toString()
256
	{
257
		return title;
258
	}
266 259
}

Also available in: Unified diff