Looks good.  We've been looking to get exactly this sort of thing
in our app, and I was about to start looking into creating a component
just like this.  I guess you've beat me to it!  Once you have something
available, I'd like to play around with it... but just from the attached
image and quick usage example, it looks just like what we need.

Dave

-----Original Message-----
From: Andrew Robinson [mailto:[EMAIL PROTECTED] 
Sent: Thursday, June 14, 2007 7:18 PM
To: MyFaces Development
Subject: [sandbox] new component idea: rounded corners

I have created code that can be run from a phase listener or servlet
that can generate nicely rendered PNG images with highlighted beveled
edges. The idea is to be able to dynamically create a DIV tag with
images in the corners and sides that can stretch to create a nice
rounded corner background image effect that works on CSS2 compliant
browsers as well as IE6 (with alpha-transparency IE6 CSS specific
code).

Attributes:
color: the foreground color of the div (required)
backgroundColor: the background color of the div (optional, defaults
to transparent)
borderColor: instead of 3D highlighting, use a solid rounded border of
this color
borderWidth: if 3D, the size of the bevel (highlight). If 2D
(borderColor set), the thickness of the line. Default: 8
size: specify a specific WxH of the image. When given, just acts as a
background image with no repeat an no support for stretching. Default
is to have images generated for each corner, side and the center and
have CSS position them to support resizing
radius: the radius, in pixels, of the rounded corners. default: 8

See example result (attached) which is a 200x200 image with 20px
border width & 20px radius

Usage:

<s:roundedDiv color="red" style="padding: 8px;">
  <h:outputText value="Hello world!" />
</s:roundedDiv>

Any comments?

I have 2 questions on this as well:
1) How should I implement the image generation code: new servlet, new
phase listener, part of the extensions filter or other idea?
2) This requires browser detection of IE6. I can easily use a regex on
the user agent, but am wondering if there is already any browser
detection code in tomahawk or a 3rd party library that I can leverage
that is compatible with the apache license.

Thanks,
Andrew
The information transmitted herewith is sensitive      information of Chordiant 
Software or its customers and is intended only for use to the individual or 
entity to which it is addressed. If the reader of this message is not the 
intended recipient, you are hereby notified that any review, retransmission, 
dissemination, distribution, copying or other use of, or taking of any action 
in reliance upon, this information is strictly prohibited. If you have received 
this communication in error, please contact the sender and delete the material 
from your computer.

Reply via email to