01: /**
02: * Copyright 2006 Webmedia Group Ltd.
03: *
04: * Licensed under the Apache License, Version 2.0 (the "License");
05: * you may not use this file except in compliance with the License.
06: * You may obtain a copy of the License at
07: *
08: * http://www.apache.org/licenses/LICENSE-2.0
09: *
10: * Unless required by applicable law or agreed to in writing, software
11: * distributed under the License is distributed on an "AS IS" BASIS,
12: * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13: * See the License for the specific language governing permissions and
14: * limitations under the License.
15: **/package org.araneaframework.uilib.list;
16:
17: import java.util.Comparator;
18: import org.araneaframework.uilib.ConfigurationContext;
19: import org.araneaframework.uilib.util.Event;
20:
21: /**
22: * List context. General interface that can be used to access the current list
23: * configuration.
24: *
25: * @author <a href="mailto:rein@araneaframework.org">Rein Raudjärv</a>
26: *
27: * @see ConfigurationContext
28: * @see ListWidget
29: */
30: public interface ListContext {
31:
32: /**
33: * Returns the type of this field.
34: *
35: * @param fieldId field id.
36: * @return the type of this field.
37: */
38: Class getFieldType(String fieldId);
39:
40: /**
41: * Returns the current case sensitivity behaivor.
42: *
43: * @return the current case sensitivity behaivor.
44: */
45: boolean isIgnoreCase();
46:
47: /**
48: * Run an event after the initialization.
49: *
50: * @param event an event.
51: */
52: void addInitEvent(Event event);
53:
54: // ----- Available after initialization -----
55:
56: /**
57: * Retrieves the global configuration context.
58: *
59: * @return the global configuration context.
60: */
61: //ConfigurationContext getConfiguration();
62: /**
63: * Returns the current locale.
64: *
65: * @return the current locale.
66: */
67: //Locale getLocale();
68: /**
69: * Returns the label of this field.
70: *
71: * @param fieldId field id.
72: * @return the label of this field.
73: */
74: String getFieldLabel(String fieldId);
75:
76: /**
77: * Returns the {@link Comparator} of this field.
78: *
79: * @param fieldId field id.
80: * @return the comparator of this field.
81: */
82: Comparator getFieldComparator(String fieldId);
83: }
|