1 13 package com.tonbeller.jpivot.test.olap; 14 15 import com.tonbeller.jpivot.olap.navi.SwapAxes; 16 17 22 public class TestSwapAxes extends TestExtensionSupport implements SwapAxes { 23 boolean swapped; 24 25 TestOlapModel olapModel() { 26 return (TestOlapModel)getModel(); 27 } 28 29 32 public boolean canSwapAxes() { 33 return true; 34 } 35 36 public void setSwapAxes(boolean newSwapped) { 37 if (this.swapped != newSwapped) { 38 this.swapped = newSwapped; 39 TestAxis a = olapModel().getAxis(0); 40 TestAxis b = olapModel().getAxis(1); 41 olapModel().setAxis(0, b); 42 olapModel().setAxis(1, a); 43 fireModelChanged(); 44 } 45 } 46 47 public boolean isSwapAxes() { 48 return swapped; 49 } 50 51 52 } 53 | Popular Tags |