KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > tonbeller > jpivot > table > span > TestMemberProperties


1 /*
2  * Created on 09.10.2003
3  *
4  * To change the template for this generated file go to
5  * Window>Preferences>Java>Code Generation>Code and Comments
6  */

7 package com.tonbeller.jpivot.table.span;
8
9 import com.tonbeller.jpivot.core.ExtensionSupport;
10 import com.tonbeller.jpivot.olap.model.Level;
11 import com.tonbeller.jpivot.olap.model.Member;
12 import com.tonbeller.jpivot.olap.model.MemberPropertyMeta;
13 import com.tonbeller.jpivot.olap.navi.MemberProperties;
14
15
16 class TestMemberProperties extends ExtensionSupport implements MemberProperties {
17   boolean levelScope;
18   public MemberPropertyMeta[] getMemberPropertyMetas(Level level) {
19     return null;
20   }
21   public boolean isLevelScope() {
22     return levelScope;
23   }
24   public void setLevelScope(boolean levelScope) {
25     this.levelScope = levelScope;
26   }
27   public String JavaDoc getPropertyScope(Member m) {
28     if (levelScope)
29       return m.getLevel().getLabel();
30     return m.getLevel().getHierarchy().getLabel();
31   }
32   public String JavaDoc getPropertyScope(Level l) {
33     if (levelScope)
34       return l.getLabel();
35     return l.getHierarchy().getLabel();
36   }
37   public void setVisibleProperties(MemberPropertyMeta[] props) {
38     // ignored
39
}
40
41 }
Popular Tags