KickJava   Java API By Example, From Geeks To Geeks.

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


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

30 package com.genimen.djeneric.tools.specifier.interfaces;
31
32 import java.awt.Component JavaDoc;
33
34 import com.genimen.djeneric.repository.DjAssociation;
35 import com.genimen.djeneric.repository.DjExtent;
36 import com.genimen.djeneric.repository.DjList;
37 import com.genimen.djeneric.repository.DjObject;
38 import com.genimen.djeneric.repository.DjSession;
39 import com.genimen.djeneric.repository.DjSynchronizationListener;
40 import com.genimen.djeneric.repository.exceptions.DjenericException;
41 import com.genimen.djeneric.repository.exceptions.ObjectNotDefinedException;
42 import com.genimen.djeneric.structure.ExtentUsage;
43 import com.genimen.djeneric.structure.PropertyUsage;
44 import com.genimen.djeneric.structure.RelationUsage;
45 import com.genimen.djeneric.tools.specifier.components.DjBindable;
46 import com.genimen.djeneric.tools.specifier.editor.DjenericObjectModel;
47
48 /**
49  * Description of the Interface
50  *
51  *@author Wido Riezebos
52  *@created November 5, 2001
53  */

54 public interface ObjectViewer extends DjSynchronizationListener
55 {
56   public void addDetailViewer(ObjectViewer detail, RelationUsage via);
57
58   public boolean isDetail();
59
60   public void synchronize() throws DjenericException;
61
62   public void synchronizeUnderlyingAssociation() throws DjenericException;
63
64   public void setViewerFor(DjList data, DjAssociation assoc) throws DjenericException;
65
66   public void setEnabled(boolean b);
67
68   public boolean isEnabled();
69
70   public void clear() throws DjenericException;
71
72   public void addModelListener(ObjectModelListener lsnr);
73
74   public void addViewerListener(ObjectViewerListener lsnr);
75
76   public void removeModelListener(ObjectModelListener lsnr);
77
78   public void requestFocus();
79
80   public DjenericObjectModel getModel();
81
82   public void setStatusMessage(String JavaDoc msg);
83
84   public void setStatusMessage(Throwable JavaDoc t);
85
86   public void setStatusMessage(String JavaDoc msg, boolean isInformative);
87
88   public boolean isEditable();
89
90   public void setEditable(boolean b);
91
92   public boolean isDeleteable();
93
94   public void setDeleteable(boolean b);
95
96   public boolean isInserteable();
97
98   public void setInserteable(boolean b);
99
100   public void markForDelete() throws DjenericException;
101
102   public void tellRowPosition();
103
104   public DjObject getSelectedValue();
105
106   public int getSelectedIndex();
107
108   public void setSelectedIndex(int idx) throws DjenericException;
109
110   public boolean isNew();
111
112   public void createNew() throws DjenericException;
113
114   public String JavaDoc getString(int cellIdx) throws DjenericException;
115
116   public void setString(int cellIdx, String JavaDoc value) throws DjenericException;
117
118   public Object JavaDoc getValue(int cellIdx) throws DjenericException;
119
120   public void setValue(int cellIdx, Object JavaDoc value) throws DjenericException;
121
122   public int getRowCount();
123
124   public DjExtent getExtent();
125
126   public ExtentUsage getExtentUsage();
127
128   public void next() throws DjenericException;
129
130   public void prev() throws DjenericException;
131
132   public void top() throws DjenericException;
133
134   public void bottom() throws DjenericException;
135
136   public boolean isCellUpdateable(int cellIdx);
137
138   public boolean isCellRequired(int cellIdx);
139
140   public int getCellIndex(String JavaDoc propertyName) throws ObjectNotDefinedException;
141
142   public int getPropertyUsageCount();
143
144   public PropertyUsage getPropertyUsage(int cellIdx);
145
146   public PropertyUsage getPropertyUsageByName(String JavaDoc propertyName) throws ObjectNotDefinedException;
147
148   public void validateModel(boolean rememberIndices) throws DjenericException;
149
150   public void requestFocus(String JavaDoc propertyName);
151
152   public String JavaDoc getTitle();
153
154   public void bindEditor(DjSession session, DjBindable comp, String JavaDoc propertyName) throws DjenericException;
155
156   public void unbindEditors();
157
158   public void updateAllModels(DjSession session) throws DjenericException;
159
160   public void setMaster(ObjectViewer master, RelationUsage via);
161
162   public ObjectViewer getMaster();
163
164   public void updateDetailLinks() throws DjenericException;
165
166   public boolean isRestricted(int cellIdx) throws DjenericException;
167
168   public void rememberSelectedIndex();
169
170   public void returnToRemberedIndex() throws DjenericException;
171
172   public void focusReceived(Component JavaDoc component);
173
174   public void reload() throws DjenericException;
175
176   public void synchronizeUsage();
177
178   public void setInserteableRecursive(boolean b);
179
180   public void setDeleteableRecursive(boolean b);
181
182   public void setEditableRecursive(boolean b);
183 }
Popular Tags