01: /*
02: * Copyright 2006 Google Inc.
03: *
04: * Licensed under the Apache License, Version 2.0 (the "License"); you may not
05: * use this file except in compliance with the License. You may obtain a copy of
06: * 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, WITHOUT
12: * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
13: * License for the specific language governing permissions and limitations under
14: * the License.
15: */
16: package com.google.gwt.user.client.ui;
17:
18: /**
19: * A panel that imposes an explicit ordering on its children.
20: */
21: public interface IndexedPanel {
22:
23: /**
24: * Gets the child widget at the specified index.
25: *
26: * @param index the child widget's index
27: * @return the child widget
28: */
29: Widget getWidget(int index);
30:
31: /**
32: * Gets the number of child widgets in this panel.
33: *
34: * @return the number of children
35: */
36: int getWidgetCount();
37:
38: /**
39: * Gets the index of the specified child widget.
40: *
41: * @param child the widget to be found
42: * @return the widget's index, or <code>-1</code> if it is not a child of
43: * this panel
44: */
45: int getWidgetIndex(Widget child);
46:
47: /**
48: * Removes the widget at the specified index.
49: *
50: * @param index the index of the widget to be removed
51: * @return <code>false</code> if the widget is not present
52: */
53: boolean remove(int index);
54: }
|