1 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 25 public class ResetQueryUI extends TableComponentExtensionSupport { 26 public static final String ID = "resetQuery"; 27 28 public String getId() { 29 return ID; 30 } 31 32 public void initialize(RequestContext context, TableComponent table) throws Exception { 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 |