Example #1
0
  /**
   * Updates the current root element according to the position of the upward navigation silder,
   * i.e. a parent of the current root element with the hierarchy level of the slider position will
   * be the new root element.
   */
  private void updateHierarchyAccordingToNavigationSlider() {
    PartialDisc pdNewRootElement =
        pdCurrentRootElement.getParentWithLevel(upwardNavigationSlider.getSelectedValue());
    if (pdNewRootElement != null) {
      pdCurrentRootElement = pdNewRootElement;

      bIsNewSelection = true;

      PartialDisc pdSelectedElement =
          drawingController.getCurrentDrawingState().getSelectedElement();
      if (pdSelectedElement != null) {
        pdCurrentSelectedElement = pdSelectedElement;
        pdSelectedElement.setCurrentStartAngle(0);
      }
      navigationHistory.addNewHistoryEntry(
          drawingController.getCurrentDrawingState(),
          pdCurrentRootElement,
          pdCurrentSelectedElement,
          iMaxDisplayedHierarchyDepth);
      setDisplayListDirty();

      setNewSelection(SelectionType.SELECTION, pdCurrentSelectedElement);
    }
  }