KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > netbeans > modules > j2ee > sun > share > configbean > customizers > common > GenericTableDialogPanelAccessor


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  * GenericTableDialogPanelAccessor.java
21  *
22  * Created on January 2, 2004, 2:07 PM
23  */

24
25 package org.netbeans.modules.j2ee.sun.share.configbean.customizers.common;
26
27 import java.util.Collection JavaDoc;
28 import java.util.List JavaDoc;
29
30 import org.netbeans.modules.j2ee.sun.share.configbean.ASDDVersion;
31
32 /** Interface to be implemented by dialog subpanels that are to be used for data
33  * entry into a table managed by the GenericTablePanel/GenericTableModel pair.
34  *
35  * Extend a JPanel that implements this interface to allow editing of complex
36  * fields. (For simple text only input, the existing default panel should be
37  * sufficient.)
38  *
39  * @author Peter Williams
40  */

41 public interface GenericTableDialogPanelAccessor {
42     
43     /** Initialization routine to handle any required building or initialization tasks.
44      *
45      * @param asVersion The appserver version required by the current bean tree
46      * @param preferredWidth The calculated dynamic preferredWidth for the child dialog.
47      * @param entries List of field descriptions
48      * @param data Custom data in a format defined by the implementing class.
49      */

50     public void init(ASDDVersion asVersion, int preferredWidth, List JavaDoc entries, Object JavaDoc data);
51     
52     /** Set the error manager for use by this panel.
53      */

54 // public void setErrorManager(ErrorSupportManager errorMgr);
55

56     /** Pass initial field values.
57      *
58      * @param values The list of initial values for the fields.
59      */

60     public void setValues(Object JavaDoc [] values);
61     
62     /** Retrieve current field values.
63      *
64      * @return List of objects that represent the values entered by the user
65      */

66     public Object JavaDoc [] getValues();
67     
68     /** Retrieve any errors in what the user has currently entered.
69      *
70      * @param validationSupport The validation support object
71      * @return Collection of error messages that tell the user why their current
72      * input isn't acceptable.
73      */

74     public Collection JavaDoc getErrors(ValidationSupport validationSupport);
75     
76     /** Determines if the required fields have appropriate values.
77      *
78      * @return True if the required fields are filled appropriately, false otherwise.
79      */

80     public boolean requiredFieldsFilled();
81 }
82
Popular Tags