xmlgraphics-batik-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Bishop, Michael W. CONTR J9C880" <Michael.Bis...@je.jfcom.mil>
Subject RE: Background of the JSVGCanvas?
Date Tue, 08 Nov 2005 04:00:55 GMT
Hi Thomas,
 
I've used Borders for buttons, but what I want is a border for the SVGDocument, not the actual
JComoponent.  I'm envisioning an application like Paint, Photoshop, or Word where your actual
document area is clearly offset from your "dead" space; usually with a border or shadow effect.
   Putting a border on the actual document isn't desired because I don't want to save it with
the document and that starts to get messy.  I think the subclassing may be the way to go;
I'd assumed calling super.paintComponent() would end up overriding anything I did beforehand.
 
Michael Bishop

________________________________

From: thomas.deweese@kodak.com [mailto:thomas.deweese@kodak.com]
Sent: Mon 11/7/2005 6:33 PM
To: batik-users@xmlgraphics.apache.org
Subject: Re: Background of the JSVGCanvas?



Hi Michael,

"Bishop, Michael W. CONTR J9C880" <Michael.Bishop@je.jfcom.mil> wrote on
11/07/2005 03:47:45 PM:

> Is there a way to get a better background for the JSVGCanvas?  What I?d
like
> to do is instead of setting a solid background, I?d like to have some
kind of
> pattern or maybe some kind of shadow border to offset the actual
document from
> the canvas.

   You might want to read the following Java tutorial:

        http://java.sun.com/docs/books/tutorial/uiswing/misc/border.html

>  This may very well be a generic JComponent question but I figured I?d
ask.

   You could also override paintComponent on a subclass of JSVGCanvas and
have
it draw your background first then call 'super.paintComponent'.  This
would
be needed to have a pattern background (or you could just add a rect with
a
pattern to the document).


---------------------------------------------------------------------
To unsubscribe, e-mail: batik-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: batik-users-help@xmlgraphics.apache.org



Mime
View raw message