Exemplo n.º 1
0
  public void printOutDocStack() {
    System.out.println("=======================================");
    System.out.println("=       Current document stack");
    System.out.println("=       Current position = " + currentPos);
    System.out.println("=");
    for (int i = 0; i < nodes.size(); i++) {
      Node node = (Node) nodes.elementAt(i);
      System.out.println("= Node " + i + ":");
      System.out.println("=    target: " + node.target.getName());
      System.out.println("=    old contents: " + node.oldContents.getURL());
      System.out.println("=        scroll position: " + node.oldContents.getScrollPosition());
      System.out.println("=        flushed: " + node.oldContents.getIsFlushed());
      System.out.println("=    new contents: " + node.newContents.getURL());
      System.out.println("=        scroll position: " + node.newContents.getScrollPosition());
      System.out.println("=        flushed: " + node.newContents.getIsFlushed());
      System.out.println(
          "=    parents (length " + (node.parents != null ? node.parents.length : 0) + "):");
      if (node.parents != null) {
        for (int j = 0; j < node.parents.length; j++) {
          System.out.print("=       " + node.parents[j].getURL());
          DocumentFormatter documentformatter = node.parents[j].getFormatterIfNotRemoved();
          if (documentformatter != null)
            System.out.println(
                ", " + ((DocumentPanel) documentformatter.getScrollPane()).getName());
          else System.out.println("");
        }
      }
      System.out.println("=    extViewer: " + node.extViewer);
      System.out.println("=");
    }

    System.out.println("=======================================");
  }
Exemplo n.º 2
0
 private void flushForCodebase(
     DocumentFormatterPresentation documentformatterpresentation, Vector vector) {
   if (!documentformatterpresentation.getIsFlushed()) {
     DocumentFormatter documentformatter =
         documentformatterpresentation.getFormatterRef().getFormatter();
     Vector vector1 = new Vector();
     documentformatter.getAppletPanels(vector1, true);
     for (int i = 0; i < vector1.size(); i++)
       if (vector.contains(vector1.elementAt(i))) {
         documentformatterpresentation.flush();
         return;
       }
   }
 }
Exemplo n.º 3
0
  public void addAppletPanels(Vector vector) {
    Vector vector1 = new Vector();
    int i = Math.max(0, (1 + currentPos) - purgeContentsThreshold);
    int j = Math.min(nodes.size() - 1, (currentPos + purgeContentsThreshold) - 1);
    for (int k = i; k <= j; k++) {
      Node node = (Node) nodes.elementAt(k);
      if (!node.oldContents.getIsFlushed()) {
        DocumentFormatter documentformatter = node.oldContents.getFormatterRef().getFormatter();
        documentformatter.getAppletPanels(vector1, true);
      }
      if (!node.newContents.getIsFlushed()) {
        DocumentFormatter documentformatter1 = node.newContents.getFormatterRef().getFormatter();
        documentformatter1.getAppletPanels(vector1, true);
      }
      if (node.parents != null) {
        for (int i1 = 0; i1 < node.parents.length; i1++) {
          DocumentFormatter documentformatter2 = node.parents[i1].getFormatter();
          documentformatter2.getAppletPanels(vector1, true);
        }
      }
    }

    for (int l = 0; l < vector1.size(); l++) {
      Object obj = vector1.elementAt(l);
      if (!vector.contains(obj)) vector.addElement(obj);
    }
  }
Exemplo n.º 4
0
 public void setDocFont(DocFont docfont) {
   int i = Math.max(0, (1 + currentPos) - purgeContentsThreshold);
   int j = Math.min(nodes.size() - 1, (currentPos + purgeContentsThreshold) - 1);
   for (int k = i; k <= j; k++) {
     Node node = (Node) nodes.elementAt(k);
     if (!node.oldContents.getIsFlushed()) {
       DocumentFormatter documentformatter = node.oldContents.getFormatterRef().getFormatter();
       documentformatter.setDocFont(docfont);
     }
     if (!node.newContents.getIsFlushed()) {
       DocumentFormatter documentformatter1 = node.newContents.getFormatterRef().getFormatter();
       documentformatter1.setDocFont(docfont);
     }
     if (node.parents != null) {
       for (int l = 0; l < node.parents.length; l++) {
         DocumentFormatter documentformatter2 = node.parents[l].getFormatter();
         documentformatter2.setDocFont(docfont);
       }
     }
   }
 }