001: /*
002: * The contents of this file are subject to the terms of the Common Development
003: * and Distribution License (the License). You may not use this file except in
004: * compliance with the License.
005: *
006: * You can obtain a copy of the License at http://www.netbeans.org/cddl.html
007: * or http://www.netbeans.org/cddl.txt.
008: *
009: * When distributing Covered Code, include this CDDL Header Notice in each file
010: * and include the License file at http://www.netbeans.org/cddl.txt.
011: * If applicable, add the following below the CDDL Header, with the fields
012: * enclosed by brackets [] replaced by your own identifying information:
013: * "Portions Copyrighted [year] [name of copyright owner]"
014: *
015: * The Original Software is NetBeans. The Initial Developer of the Original
016: * Software is Sun Microsystems, Inc. Portions Copyright 1997-2007 Sun
017: * Microsystems, Inc. All Rights Reserved.
018: */
019:
020: package org.netbeans.modules.soa.mapper.common.ui.palette;
021:
022: import java.beans.PropertyChangeListener;
023:
024: /**
025: * PaletteManager interface class for accessing Palette dialog, categories,
026: * and functoid items.
027: *
028: * @author Tientien Li
029: */
030: public interface IPaletteManager {
031:
032: /** Field PROP_MODE */
033: public static final String PROP_MODE = "Palette_mode";
034:
035: /** Field PROP_SELECTEDITEM */
036: public static final String PROP_SELECTEDITEM = "Palette_selectedItem";
037:
038: /** Field PROP_CHECKEDITEM */
039: public static final String PROP_CHECKEDITEM = "Palette_checkedItem";
040:
041: /** Field PROP_CHECKEDITEM */
042: public static final String PROP_UNCHECKEDITEM = "Palette_uncheckedItem";
043:
044: /** Field PROP_INITIALIZED */
045: public static final String PROP_INITIALIZED = "Palette_initialized";
046:
047: /**
048: * Set the folder of this palette manager going to initialize from.
049: *
050: * @param folderName the folder where the data reading from.
051: */
052: void setFolder(String folderName);
053:
054: /**
055: * Method isInitialized
056: *
057: *
058: * @return true if initialization complete
059: *
060: */
061: boolean isInitialized();
062:
063: /**
064: * get All Categories
065: *
066: *
067: * @return the array of all palette categories
068: *
069: */
070: IPaletteCategory[] getAllCategories();
071:
072: /**
073: * get Selected Category
074: *
075: *
076: * @return the selected category
077: *
078: */
079: IPaletteCategory getSelectedCategory();
080:
081: /**
082: * show Dialog
083: *
084: *
085: */
086: void showDialog();
087:
088: /**
089: * show Dialog with the specific category tab selected
090: *
091: *
092: * @param category the selected category
093: *
094: */
095: void showDialog(IPaletteCategory category);
096:
097: /**
098: * add Property ChangeListener
099: *
100: *
101: * @param l the property change listener
102: *
103: */
104: void addPropertyChangeListener(PropertyChangeListener l);
105:
106: /**
107: * remove Property ChangeListener
108: *
109: *
110: * @param l the property change listener
111: *
112: */
113: void removePropertyChangeListener(PropertyChangeListener l);
114:
115: /**
116: * get Category Items
117: *
118: *
119: * @param category the selected category
120: *
121: * @return the array of category items
122: *
123: */
124: IPaletteItem[] getCategoryItems(IPaletteCategory category);
125:
126: /**
127: * get Selected Item Indices in a category
128: *
129: *
130: * @param category the selected category
131: *
132: * @return the array of selected item indices
133: *
134: */
135: int[] getCategorySelectedItemIndices(IPaletteCategory category);
136:
137: /**
138: * select All items within a category
139: *
140: *
141: * @param category the selected category
142: *
143: */
144: void selectAll(IPaletteCategory category);
145:
146: /**
147: * clear All items within a category
148: *
149: *
150: * @param category the selected category
151: *
152: */
153: void clearAll(IPaletteCategory category);
154:
155: /**
156: * select an Item within a category
157: *
158: *
159: * @param category the selected category
160: * @param item the selected item
161: *
162: */
163: void selectItem(IPaletteCategory category, IPaletteItem item);
164:
165: /**
166: * clear an Item within a category
167: *
168: *
169: * @param category the selected category
170: * @param item the selected item
171: *
172: */
173: void clearItem(IPaletteCategory category, IPaletteItem item);
174:
175: /**
176: * set the current application Frame.
177: *
178: * @param component the application component
179: */
180: void setFrame(java.awt.Component component);
181: }
|