Obtained from:
Submitted by:
Reviewed by:
added stuff from the klute-meister


git-svn-id: https://svn.apache.org/repos/asf/jakarta/poi/trunk@352112 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Andrew C. Oliver 2002-02-22 04:28:55 +00:00
parent 8095869530
commit b6c3b3f8d4
10 changed files with 112 additions and 18 deletions

View File

@ -110,7 +110,7 @@ public class POIBrowser extends JFrame
/* Create the tree model with a root node. The latter is /* Create the tree model with a root node. The latter is
* invisible but it must be present because a tree model * invisible but it must be present because a tree model
* always needs a root. */ * always needs a root. */
rootNode = new DefaultMutableTreeNode("POIFS"); rootNode = new DefaultMutableTreeNode("POI Filesystems");
DefaultTreeModel treeModel = new DefaultTreeModel(rootNode); DefaultTreeModel treeModel = new DefaultTreeModel(rootNode);
/* Create the tree UI element. */ /* Create the tree UI element. */
@ -118,6 +118,7 @@ public class POIBrowser extends JFrame
getContentPane().add(new JScrollPane(treeUI)); getContentPane().add(new JScrollPane(treeUI));
/* Add the POI filesystems to the tree. */ /* Add the POI filesystems to the tree. */
int displayedFiles = 0;
for (int i = 0; i < args.length; i++) for (int i = 0; i < args.length; i++)
{ {
final String filename = args[i]; final String filename = args[i];
@ -126,6 +127,7 @@ public class POIBrowser extends JFrame
POIFSReader r = new POIFSReader(); POIFSReader r = new POIFSReader();
r.registerListener(new TreeReaderListener(filename, rootNode)); r.registerListener(new TreeReaderListener(filename, rootNode));
r.read(new FileInputStream(filename)); r.read(new FileInputStream(filename));
displayedFiles++;
} }
catch (IOException ex) catch (IOException ex)
{ {
@ -139,6 +141,14 @@ public class POIBrowser extends JFrame
} }
} }
/* Exit if there is no file to display (none specified or only
* files with problems). */
if (displayedFiles == 0)
{
System.out.println("No POI filesystem(s) to display.");
System.exit(0);
}
/* Make the tree UI element visible. */ /* Make the tree UI element visible. */
treeUI.setRootVisible(true); treeUI.setRootVisible(true);
treeUI.setShowsRootHandles(true); treeUI.setShowsRootHandles(true);
@ -149,7 +159,7 @@ public class POIBrowser extends JFrame
new PropertySetDescriptorRenderer()); new PropertySetDescriptorRenderer());
treeUI.setCellRenderer(etcr); treeUI.setCellRenderer(etcr);
setSize(600, 450); setSize(600, 450);
setTitle("POI Browser 0.10"); setTitle("POI Browser 0.06");
setVisible(true); setVisible(true);
} }

View File

@ -134,7 +134,7 @@ public class TreeReaderListener implements POIFSReaderListener
{ {
this.filename = filename; this.filename = filename;
this.rootNode = rootNode; this.rootNode = rootNode;
pathToNode = new HashMap(15); pathToNode = new HashMap(15); // Should be a reasonable guess.
} }

View File

@ -27,6 +27,7 @@
<menu-item label="POIFS" href="poifs/index.html"/> <menu-item label="POIFS" href="poifs/index.html"/>
<menu-item label="HSSF" href="hssf/index.html"/> <menu-item label="HSSF" href="hssf/index.html"/>
<menu-item label="HDF" href="hdf/index.html"/> <menu-item label="HDF" href="hdf/index.html"/>
<menu-item label="HPSF" href="hpsf/index.html"/>
<menu-item label="POI-Utils" href="utils/index.html"/> <menu-item label="POI-Utils" href="utils/index.html"/>
</menu> </menu>

View File

@ -0,0 +1,16 @@
<?xml version="1.0"?>
<!DOCTYPE book PUBLIC "-//APACHE//DTD Cocoon Documentation Book V1.0//EN" "../dtd/book-cocoon-v10.dtd">
<book software="POI Project"
title="HPSF"
copyright="@year@ POI Project">
<menu label="Navigation">
<menu-item label="Main" href="../index.html"/>
<menu-item label="How To" href="how-to.html"/>
<menu-item label="Internals" href="internals.html"/>
</menu>
</book>

View File

@ -0,0 +1,17 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE document PUBLIC "-//APACHE//DTD Documentation V1.0//EN" "../dtd/document-v10.dtd">
<document>
<header>
<title>HPSF HOW-TO</title>
<authors>
<person name="Rainer Klute" email="klute@rainer-klute.de"/>
</authors>
</header>
<body>
<s1 title="How To Use the HPSF APIs">
<p class="todo">TODO: This documentation is still to be written. For the
time being, please see the API documentation (javadocs) of the
<code>org.apache.poi.hpsf</code> package.</p>
</s1>
</body>
</document>

View File

@ -0,0 +1,16 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE document PUBLIC "-//APACHE//DTD Documentation V1.0//EN" "../dtd/document-v10.dtd">
<document>
<header>
<title>HPSF (Horrible Property Set Format)</title>
<subtitle>Overview</subtitle>
<authors>
<person name="Rainer Klute" email="klute@rainer-klute.de"/>
</authors>
</header>
<body>
<s1 title="Overview">
<p class="todo">TODO: This documentation is still to be written.</p>
</s1>
</body>
</document>

View File

