KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > compiere > swing > CEditor


1 /******************************************************************************
2  * The contents of this file are subject to the Compiere License Version 1.1
3  * ("License"); You may not use this file except in compliance with the License
4  * You may obtain a copy of the License at http://www.compiere.org/license.html
5  * Software distributed under the License is distributed on an "AS IS" basis,
6  * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for
7  * the specific language governing rights and limitations under the License.
8  * The Original Code is Compiere ERP & CRM Business Solution
9  * The Initial Developer of the Original Code is Jorg Janke and ComPiere, Inc.
10  * Portions created by Jorg Janke are Copyright (C) 1999-2001 Jorg Janke, parts
11  * created by ComPiere are Copyright (C) ComPiere, Inc.; All Rights Reserved.
12  * Contributor(s): ______________________________________.
13  *****************************************************************************/

14 package org.compiere.swing;
15
16 /**
17  * Compiere Editor interface
18  *
19  * @author Jorg Janke
20  * @version $Id: CEditor.java,v 1.1 2002/01/12 02:43:56 jjanke Exp $
21  */

22 public interface CEditor
23 {
24     /**
25      * Enable Editor
26      * @param rw true, if you can enter/select data
27      */

28     public void setReadWrite (boolean rw);
29
30     /**
31      * Is it possible to edit
32      * @return true, if editable
33      */

34     public boolean isReadWrite();
35
36     /**
37      * Set Editor Mandatory
38      * @param mandatory true, if you have to enter data
39      */

40     public void setMandatory (boolean mandatory);
41
42     /**
43      * Is Field mandatory
44      * @return true, if mandatory
45      */

46     public boolean isMandatory();
47
48     /**
49      * Set Background based on editable / mandatory / error
50      * @param error if true, set background to error color, otherwise mandatory/editable
51      */

52     public void setBackground (boolean error);
53
54     /**
55      * Set Visible
56      * @param visible true if field is to be shown
57      */

58     public void setVisible (boolean visible);
59
60     /**
61      * Set Editor to value
62      * @param value value of the editor
63      */

64     public void setValue (Object JavaDoc value);
65
66     /**
67      * Return Editor value
68      * @return current value
69      */

70     public Object JavaDoc getValue();
71
72     /**
73      * Return Display Value
74      * @return displayed String value
75      */

76     public String JavaDoc getDisplay();
77
78 } // CEditor
79
Popular Tags