jakarta-ecs-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Nemesh, Jim" <JNem...@genecoop.com>
Subject RE: Help for a new user - Working with elements
Date Thu, 11 Apr 2002 14:48:26 GMT

> -----Original Message-----
> From: Jeremy W. Redmond [mailto:jwr03@health.state.ny.us]
> Sent: Thursday, April 11, 2002 8:00 AM
> To: ECS Users List
> Subject: Re: Help for a new user - Working with elements
> Posting the code snippet that you are trying might be helpful.

	Here's the basic idea:

	 TD data = new TD("Foo");
       TD format = new TD();
	 Enumeration formatEKeys = format.attributes();
	 while (formatEKeys.hasMoreElements()) {
            String o = (String) formatEKeys.nextElement();
            System.out.println (o);            
            String value = format.getAttribute(o);
            System.out.println (value);
		// do something to create an element with these values and
add it to data.

	This should take the format information (backround color) from the
TD object, and put it in the first TD object.

	The question is, what goes after the comment line?  Should I be
making a
ConcreteElement, or GenericElement?  If so, how would I go about doing this?

	Why am I doing this?  I'm building some generic ways to create
tables from other objects
and provide ways to format the cells and rows of the tables after the TD
objects have already 
been created, or provide multiple levels of formatting (for example one test
would say that if
the data included the word "Foo", the backround would be red, and if the
data contained the word
"Bar" as well, it would do something else.)

	-Jim Nemesh

To unsubscribe, e-mail:   <mailto:ecs-user-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:ecs-user-help@jakarta.apache.org>

View raw message