KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > netbeans > modules > dbschema > jdbcimpl > wizard > DBSchemaPanel


1 /*
2  * The contents of this file are subject to the terms of the Common Development
3  * and Distribution License (the License). You may not use this file except in
4  * compliance with the License.
5  *
6  * You can obtain a copy of the License at http://www.netbeans.org/cddl.html
7  * or http://www.netbeans.org/cddl.txt.
8  *
9  * When distributing Covered Code, include this CDDL Header Notice in each file
10  * and include the License file at http://www.netbeans.org/cddl.txt.
11  * If applicable, add the following below the CDDL Header, with the fields
12  * enclosed by brackets [] replaced by your own identifying information:
13  * "Portions Copyrighted [year] [name of copyright owner]"
14  *
15  * The Original Software is NetBeans. The Initial Developer of the Original
16  * Software is Sun Microsystems, Inc. Portions Copyright 1997-2006 Sun
17  * Microsystems, Inc. All Rights Reserved.
18  */

19
20 package org.netbeans.modules.dbschema.jdbcimpl.wizard;
21
22 import java.util.ArrayList JavaDoc;
23 import java.util.ResourceBundle JavaDoc;
24
25 import javax.swing.event.ChangeListener JavaDoc;
26
27 import org.openide.util.HelpCtx;
28 import org.openide.util.NbBundle;
29 import org.openide.WizardDescriptor;
30
31 public abstract class DBSchemaPanel implements WizardDescriptor.Panel {
32
33     ResourceBundle JavaDoc bundle = NbBundle.getBundle("org.netbeans.modules.dbschema.jdbcimpl.resources.Bundle"); //NOI18N
34

35     protected ArrayList JavaDoc list;
36
37     protected DBSchemaWizardData data;
38
39     /** Default preferred width of the panel - should be the same for all panels within one wizard */
40     private static final int DEFAULT_WIDTH = 600;
41     /** Default preferred height of the panel - should be the same for all panels within one wizard */
42     private static final int DEFAULT_HEIGHT = 390;
43
44     public DBSchemaPanel() {
45         list = new ArrayList JavaDoc();
46     }
47
48     /** @return preferred size of the wizard panel - it should be the same for all panels within one Wizard
49     * so that the wizard dialog does not change its size when switching between panels */

50     public java.awt.Dimension JavaDoc getPreferredSize () {
51         return new java.awt.Dimension JavaDoc (DEFAULT_WIDTH, DEFAULT_HEIGHT);
52     }
53
54     public HelpCtx getHelp() {
55         return new HelpCtx("dbschema_ctxhelp_wizard"); //NOI18N
56
}
57
58     public void readSettings (Object JavaDoc settings) {
59     }
60
61     public void storeSettings (Object JavaDoc settings) {
62     }
63     
64     public synchronized void addChangeListener (ChangeListener JavaDoc listener) {
65         list.add(listener);
66     }
67
68     public synchronized void removeChangeListener (ChangeListener JavaDoc listener) {
69         list.remove(listener);
70     }
71 }
72
Popular Tags