KickJava   Java API By Example, From Geeks To Geeks.

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


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

55
56 public interface DrillExpandPosition extends Extension {
57
58   /**
59    * name of the Extension for lookup
60    */

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

67   boolean canExpand(Position position, Member member);
68   
69
70   /**
71    * true if the Position is currently expanded by specific member.
72    */

73   boolean canCollapse(Position position, Member member);
74
75   
76   /**
77    * expands Position by specific member
78    */

79   void expand(Position position, Member member);
80
81
82   /**
83    * collapses Position by specific member.
84    */

85   void collapse(Position position, Member member);
86 }
87
Popular Tags