KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > tonbeller > jpivot > table > navi > ResetQueryUI


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.navi;
14
15 import com.tonbeller.jpivot.olap.navi.ResetQuery;
16 import com.tonbeller.jpivot.table.TableComponent;
17 import com.tonbeller.jpivot.table.TableComponentExtensionSupport;
18 import com.tonbeller.wcf.controller.RequestContext;
19
20 /**
21  * Created on 06.12.2002
22  *
23  * @author av
24  */

25 public class ResetQueryUI extends TableComponentExtensionSupport {
26   public static final String JavaDoc ID = "resetQuery";
27
28   public String JavaDoc getId() {
29     return ID;
30   }
31
32   public void initialize(RequestContext context, TableComponent table) throws Exception JavaDoc {
33     super.initialize(context, table);
34   }
35
36   public boolean isAvailable() {
37     return getExtension() != null;
38   }
39
40   public boolean isButtonPressed() {
41     return false;
42   }
43
44   public void setButtonPressed(boolean value) {
45     if (value && getExtension() != null)
46       getExtension().reset();
47   }
48
49   ResetQuery getExtension() {
50     return (ResetQuery) table.getOlapModel().getExtension(ResetQuery.ID);
51   }
52
53 }
54
Popular Tags