示例#1
0
  /** @param hierarchyName */
  public void removeHierarchy(String hierarchyName) {
    Hierarchy hierarchy = model.getCube().getHierarchies().get(hierarchyName);

    ChangeSlicer transform = model.getTransform(ChangeSlicer.class);
    transform.setSlicer(hierarchy, null);

    configureFilter();
  }
示例#2
0
  public void onClose() {
    ChangeSlicer transform = model.getTransform(ChangeSlicer.class);

    Hierarchy hierarchy = getHierarchy();

    if (!transform.getHierarchies().contains(hierarchy)) {
      removeHierarchy(getHierarchyName());
    }

    setHierarchyName(null);
  }
示例#3
0
  public void apply() {
    List<Member> members = null;

    if (selection != null) {
      members = new ArrayList<Member>(selection.length);

      for (TreeNode node : selection) {
        MemberNode memberNode = (MemberNode) node;
        members.add(memberNode.getObject());
      }
    }

    ChangeSlicer transform = model.getTransform(ChangeSlicer.class);
    transform.setSlicer(getHierarchy(), members);
  }
示例#4
0
  protected void configureFilter() {
    if (model != null && filterPanel != null) {
      filterPanel.getChildren().clear();

      if (model.isInitialized()) {
        ChangeSlicer transform = model.getTransform(ChangeSlicer.class);

        List<Hierarchy> hierarchies = transform.getHierarchies();

        for (Hierarchy hierarchy : hierarchies) {
          UIComponent panel = createFilterItem(hierarchy);
          filterPanel.getChildren().add(panel);
        }
      }
    }
  }
示例#5
0
  protected MemberSelection getFilteredMembers() {
    if (filterMembers == null) {
      Hierarchy hierarchy = getHierarchy();

      if (hierarchy != null) {
        ChangeSlicer transform = model.getTransform(ChangeSlicer.class);

        this.filterMembers = new MemberSelection(transform.getSlicer(hierarchy), model.getCube());

        if (model instanceof PivotModelImpl) {
          MemberHierarchyCache cache = ((PivotModelImpl) model).getMemberHierarchyCache();
          filterMembers.setMemberHierarchyCache(cache);
        }
      }
    }

    return filterMembers;
  }