I have this working great.  Thanks. 

I'd something slightly different, I ended up passing "hidden" along as a
text decoration trait, and then I suppress its output in the render stage.
The only issue is that the line area is still accounting for the space of
the text, and the code that generates line area is hard to follow.  Where do
I go to make line area ignore my hidden text?
--Jay

Jay Di Silvestri
Director of Business Development,
Content Services Group
SoftQuad
1310 Redwood Way, Suite 120
Petaluma, CA 94954
(800) 932-7404
[EMAIL PROTECTED] 



-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
Sent: Saturday, May 26, 2001 1:01 PM
To: [EMAIL PROTECTED]
Subject: Re: PropertyMapping?


Hi, Jay

If the property on the FO has become a trait on the area(s), then it will be
available in the corresponding render* method. The solution here is to make
sure
you place a trait on the area(s) in question.

You will want to capture the 'sq' property in the Inline constructor. Then,
when
addCharacters(0 is called with text to create a new FOText, you want to pass
that to each affected FOText. Likely with a setter that you add to FOText,
which
will also have this property defined (as a class, that is, not as an FO).

At layout time, you want to pass the state of the 'sq' property in FOText
into
the current LineArea, probably as an extra parameter to addText() on
LineArea.
LineArea can use that in its addText() method to suitably set a trait on
each
affected WordArea.

What you end up with are WordAreas, being passed to renderWordArea, that can
be
tested to see of they have this 'sq' trait set or cleared.

Hope this makes sense. You're talking about some extra simple methods and
instance variables, likely less than an hour's worth of coding and testing.

Regards,
Arved Sandstrom

Quoting Jay Di Silvestri <[EMAIL PROTECTED]>:

> I'm trying suppress the printing of some text based on a conditional, so
> I'm
> goofing around with the source to try that.  I added  a line to
> FOPropertyMapping.java :
>     s_htGeneric.put("sq", SoftQuadMaker.maker("sq"));
> and I created a SoftQuad.java file and SoftQuadMaker.java file that seem
to
> executeing. 
> The parser now seems to accept this syntax <fo:inline sq=hidden . . .
> 
> I want to test for this property at the render stage.  How do I do that?
> 
> Jay Di Silvestri
> Director of Business Development,
> Content Services Group
> SoftQuad
> 1310 Redwood Way, Suite 120
> Petaluma, CA 94954
> (800) 932-7404
> [EMAIL PROTECTED] 
> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, email: [EMAIL PROTECTED]
> 


---------------------------------------------------------------
 This mail was sent through the Nova Scotia Provincial Server, 
 with technical resources provided by Chebucto Community Net.
 http://nsaccess.ns.ca/mail/         http://www.chebucto.ns.ca/


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, email: [EMAIL PROTECTED]

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, email: [EMAIL PROTECTED]

Reply via email to