KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > tonbeller > jpivot > olap > navi > DrillExpandMember


1 /*
2  * ====================================================================
3  * This software is subject to the terms of the Common Public License
4  * Agreement, available at the following URL:
5  * http://www.opensource.org/licenses/cpl.html .
6  * Copyright (C) 2003-2004 TONBELLER AG.
7  * All Rights Reserved.
8  * You must accept the terms of that agreement to use this software.
9  * ====================================================================
10  *
11  * $Id$
12  */

13 package com.tonbeller.jpivot.olap.navi;
14
15 import com.tonbeller.jpivot.core.Extension;
16 import com.tonbeller.jpivot.olap.model.Member;
17
18 /**
19  * allows to expand / collapse members on an axis. If a member is expanded,
20  * the member itself plus its children are displayed.
21  * <p>
22  * Example: if you expand "Europe" you may see "Germany", "France" etc.
23  * If you collapse "Europe" the countries will not be shown.
24  * <p>
25  * If multiple Hierarchies are shown on a single axis, all positions
26  * are expanded. For example
27  *
28  * <pre>
29  * -----+-------
30  * 2001 | Europe
31  * -----+-------
32  * 2002 | Europe
33  * -----+-------
34  * 2003 | Europe
35  * -----+-------
36  * </pre>
37  *
38  * clicking on Europe in 2002 will give
39  *
40  * <pre>
41  * -----+-------
42  * 2001 | Europe
43  * | Germany
44  * | France
45  * -----+-------
46  * 2002 | Europe
47  * | Germany
48  * | France
49  * -----+-------
50  * 2003 | Europe
51  * | Germany
52  * | France
53  * -----+-------
54  * </pre>
55  *
56  * @author av
57  */

58
59 public interface DrillExpandMember extends Extension {
60   /**
61    * name of the Extension for lookup
62    */

63   public static final String JavaDoc ID = "drillExpandMember";
64   
65   /**
66    * true if member has children and is not currently expanded
67    */

68   boolean canExpand(Member member);
69
70   /**
71    * true if member has children that are currently displayed.
72    * I.e. member is expanded.
73    */

74   boolean canCollapse(Member member);
75
76   /**
77    * expands member
78    */

79   void expand(Member member);
80   
81   /**
82    * collapses member
83    */

84   void collapse(Member member);
85
86 }
87
Popular Tags