Thomas,

Thanks a lot for your feedback. 
So what I need to do implement a HTML css engine based
on the abstract CSS engine in Batik?

1. come up a ValueManager for HTML CSS.
2. come up a ShortHandManager for HTML css.

anything else?

Thanks for your help again.
Sam


-----Original Message-----
From: Thomas E Deweese
[mailto:[EMAIL PROTECTED]]
Sent: Wednesday, August 28, 2002 6:30 AM
To: Batik Users
Subject: Using Batik as a HTML CSS engine


>>>>> "SC" == Sam Cheung <[EMAIL PROTECTED]>
writes:

SC> Hi, I am interested in using Batik as a HTML CSS
engine.  There is
SC> an abstract CSSEngine class, which has a
constructor taking
SC> ValueManager, Shorthandmanager as parameters.

SC> Could someone please tell me what is the purpose
of those
SC> managers? Are those SVG specified? If I build a
CSS engine for
SC> HTML CSS in general, how should I implmenet the
ValueManager and
SC> ShorthandManager?

    So roughly speaking a ValueManager handles
converting the text of
a particular property (like 'width') to it's CSS Value
(Stephane wrote
all this stuff but he's been busy lately so please
excuse looseness of
CSSness here :).  If you look in the
batik/css/engine/value subtree
Batik already provides ValueManagers for many common
CSS types (some
may need rework to handle differences between SVG &
HTML - In
particular lengths).

    I believe ShorthandManager is for CSS shorthand
properties (like
'margin' is a shorthand for setting 'margin-top',
'margin-left', ...).
The only example currently in Batik seems to be the
'marker' property
see
'batik.css.engine.value.svg.MarkerShorthandManager'.

    If you look at the examples already in Batik most
of them are
fairly straight forward to implement.  Some of them
can be a bit
harder (like percentages for lengths).  Still given
the complexity of
proper CSS handling (cascade, computed values, rule
matching, etc.) I
don't think this could be made any easier.

    BTW you had asked how to lookup the style on an
element, I think
the method you wanted was
'CSSEngine.getCascadedStyleMap', to use the
result you will also want to use
CSSEngine.getPropertyIndex().

    Good luck.

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


__________________________________________________
Do You Yahoo!?
Yahoo! Finance - Get real-time stock quotes
http://finance.yahoo.com

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

Reply via email to