You are viewing a plain text version of this content. The canonical link for it is here.
Posted to fop-dev@xmlgraphics.apache.org by COFFMAN Steven <SC...@CBSINC.com> on 2000/05/05 18:17:17 UTC

NumberOutput in wrong package?

I had used the same method in PDFShading, PDFFunction, PDFPattern, and
PDFColor, 
namely doubleOut(double doubleDown). This method is used to prettily format
a decimal number as a string that PDF won't cough and choke on.

Having the same duplicate code in four places seemed silly, so I wrote a
class, NumberOutput which has no members, and 
only contains the doubleOut method (two versions, one for Double, another
for double). However, since it's only really relevant to PDF classes, but
does not inherit from PDFObject, I was trying to decide whether
org.apache.fop.pdf or org.apache.fop.datatypes was the correct place for it.

What do you think?
-Steve

Re: NumberOutput in wrong package?

Posted by Arved Sandstrom <Ar...@chebucto.ns.ca>.
Hi, Steven

How about establishing a new package for it: org.apache.fop.pdf.util?

I think that org.apache.fop.datatypes is best retained for handling 
traits/properties.

I don't have a very strong opinion on this, though.

Arved
 
At 12:17 PM 5/5/00 -0400, Steven Coffman wrote:
>I had used the same method in PDFShading, PDFFunction, PDFPattern, and
>PDFColor, 
>namely doubleOut(double doubleDown). This method is used to prettily format
>a decimal number as a string that PDF won't cough and choke on.
>
>Having the same duplicate code in four places seemed silly, so I wrote a
>class, NumberOutput which has no members, and 
>only contains the doubleOut method (two versions, one for Double, another
>for double). However, since it's only really relevant to PDF classes, but
>does not inherit from PDFObject, I was trying to decide whether
>org.apache.fop.pdf or org.apache.fop.datatypes was the correct place for it.
>
>What do you think?
>-Steve
>
>