KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > genimen > djeneric > tools > specifier > interfaces > DjenericEditorEnvironment


1 /* Copyright (c) 2001-2005 by Genimen BV (www.genimen.com) All rights reserved.
2  *
3  * Redistribution and use in source and binary forms, with or without modification, is permitted
4  * provided that the following conditions are met:
5  * - Redistributions of source code must retain the above copyright notice, this list of conditions
6  * and the following disclaimer.
7  * - Redistributions in binary form must reproduce the above copyright notice, this list of
8  * conditions and the following disclaimer in the documentation and/or other materials
9  * provided with the distribution.
10  * - All advertising materials mentioning features or use of this software must display the
11  * following acknowledgment: "This product includes Djeneric."
12  * - Products derived from this software may not be called "Djeneric" nor may
13  * "Djeneric" appear in their names without prior written permission of Genimen BV.
14  * - Redistributions of any form whatsoever must retain the following acknowledgment: "This
15  * product includes Djeneric."
16  *
17  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDER AND CONTRIBUTORS "AS IS"
18  * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
19  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
20  * ARE DISCLAIMED. IN NO EVENT SHALL GENIMEN BV, DJENERIC.ORG,
21  * OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
22  * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
23  * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
24  * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
25  * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
26  * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
27  * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
28  */

29
30 package com.genimen.djeneric.tools.specifier.interfaces;
31
32 import java.awt.Component JavaDoc;
33
34 import javax.swing.ImageIcon JavaDoc;
35
36 import com.genimen.djeneric.repository.DjObject;
37 import com.genimen.djeneric.repository.exceptions.DjenericException;
38 import com.genimen.djeneric.repository.exceptions.ObjectNotDefinedException;
39 import com.genimen.djeneric.util.DjProperties;
40 import com.genimen.djeneric.util.DjStatusDisplayer;
41
42 public interface DjenericEditorEnvironment extends DjStatusDisplayer, SpecifierPanelContainer
43 {
44   /**
45    * Returns the editor (if currently open) that is editing the given object.
46    * returns null if no editor is currently editing the object.
47    * @param obj
48    * @return
49    * @throws DjenericException
50    */

51   public ObjectEditor findEditor(DjObject obj) throws DjenericException;
52
53   /**
54    * Refresh the tree in the environment. Call this if there were changes
55    * in the repository (or session) that you want shown instantly in the environment
56    */

57   public void reloadTree() throws DjenericException;
58
59   /**
60    * Adds a tab to the environment
61    * @param panel
62    * @param title
63    * @param imageIcon
64    * @throws DjenericException
65    */

66   public void addTab(SpecifierPanel panel, String JavaDoc title, ImageIcon JavaDoc imageIcon) throws DjenericException;
67
68   /**
69    * Removes a specific panel from the environment (by closing it)
70    * @param panel
71    */

72   public void removeTab(SpecifierPanel panel);
73
74   /**
75    * Closes all tabs of the environment (if allowed by the user)
76    *
77    */

78   public void closeAllTabs();
79
80   /**
81    * returns (persisted) properties that can be used to store and retrieve settings
82    * @return
83    */

84   public DjProperties getProperties();
85
86   /**
87    * returns a Component that can be used as parent for dialogs etc.
88    * (this will normally be the Specifier; but is not guarantied in future implementations)
89    * @return
90    */

91   public Component JavaDoc getBaseComponent();
92
93   /**
94    * Returns the selected objects
95    * @return
96    */

97   public DjObject[] getSelectedObjects() throws DjenericException;
98
99   /**
100    * Returns the selected objects of a specific type
101    * @param typeName
102    * @return
103    * @throws ObjectNotDefinedException
104    */

105   public DjObject[] getSelectedObjects(String JavaDoc typeName) throws DjenericException;
106 }
107
Popular Tags