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.util;
16:
17: import java.util.Collection;
18: import java.util.List;
19: import org.araneaframework.uilib.support.DisplayItem;
20:
21: /**
22: * @author Jevgeni Kabanov (ekabanov <i>at</i> araneaframework <i>dot</i> org)
23: */
24: public interface DisplayItemContainer {
25:
26: /**
27: * Adds a display-item to the element.
28: * @param item the item to be added.
29: */
30: public void addItem(DisplayItem item);
31:
32: /**
33: * Adds {@link DisplayItem}'s from <code>Collection to this {@link DisplayItemContainer}.
34: * @param items <code>Collection <{@link DisplayItem}></code>.
35: */
36: public void addItems(Collection items);
37:
38: /**
39: * Clears the currently held {@link DisplayItem}s.
40: */
41: public void clearItems();
42:
43: /**
44: * Returns a <code>List <{@link DisplayItem}></code> that this {@link DisplayItemContainer} currently helds.
45: * @return a list of display-items.
46: */
47: public List getDisplayItems();
48:
49: /**
50: * Returns the index of the display item with the specified value.
51: * @param value display item value.
52: * @return the index of the display item with the specified value.
53: */
54: public int getValueIndex(String value);
55: }
|