Package org.rssowl.ui.internal.util

Examples of org.rssowl.ui.internal.util.ITreeNode


    /* Selection is Present */
    if (respectSelection && tree.getSelectionCount() > 0) {

      /* Try navigating from Selection */
      ITreeNode startingNode = new WidgetTreeNode(tree.getSelection()[0], fNewsTableControl.getViewer());
      if (navigate(startingNode, next, unread))
        return true;
    }

    /* No Selection is Present */
    else {
      ITreeNode startingNode = new WidgetTreeNode(tree, fNewsTableControl.getViewer());
      return navigate(startingNode, true, unread);
    }

    return false;
  }
View Full Code Here


        return isValidNavigation(node, unread);
      }
    };

    /* Retrieve and select new Target Node */
    ITreeNode targetNode = (next ? traverse.nextNode() : traverse.previousNode());
    if (targetNode != null) {
      ISelection selection = new StructuredSelection(targetNode.getData());
      fNewsTableControl.getViewer().setSelection(selection);
      return true;
    }

    return false;
View Full Code Here

  /**
   * @throws Exception
   */
  @Test
  public void testTreeTraversalFromRootWithoutFilter() throws Exception {
    ITreeNode startingNode = getStartingNode(true);

    IFolder rootFolder = (IFolder) startingNode.getData();

    IFolder subRootFolder1 = rootFolder.getFolders().get(0);
    IBookMark subRoot1Mark1 = (IBookMark) subRootFolder1.getMarks().get(0);
    IBookMark subRoot1Mark2 = (IBookMark) subRootFolder1.getMarks().get(1);
    IFolder subRoot1Folder1 = subRootFolder1.getFolders().get(0);
View Full Code Here

  /**
   * @throws Exception
   */
  @Test
  public void testTreeTraversalFromRootWithFilter() throws Exception {
    ITreeNode startingNode = getStartingNode(true);

    IFolder rootFolder = (IFolder) startingNode.getData();

    IFolder subRootFolder1 = rootFolder.getFolders().get(0);
    IBookMark subRoot1Mark1 = (IBookMark) subRootFolder1.getMarks().get(0);
    IBookMark subRoot1Mark2 = (IBookMark) subRootFolder1.getMarks().get(1);
    IFolder subRoot1Folder1 = subRootFolder1.getFolders().get(0);
View Full Code Here

  /**
   * @throws Exception
   */
  @Test
  public void testTreeTraversalFromLeafWithoutFilter() throws Exception {
    ITreeNode startingNode = getStartingNode(false);

    IFolder rootFolder = ((IBookMark) startingNode.getData()).getParent().getParent().getParent().getParent();

    IFolder subRootFolder2 = rootFolder.getFolders().get(1);
    IBookMark subRoot2Mark1 = (IBookMark) subRootFolder2.getMarks().get(0);

    IFolder subRootFolder3 = rootFolder.getFolders().get(2);
View Full Code Here

  /**
   * @throws Exception
   */
  @Test
  public void testTreeTraversalFromLeafWithFilter() throws Exception {
    ITreeNode startingNode = getStartingNode(false);

    IFolder rootFolder = ((IBookMark) startingNode.getData()).getParent().getParent().getParent().getParent();

    IFolder subRootFolder2 = rootFolder.getFolders().get(1);
    IBookMark subRoot2Mark1 = (IBookMark) subRootFolder2.getMarks().get(0);

    IFolder subRootFolder3 = rootFolder.getFolders().get(2);
View Full Code Here

    /* Nothing to Navigate to */
    if (explorerTree.isDisposed())
      return false;

    ITreeNode targetNode = null;

    /* 1.) Navigate in opened Tree */
    targetNode = navigateInTree(explorerTree, next, unread);

    /* 2.) Navigate in BookMark-Sets */
    if (targetNode == null)
      targetNode = navigateInSets(next, unread);

    /* 3.) Finally, wrap in visible Tree if next */
    if (targetNode == null && next) {
      ITreeNode startingNode = new WidgetTreeNode(fViewer.getTree(), fViewer);
      targetNode = navigate(startingNode, next, unread);
    }

    /* Perform navigation if Node was found */
    if (targetNode != null) {
View Full Code Here

      Activator.getDefault().getLog().log(e.getStatus());
    }
  }

  private ITreeNode navigateInTree(Tree tree, boolean next, boolean unread) {
    ITreeNode resultingNode = null;

    /* Selection is Present */
    if (tree.getSelectionCount() > 0) {

      /* Try navigating from Selection */
      ITreeNode startingNode = new WidgetTreeNode(tree.getSelection()[0], fViewer);
      resultingNode = navigate(startingNode, next, unread);
      if (resultingNode != null)
        return resultingNode;
    }

    /* No Selection is Present */
    else {
      ITreeNode startingNode = new WidgetTreeNode(tree, fViewer);
      resultingNode = navigate(startingNode, next, unread);
      if (resultingNode != null)
        return resultingNode;
    }

View Full Code Here

    return resultingNode;
  }

  private ITreeNode navigateInSets(boolean next, boolean unread) {
    ITreeNode targetNode = null;

    /* Index of current visible Set */
    int index = getIndexOfRootFolder(fSelectedBookMarkSet);

    /* Look in next Sets */
 
View Full Code Here

    return targetNode;
  }

  private ITreeNode navigateInSet(IFolder set, boolean next, boolean unread) {
    ITreeNode node = new ModelTreeNode(set);
    ITreeNode targetNode = navigate(node, next, unread);
    if (targetNode != null) {
      changeSet(set);
      return targetNode;
    }
View Full Code Here

TOP

Related Classes of org.rssowl.ui.internal.util.ITreeNode

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.