KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > tonbeller > jpivot > table > TableComponentExtensionSupport


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  *
12  */

13 package com.tonbeller.jpivot.table;
14
15 /**
16  * Created on 09.01.2003
17  *
18  * @author av
19  */

20 public abstract class TableComponentExtensionSupport extends PartBuilderSupport implements TableComponentExtension {
21
22   protected boolean enabled = true;
23
24   public void setEnabled(boolean enabled) {
25     this.enabled = enabled;
26     setDirty(true);
27   }
28
29   public boolean isEnabled() {
30     return enabled;
31   }
32
33   /**
34    * returns the enabled property
35    */

36   public Object JavaDoc getBookmarkState(int levelOfDetail) {
37     return new Boolean JavaDoc(enabled);
38   }
39
40   /**
41    * sets the enabled property
42    */

43   public void setBookmarkState(Object JavaDoc state) {
44     if (state instanceof Boolean JavaDoc)
45       enabled = ((Boolean JavaDoc) state).booleanValue();
46   }
47
48 }
49
Popular Tags