1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
|
/*
Wotonomy: OpenStep design patterns for pure Java applications.
Copyright (C) 2000 Michael Powers
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with this library; if not, see http://www.gnu.org
*/
package net.wotonomy.ui;
import java.util.List;
import java.util.Map;
import net.wotonomy.control.EODataSource;
import net.wotonomy.control.EOQualifier;
/**
* DisplayGroup provides an abstraction of a user interface,
* comprising of an ordered collection of data objects, some
* of which are displayed, and of those some are selected.
* This class extends EODisplayGroup to provide java-friendly
* convenience methods.
*
* @author michael@mpowers.net
* @author $Author: cgruber $
* @version $Revision: 904 $
*/
public class DisplayGroup extends EODisplayGroup
{
/**
* Returns the current data source backing this display group,
* or null if no dataSource is currently used.
*/
public EODataSource getDataSource()
{
return super.dataSource();
}
/**
* Returns the current delegate for this display group,
* or null if no delegate is currently set.
*/
public Object getDelegate()
{
return delegate();
}
/**
* Returns the current string matching format.
* If not set, defaults to "%@*".
*/
public String getDefaultStringMatchFormat()
{
return defaultStringMatchFormat();
}
/**
* Returns the current string matching operator.
* If not set, defaults to "caseInsensitiveLike".
*/
public String getdefaultStringMatchOperator()
{
return defaultStringMatchOperator();
}
/**
* Returns a Map of default values that are applied
* to new objects that are inserted into the list.
*/
public Map getInsertedObjectDefaultValues()
{
return insertedObjectDefaultValues();
}
/**
* Returns the keys that were declared when read from
* an external resource file.
*/
public List getLocalKeys()
{
return localKeys();
}
/**
* Returns the List of sort orderings for this display group.
*/
public List getSortOrderings ()
{
return sortOrderings();
}
/**
* Returns a qualifier that will be applied all the objects
* in this display group to determine which objects will
* be displayed.
*/
public EOQualifier getQualifier ()
{
return qualifier();
}
/**
* Returns a new qualifier built from the three query
* value maps: greater than, equal to, and less than.
*/
public EOQualifier getQualifierFromQueryValues ()
{
return qualifierFromQueryValues();
}
/**
* Returns a Map containing the mappings of keys
* to binding query values.
*/
public Map getQueryBindingValues()
{
return queryBindingValues();
}
/**
* Returns a Map containing the mappings of keys
* to operator values.
*/
public Map getQueryOperatorValues()
{
return queryOperatorValues();
}
/**
* Returns a Map containing the mappings of keys
* to query values that will be used to test for equality.
*/
public Map getEqualToQueryValues()
{
return equalToQueryValues();
}
/**
* Returns a Map containing the mappings of keys
* to query values that will be used to test for greater value.
*/
public Map getGreaterThanQueryValues()
{
return greaterThanQueryValues();
}
/**
* Returns a Map containing the mappings of keys
* to query values that will be used to test for lesser value.
*/
public Map getLessThanQueryValues()
{
return lessThanQueryValues();
}
/**
* Returns the association that is currently being edited,
* or null if no editing is taking place.
*/
public EOAssociation getEditingAssociation ()
{
return editingAssociation();
}
/**
* Returns a List of associations that are observing
* this display group.
*/
public List getObservingAssociations()
{
return observingAssociations();
}
/**
* Returns a List containing all objects managed by the display group.
* This includes those objects not visible due to disqualification.
*/
public List getAllObjects()
{
return allObjects();
}
/**
* Returns a List of all objects in the display group
* that are currently displayed by the associations.
* The list is a copy of the internal displayed object list.
*/
public List getDisplayedObjects()
{
return displayedObjects();
}
/**
* Returns the currently selected object, or null if
* there is no selection.
*/
public Object getSelectedObject()
{
return selectedObject();
}
/**
* Returns a List containing all selected objects, if any.
* Returns an empty list if no objects are selected.
*/
public List getSelectedObjects()
{
return selectedObjects();
}
/**
* Returns a List containing the indexes of all selected
* objects, if any. The list contains instances of
* java.lang.Number; call intValue() retrieve the index.
*/
public List getSelectionIndexes()
{
return selectionIndexes();
}
/**
* Returns the index of the changed object. If more than
* one object has changed, -1 is returned.
*/
public int getUpdatedObjectIndex()
{
return updatedObjectIndex();
}
/**
* Returns a value on the selected object for the specified key.
*/
public Object getSelectedObjectValueForKey ( String aKey )
{
return selectedObjectValueForKey( aKey );
}
/**
* Returns the value for the specified key on the specified object.
*/
public Object getValueForObject ( Object anObject, String aKey )
{
return valueForObject( anObject, aKey );
}
/**
* Calls valueForObject() for the object at the specified index.
*/
public Object getValueForObjectAtIndex ( int anIndex, String aKey )
{
return valueForObjectAtIndex( anIndex, aKey );
}
/**
* Specifies the default string matching format for all
* display groups.
*/
public static String getGlobalDefaultStringMatchFormat ()
{
return globalDefaultStringMatchFormat();
}
/**
* Specifies the default string matching operator for all
* display groups.
*/
public static String getGlobalDefaultStringMatchOperator ()
{
return globalDefaultStringMatchOperator();
}
}
/*
* $Log$
* Revision 1.2 2006/02/18 23:14:35 cgruber
* Update imports and maven dependencies.
*
* Revision 1.1 2006/02/16 13:22:22 cgruber
* Check in all sources in eclipse-friendly maven-enabled packages.
*
* Revision 1.2 2002/05/17 15:01:49 mpowers
* Implemented dynamic lookup of delegate methods so delegates no longer
* need to implement the DisplayGroup.Delegate interface.
*
* Revision 1.1 2002/03/26 21:24:43 mpowers
* Contributing DisplayGroup as convenience for people coming from java.
*
*
*/
|