@ -0,0 +1,17 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE document PUBLIC "-//APACHE//DTD Documentation V1.0//EN" "../dtd/document-v10.dtd">
<document>
<header>
<title>HPSF Internals</title>
<authors>
<person name="Rainer Klute" email="klute@rainer-klute.de"/>
</authors>
</header>
<body>
<s1 title="HPSF Internals">
<p class="todo">TODO: This documentation is still to be written. For the
time being, please see <link
href="http://www.rainer-klute.de/~klute/Software/poibrowser/doc/HPSF-Description.html">http://www.rainer-klute.de/~klute/Software/poibrowser/doc/HPSF-Description.html</link>.</p>
</s1>
</body>
</document>

View File

@ -27,7 +27,7 @@
XLS format; and <link href="http://jakarta.apache.org/lucene">Lucene</link> for which we'll soon have file XLS format; and <link href="http://jakarta.apache.org/lucene">Lucene</link> for which we'll soon have file
format interpretors. When practical, we donate components directly to those projects for POI-enabling them. format interpretors. When practical, we donate components directly to those projects for POI-enabling them.
</p> </p>
<s2 title="Why/when would I use POI"> <s2 title="Why/when would I use POI?">
<p> <p>
We'll tackle this on a component level. POI refers to the whole project. We'll tackle this on a component level. POI refers to the whole project.
</p> </p>
@ -70,31 +70,40 @@
<s1 title="Components To Date"> <s1 title="Components To Date">
<s2 title="Overview"> <s2 title="Overview">
A common misconception is that POI writes Excel files. POI is the name of the project. POI contains several <p>A common misconception is that POI writes Excel files. POI is the name of the project. POI contains several
components, one of which, HSSF, writes Excel files. The following are components of the entire POI project components, one of which, HSSF, writes Excel files. The following are components of the entire POI project
and a brief summary of their purpose. and a brief summary of their purpose.</p>
</s2> </s2>
<s2 title="POIFS"> <s2 title="POIFS (POI Filesystem)">
POIFS is the oldest and most stable part of the project. It is our port of the OLE 2 Compound Document Format to <p>POIFS is the oldest and most stable part of the project. It is our port of the OLE 2 Compound Document Format to
pure Java. It supports both read and write functionality. All of our components ultimately rely on it by pure Java. It supports both read and write functionality. All of our components ultimately rely on it by
definition. Please see <link href="./poifs/index.html">the POIFS project page</link> for more information. definition. Please see <link href="./poifs/index.html">the POIFS project page</link> for more information.</p>
</s2> </s2>
<s2 title="HSSF"> <s2 title="HSSF (Horrible Spreadsheet Format)">
HSSF is our port of the Microsoft Excel 97(-2002) file format (BIFF8) to pure Java. It supports read and write <p>HSSF is our port of the Microsoft Excel 97(-2002) file format (BIFF8) to pure Java. It supports read and write
capability. Please see <link href="./hssf/index.html">the HSSF project page</link> for more information. capability. Please see <link href="./hssf/index.html">the HSSF project page</link> for more information.</p>
</s2> </s2>
<s2 title="HDF"> <s2 title="HDF (Horrible Document Format)">
HDF is our port of the Microsoft Word 97 file format to pure Java. It supports read and write capability. <p>HDF is our port of the Microsoft Word 97 file format to pure Java. It supports read and write capability.
Please see <link href="./hdf/index.html">the HDF project page for more information</link>. This component is Please see <link href="./hdf/index.html">the HDF project page for more information</link>. This component is
in the early stages of design. Jump in! in the early stages of design. Jump in!</p>
</s2>
<s2 title="HPSF (Horrible Property Set Format)">
<p>HPSF is our port of the OLE 2 property set format to pure
Java. Property sets are mostly use to store a document's properties
(title, author, date of last modification etc.), but they can be used
for application-specific purposes as well. Currently HPSF supports
read functionality only. Please see <link
href="./hpsf/index.html">the HPSF project page</link> for more
information.</p>
</s2> </s2>
</s1> </s1>
<s1 title="What happened to the HSSF Serializer?"> <s1 title="What happened to the HSSF Serializer?">
The HSSF Serializer, which was part of our 1.0 release and last builds on <p>The HSSF Serializer, which was part of our 1.0 release and last builds on
<link href="http://www.sourceforge.net/projects/poi">Sourceforge</link>, has been donated to the Cocoon project. We're <link href="http://www.sourceforge.net/projects/poi">Sourceforge</link>, has been donated to the Cocoon project. We're
currently in the process of porting it over. currently in the process of porting it over.</p>
</s1> </s1>
<s1 title="Contributing "> <s1 title="Contributing ">

View File

@ -43,6 +43,13 @@
</p> </p>
</s2> </s2>
<s2 title="HPSF">
<p>
<link href="hpsf/index.html">HPSF</link> is the set of APIs
for reading property sets using (only) Java.
</p>
</s2>
<s2 title="POI-Utils"> <s2 title="POI-Utils">
<p> <p>
<link href="utils/index.html">POI-Utils</link> are general purpose artifacts <link href="utils/index.html">POI-Utils</link> are general purpose artifacts

View File

@ -48,6 +48,7 @@
<ul> <ul>
<li>Glen Stampoultzis (glens at apache.org)</li> <li>Glen Stampoultzis (glens at apache.org)</li>
<li>Nicola Ken Barozzi (barozzi at nicolaken dot com)</li> <li>Nicola Ken Barozzi (barozzi at nicolaken dot com)</li>
<li>Rainer Klute (klute at rainer-klute dot de)</li>
</ul> </ul>
</s2> </s2>
</s1> </s1>