KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > eclipse > core > internal > databinding > observable > tree > IChildrenUpdate


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 package org.eclipse.core.internal.databinding.observable.tree;
12
13 /**
14  * Context sensitive children update request for a parent and subrange of its
15  * children.
16  *
17  * @since 3.3
18  */

19 public interface IChildrenUpdate extends IViewerUpdate {
20
21     /**
22      * Returns the parent element that children are being requested for
23      * as a tree path. An empty path identifies the root element.
24      *
25      * @return parent element as a tree path
26      */

27     public TreePath getParent();
28     
29     /**
30      * Returns the offset at which children have been requested for. This is
31      * the index of the first child being requested.
32      *
33      * @return offset at which children have been requested for
34      */

35     public int getOffset();
36     
37     /**
38      * Returns the number of children requested.
39      *
40      * @return number of children requested
41      */

42     public int getLength();
43     
44     /**
45      * Sets the child for this request's parent at the given offset.
46      *
47      * @param child child
48      * @param index child offset
49      *
50      * TODO: what to do with <code>null</code>
51      */

52     public void setChild(Object JavaDoc child, int index);
53 }
54
Popular Tags