KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > netbeans > modules > xml > xam > ui > category > Category


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-2007 Sun
17  * Microsystems, Inc. All Rights Reserved.
18  */

19
20 package org.netbeans.modules.xml.xam.ui.category;
21
22 import java.beans.PropertyChangeListener JavaDoc;
23 import javax.swing.Icon JavaDoc;
24 import org.netbeans.modules.xml.xam.Component;
25 import org.openide.util.Lookup;
26
27 /**
28  * A Category represents a visual component within a XAM model editor.
29  *
30  * @author Nathan Fiedler
31  */

32 public interface Category extends Lookup.Provider {
33
34     /**
35      * Add a PropertyChangeListener to the listener list.
36      *
37      * @param listener property change listener to add.
38      */

39     void addPropertyChangeListener(PropertyChangeListener JavaDoc listener);
40
41     /**
42      * Add a PropertyChangeListener for a specific property.
43      *
44      * @param name name of property to listen to.
45      * @param listener property change listener to add.
46      */

47     void addPropertyChangeListener(String JavaDoc name, PropertyChangeListener JavaDoc listener);
48
49     /**
50      * Invoked when the category component has been made invisible.
51      */

52     void componentHidden();
53
54     /**
55      * Invoked when the category component has been made visible.
56      */

57     void componentShown();
58
59     /**
60      * Returns the user interface component for this category.
61      *
62      * @return the user interface component.
63      */

64     java.awt.Component JavaDoc getComponent();
65
66     /**
67      * Returns the user-oriented description of this category, for use in
68      * tooltips in the usre interface.
69      *
70      * @return the human-readable description of this category.
71      */

72     String JavaDoc getDescription();
73
74     /**
75      * Returns the display icon of this category.
76      *
77      * @return icon for this category.
78      */

79     Icon JavaDoc getIcon();
80
81     /**
82      * Returns the display title of this category.
83      *
84      * @return title for this category.
85      */

86     String JavaDoc getTitle();
87
88     /**
89      * Remove a PropertyChangeListener from the listener list.
90      *
91      * @param listener property change listener to remove.
92      */

93     void removePropertyChangeListener(PropertyChangeListener JavaDoc listener);
94
95     /**
96      * Remove a PropertyChangeListener for a specific property.
97      *
98      * @param name name of property to listen to.
99      * @param listener property change listener to remove.
100      */

101     void removePropertyChangeListener(String JavaDoc name, PropertyChangeListener JavaDoc listener);
102
103     /**
104      * Shows the component in the category interface, expanding trees
105      * and selecting nodes as necessary.
106      *
107      * @param component XAM component to be shown.
108      */

109     void showComponent(Component component);
110 }
111
Popular Tags