1 13 package com.tonbeller.jpivot.table.navi; 14 15 import com.tonbeller.jpivot.olap.model.Member; 16 import com.tonbeller.jpivot.olap.navi.DrillExpandMember; 17 import com.tonbeller.jpivot.table.span.Span; 18 19 24 public class DrillExpandMemberUI extends DrillExpandUI { 25 26 public static final String ID = "drillMember"; 27 public String getId() { 28 return ID; 29 } 30 31 DrillExpandMember extension; 32 33 protected boolean initializeExtension() { 34 extension = (DrillExpandMember) table.getOlapModel().getExtension(DrillExpandMember.ID); 35 return extension != null; 36 } 37 38 41 protected boolean canExpand(Span span) { 42 if (positionContainsMember(span)) 43 return extension.canExpand((Member) span.getMember().getRootDecoree()); 44 return false; 45 } 46 47 50 protected void expand(Span span) { 51 extension.expand((Member) span.getMember().getRootDecoree()); 52 } 53 54 57 protected boolean canCollapse(Span span) { 58 if (positionContainsMember(span)) 59 return extension.canCollapse((Member) span.getMember().getRootDecoree()); 60 return false; 61 } 62 63 66 protected void collapse(Span span) { 67 extension.collapse((Member) span.getMember().getRootDecoree()); 68 } 69 70 protected String getCollapseImage() { 71 return "drill-member-collapse"; 72 } 73 74 protected String getExpandImage() { 75 return "drill-member-expand"; 76 } 77 78 protected String getOtherImage() { 79 return "drill-member-other"; 80 } 81 82 } 83 | Popular Tags |