Greetings,
I'm just getting aquainted with ECS (v1.3.3) and I have a concern
about the implementation of pretty printing. While trying to debug
some of my table-generation code, I came across the pretty printing
option in the package. First of all, I could not find a way to turn
this option on when using the Document class. I tried things like:
Document doc = new Document();
doc.getHtml().setPrettyPrint(true);
But that seems to have no effect. I was able to get pretty printing
working by editing the ecs.properties file and re-building the .jar
file. With that corrected, my HTML is now much more readable and I
managed to get my tables mostly working.
However pretty printing seems to cause some problems with <PRE> tags.
I'm using PRE elements to generate fixed-width content for my table
rows. (This application is for protein sequence alignment.)
Additionally, my PRE text includes several FONT elements to change
font color for certain parts of the text (sequence mis-alignments, if
you are curious.) I am constructing my tables like so:
Table table = new Table();
ElementContainer ec = new ElementContainer();
Font font = new Font().setColor(HtmlColor.RED);
font.addElement("ABC");
ec.addElement(font);
font = new Font().setColor(HtmlColor.BLACK);
font.addElement("DEF");
ec.addElement(font);
table.addElement(new TR(new PRE(ec)));
This code works great when pretty printing is turned off. However
once I turn pretty printing on, each of the elements I add to a
container gets a newline appended to it, which wreaks havoc with
anything inside a <PRE> block. In my opinion, pretty printing should
NOT append newlines to PRE objects. Of course this is only my second
day with ECS, so perhaps the more veteran users will have another
opinion. What say y'all?
Thanks for your time.
PS: Does anyone know of a good way to search the mailing list
archives? The apache site has links to the digests, but no obvious
way to search them, short of clicking on each link and using the
browser's built-in seach facility. It would be handy to be able to
search ALL the apache mailing lists for certain keywords.
--
George Armhold
Rutgers University
Bioinformatics Initiative
--
------------------------------------------------------------
To subscribe: [EMAIL PROTECTED]
To unsubscribe: [EMAIL PROTECTED]
Archives and Other: <http://java.apache.org/main/mail.html>
Problems?: [EMAIL PROTECTED]