Examples of DocumentNode


Examples of net.alteiar.campaign.player.gui.centerViews.explorer.tree.DocumentNode

  @Override
  protected Transferable createTransferable(JComponent c) {
    JTree tree = (JTree) c;

    TreePath path = tree.getSelectionPath();
    DocumentNode doc = (DocumentNode) path.getLastPathComponent();

    return new UniqueIdTransferable(doc.getUserObject().getId());
  }
View Full Code Here

Examples of net.alteiar.campaign.player.gui.centerViews.explorer.tree.DocumentNode

      BeanDirectory targetDir = null;
      if (path == null) {
        targetDir = CampaignClient.getInstance().getRootDirectory();
      } else {
        DocumentNode node = (DocumentNode) path.getLastPathComponent();

        if (node.getUserObject().isDirectory()) {
          targetDir = (BeanDirectory) node.getUserObject();
        } else {
          UniqueID dirBean = node.getUserObject().getParent();
          targetDir = CampaignClient.getInstance().getBean(dirBean);
        }
      }

      BeanDirectory previousDir = CampaignClient.getInstance().getBean(
View Full Code Here

Examples of org.apache.poi.poifs.filesystem.DocumentNode

     */
    private static MediaType processCompObjFormatType(DirectoryEntry root) {
        try {
            Entry e = root.getEntry("\u0001CompObj");
            if (e != null && e.isDocumentEntry()) {
                DocumentNode dn = (DocumentNode)e;
                DocumentInputStream stream = new DocumentInputStream(dn);
                byte [] bytes = IOUtils.toByteArray(stream);
                /*
                 * This array contains a string with a normal ASCII name of the
                 * application used to create this file. We want to search for that
View Full Code Here

Examples of org.apache.poi.poifs.filesystem.DocumentNode

           hadChildren = true;
           Entry entry = it.next();
           if (entry instanceof DirectoryNode) {
              displayDirectory((DirectoryNode) entry, os, newIndent, withSizes);
           } else {
              DocumentNode doc = (DocumentNode) entry;
              String name = doc.getName();
              String size = "";
              if (name.charAt(0) < 10) {
                 String altname = "(0x0" + (int) name.charAt(0) + ")" + name.substring(1);
                 name = name.substring(1) + " <" + altname + ">";
              }
              if (withSizes) {
                 size = " [" + doc.getSize() + " / 0x" +
                        Integer.toHexString(doc.getSize()) + "]";
              }
              os.write((newIndent + name + size + "\n").getBytes() );
           }
        }
        if (!hadChildren) {
View Full Code Here

Examples of org.apache.poi.poifs.filesystem.DocumentNode

    @Test
    public void inPlaceNPOIFSWrite() throws Exception {
        try {
            NPOIFSFileSystem fs = null;
            DirectoryEntry root = null;
            DocumentNode sinfDoc = null;
            DocumentNode dinfDoc = null;
            SummaryInformation sinf = null;
            DocumentSummaryInformation dinf = null;
           
            // We need to work on a File for in-place changes, so create a temp one
            final File copy = TempFile.createTempFile("Test-HPSF", "ole2");
View Full Code Here

Examples of org.apache.poi.poifs.filesystem.DocumentNode

      for(Iterator it = dir.getEntries(); it.hasNext(); ) {
        Object entry = it.next();
        if(entry instanceof DirectoryNode) {
          displayDirectory((DirectoryNode)entry, newIndent);
        } else {
          DocumentNode doc = (DocumentNode)entry;
          String name = doc.getName();
          if(name.charAt(0) < 10) {
            String altname = "(0x0" + (int)name.charAt(0) + ")" + name.substring(1);
            name = name.substring(1) + " <" + altname + ">";
          }
          System.out.println(newIndent + name);
View Full Code Here

Examples of org.apache.poi.poifs.filesystem.DocumentNode

      hadChildren = true;
      Object entry = it.next();
      if (entry instanceof DirectoryNode) {
        displayDirectory((DirectoryNode) entry, newIndent, withSizes);
      } else {
        DocumentNode doc = (DocumentNode) entry;
        String name = doc.getName();
        String size = "";
        if (name.charAt(0) < 10) {
          String altname = "(0x0" + (int) name.charAt(0) + ")" + name.substring(1);
          name = name.substring(1) + " <" + altname + ">";
        }
        if (withSizes) {
          size = " [" + doc.getSize() + " / 0x" + Integer.toHexString(doc.getSize())
              + "]";
        }
        System.out.println(newIndent + name + size);
      }
    }
View Full Code Here

Examples of org.apache.poi.poifs.filesystem.DocumentNode

        hadChildren = true;
        Object entry = it.next();
        if(entry instanceof DirectoryNode) {
          displayDirectory((DirectoryNode)entry, newIndent, withSizes);
        } else {
          DocumentNode doc = (DocumentNode)entry;
          String name = doc.getName();
          String size = "";
          if(name.charAt(0) < 10) {
            String altname = "(0x0" + (int)name.charAt(0) + ")" + name.substring(1);
            name = name.substring(1) + " <" + altname + ">";
          }
          if(withSizes) {
            size = " [" +
              doc.getSize() + " / 0x" +
              Integer.toHexString(doc.getSize()) +
              "]";
          }
          System.out.println(newIndent + name + size);
        }
      }
View Full Code Here

Examples of org.apache.poi.poifs.filesystem.DocumentNode

         hadChildren = true;
         Entry entry = it.next();
         if (entry instanceof DirectoryNode) {
            displayDirectory((DirectoryNode) entry, newIndent, withSizes);
         } else {
            DocumentNode doc = (DocumentNode) entry;
            String name = doc.getName();
            String size = "";
            if (name.charAt(0) < 10) {
               String altname = "(0x0" + (int) name.charAt(0) + ")" + name.substring(1);
               name = name.substring(1) + " <" + altname + ">";
            }
            if (withSizes) {
               size = " [" + doc.getSize() + " / 0x" +
                      Integer.toHexString(doc.getSize()) + "]";
            }
            System.out.println(newIndent + name + size);
         }
      }
      if (!hadChildren) {
View Full Code Here

Examples of org.apache.poi.poifs.filesystem.DocumentNode

     */
    private static MediaType processCompObjFormatType(DirectoryEntry root) {
        try {
            Entry e = root.getEntry("\u0001CompObj");
            if (e != null && e.isDocumentEntry()) {
                DocumentNode dn = (DocumentNode)e;
                DocumentInputStream stream = new DocumentInputStream(dn);
                byte [] bytes = IOUtils.toByteArray(stream);
                /*
                 * This array contains a string with a normal ASCII name of the
                 * application used to create this file. We want to search for that
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.