Examples of OutlineNode


Examples of com.google.collide.client.workspace.outline.OutlineNode

    cssOutlineParser.onIterationFinish();

    final int outputSize = output.size();
    assertEquals("number of nodes", expectedNodes.getKeys().size(), outputSize);
    for (int i = 0; i < outputSize; i++) {
      OutlineNode node = output.get(i);
      String nodeName = node.getName();
      assertTrue("unexpected item: [" + nodeName + "]", expectedNodes.contains(nodeName));
    }

    cssOutlineParser.cleanup();
  }
View Full Code Here

Examples of com.google.collide.client.workspace.outline.OutlineNode

      return;
    }

    JsonArray<OutlineNode> children = parent.getChildren();
    for (int i = 0; listController.size() < MAX_RESULTS && i < children.size(); i++) {
      OutlineNode node = children.get(i);
      if (node.getName().contains(query)) {
        OutlineItem item = listController.next();
        item.setOutlineNode(node);
      }

      traverseNode(children.get(i), query);
View Full Code Here

Examples of com.sun.pdfview.OutlineNode

    ByteBuffer buf = fc.map(FileChannel.MapMode.READ_ONLY, 0, fc.size());
    pdfFile = new PDFFile(buf);

    pageStart = 0;
    pageEnd = pdfFile.getNumPages();
    OutlineNode on = pdfFile.getOutline();
    if (on != null) {
      for (int i = 0; i < on.getChildCount(); i++) {
        OutlineNode child = (OutlineNode) on.getChildAt(i);
        GoToAction act = (GoToAction) child.getAction();

        //Find the beginning of the chapter selected,
        //then take the page start and page end number
        if (child.toString().toLowerCase().startsWith(marker.getChapterPrefix().toLowerCase())) {
          currentOutline = child;
          pageStart = pdfFile.getPageNumber(act.getDestination()
              .getPage());
          if (i + 1 < on.getChildCount()) {
            OutlineNode childAfter = (OutlineNode) on
                .getChildAt(i + 1);
            GoToAction actAfter = (GoToAction) childAfter
                .getAction();
            pageEnd = pdfFile.getPageNumber(actAfter
                .getDestination().getPage());
          }// else if child is the last one, pageEnd is already set.
          break;
View Full Code Here

Examples of com.sun.pdfview.OutlineNode

   */
  @Override
  public void valueChanged(TreeSelectionEvent e) {

    TreePath path = e.getNewLeadSelectionPath();
    OutlineNode selectedNode = (OutlineNode) path.getLastPathComponent();
    GoToAction act = (GoToAction) selectedNode.getAction();

    try {
      int pageNode = pdfFile
          .getPageNumber(act.getDestination().getPage());
      bar.setValue(pageNode - pageStart);
View Full Code Here

Examples of com.sun.pdfview.OutlineNode

     * Someone changed the selection of the outline tree.  Go to the new
     * page.
     */
    public void valueChanged(TreeSelectionEvent e) {
        if (e.isAddedPath()) {
            OutlineNode node = (OutlineNode) e.getPath().getLastPathComponent();
            if (node == null) {
                return;
            }

            try {
                PDFAction action = node.getAction();
                if (action == null) {
                    return;
                }

                if (action instanceof GoToAction) {
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.