logo       

Re: Mix SVG and Swing components: msg#00016

Subject: Re: Mix SVG and Swing components
Hi Venkataramana,

   You might want to talk with Lukasz as he appears to be working
on this issue as well.

Venkataramana_Jaladurgam wrote:

Thanks for the suggestion. The problem with this approach is the swing
components will not be scalable. I have created a class that extends AbstractGraphicsNode to display the
swing component.

[...]

The button's foreground and background color are changed only when mouse
button is released. I expected that the color of the button will change
immediately when the mouse button is pressed.

Any issues in the program? Any workarounds? Glad to know.

   What you need to do is figure out how to tie the Swing
'repaint' request system into the GVT 'update' system.
Since I don't know the details of the Swing system I can't
really help that much.

   See my response to Lukasz (mail archives) as it provides
some hints.

-----Original Message-----
From: Tonny Kohar [mailto:tonny@xxxxxxxxx]
Sent: Wednesday, January 19, 2005 9:16 PM
To: 'batik-dev@xxxxxxxxxxxxxx'
Subject: Re: Mix SVG and Swing components


Hi,


 I am required to add Swing components to the SVG canvas. I want to use

the

batik extensions.
The trouble I am facing is in the actual rendering class:


The output I am getting in the JSVGCanvas is a static version of

JTextField.

I cannot enter characters or do anything with it. Any ideas? I believe if I can access JSVGCanvas or the related class where
the components are being rendered, then I can directly add my swing
component to it. But couldn't get how to get it. Batik developers pls.

help.

I do not know how to solve your problem, but as far as I know the batik
GVT part is render the SVG stuff into Image that will be painted into
the JSVGCanvas. The package org.apache.batik.gvt.renderer is where the
rendering stuff.

How about extending JSVGCanvas or its parent paintComponent method and
adding your textField there. Or maybe wrap JSVGCanvas and your textfield
into custom component and using Java JComponent layer or z-order
capability.

Regards
Tonny Kohar


<Prev in Thread] Current Thread [Next in Thread>
Google Custom Search

Recently Viewed:
boot-loaders.gr...    php.pear.genera...    debugging.valgr...    kde.redhat.user...    text.xml.xsl.ge...    culture.languag...    hardware.microc...    java.servicemix...    redhat.release....    web.zope.plone....    user-groups.lin...    opendarwin.webk...    video.mjpeg.use...    sysutils.bcfg2....    encryption.gpg....    lx-office.devel...    xfree86.forum/2...    mail.mutt.devel...    acpi.devel/2003...    qnx.openqnx.dev...    network.irc.irs...    freebsd.devel.m...   
Home | blog view | USPTO Patent Archive | advertise | OSDir is an inevitable website. super tiny logo

Free Magazines

Cisco News
Receive a free quarterly e-newsletter with exclusive articles on how Cisco IT uses its own products and solutions to enable the business.
subscribe

Systems Management News, the newspaper for IT systems administration and data center managers! Each issue of Systems Management News is chock-full of news and analysis to help you understand what's happening in your field.
subscribe

The Enterprise Newsweekly eWeek is the essential technology information source for builders of e-business.
subscribe

Oracle Magazine Oracle Magazine contains technology strategy articles, sample code, tips, Oracle and partner news, how to articles for developers and DBAs, and more. Oracle (NASDAQ: ORCL) is the world's largest enterprise software company.
subscribe

Total Telecom Total Telecom is "The Economist of the communications industry".
subscribe