78
|
1 /*******************************************************************************
|
|
2 * Copyright (c) 2006, 2007 IBM Corporation and others.
|
|
3 * All rights reserved. This program and the accompanying materials
|
|
4 * are made available under the terms of the Eclipse Public License v1.0
|
|
5 * which accompanies this distribution, and is available at
|
|
6 * http://www.eclipse.org/legal/epl-v10.html
|
|
7 *
|
|
8 * Contributors:
|
|
9 * IBM Corporation - initial API and implementation
|
|
10 *******************************************************************************/
|
|
11 module org.eclipse.core.internal.databinding.observable.tree.IChildrenUpdate;
|
81
|
12 import org.eclipse.core.internal.databinding.observable.tree.TreePath;
|
|
13 import org.eclipse.core.internal.databinding.observable.tree.IViewerUpdate;
|
78
|
14
|
|
15 import java.lang.all;
|
|
16
|
|
17 /**
|
|
18 * Context sensitive children update request for a parent and subrange of its
|
|
19 * children.
|
|
20 *
|
|
21 * @since 3.3
|
|
22 */
|
|
23 public interface IChildrenUpdate : IViewerUpdate {
|
|
24
|
|
25 /**
|
|
26 * Returns the parent element that children are being requested for
|
|
27 * as a tree path. An empty path identifies the root element.
|
|
28 *
|
|
29 * @return parent element as a tree path
|
|
30 */
|
|
31 public TreePath getParent();
|
|
32
|
|
33 /**
|
|
34 * Returns the offset at which children have been requested for. This is
|
|
35 * the index of the first child being requested.
|
|
36 *
|
|
37 * @return offset at which children have been requested for
|
|
38 */
|
|
39 public int getOffset();
|
|
40
|
|
41 /**
|
|
42 * Returns the number of children requested.
|
|
43 *
|
|
44 * @return number of children requested
|
|
45 */
|
|
46 public int getLength();
|
|
47
|
|
48 /**
|
|
49 * Sets the child for this request's parent at the given offset.
|
|
50 *
|
|
51 * @param child child
|
|
52 * @param index child offset
|
|
53 *
|
|
54 * TODO: what to do with <code>null</code>
|
|
55 */
|
|
56 public void setChild(Object child, int index);
|
|
57 }
|