KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > apache > ojb > tools > mapping > reversedb2 > propertyEditors > PropertyEditorTarget


1 package org.apache.ojb.tools.mapping.reversedb2.propertyEditors;
2 /* Copyright 2002-2005 The Apache Software Foundation
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  * http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  */

16
17 import java.beans.PropertyChangeListener JavaDoc;
18
19
20 /**
21  * This interface specifies that the class has editable properties for a
22  * property editor. The typical application for this is a tree where you
23  * can select objects and edit settings in another panel.
24  *
25  * The properties of the target are exposed by getAttribute() and setAttribute().
26  * If you want to monitor a property for changes, you can register a PropertyChangeListener
27  * either for all properties or a specific one.
28  *
29  * @author <a HREF="mailto:bfl@florianbruckner.com">Florian Bruckner</a>
30  * @version $Id: PropertyEditorTarget.java,v 1.1.2.1 2005/12/21 22:33:27 tomdz Exp $
31  */

32 public interface PropertyEditorTarget
33 {
34     /**
35      * Return the property editor class for this PropertyEditorTarget. Depending
36      * on the GUI implementation this could for example be an extension of
37      * JPanel. The Property editor is responsible for the layout, so the property
38      * editor has to know which properties this target has.
39      */

40     public Class JavaDoc getPropertyEditorClass();
41     
42     /**
43      * Returns a property
44      */

45     public Object JavaDoc getAttribute(String JavaDoc key);
46     
47     /**
48      * Stores a property
49      */

50     public void setAttribute(String JavaDoc key, Object JavaDoc value);
51     
52     public void addPropertyChangeListener (PropertyChangeListener JavaDoc listener);
53     
54     public void addPropertyChangeListener (String JavaDoc propertyName, PropertyChangeListener JavaDoc listener);
55     
56     public void removePropertyChangeListener (PropertyChangeListener JavaDoc listener);
57     
58     public void removePropertyChangeListener (String JavaDoc propertyName, PropertyChangeListener JavaDoc listener);
59 }
60
Popular Tags