View Single Post
Old 02-08-2010, 12:56 AM   #1 (permalink)
New Member
Join Date: Feb 2010
Model: 9700
Carrier: Telstra
Posts: 3
Post Thanks: 0
Thanked 0 Times in 0 Posts
Default SVG Buttons from Plazmic Composer in Java Apps

Please Login to Remove!

Hi guys,

I need help on the following.

I created an svg file containing a rectangle button using the Plazmic Composer.

I so far managed to display it via the following way (which I'm not sure is correct), using ScalableGraphics overriding the void paint() method.

public void paint(net.rim.device.api.ui.Graphics graphics)

            // Make sure image is non-null
            if (_image == null)

            // Bind target Graphics 

            // Set the viewport  dimensions         

            // Render the svg image/ model
            _scalableGraphics.render(0, 0, _image);

            // Release bindings on Graphics       
My only problem is, how do I get the button to be focused or activated. All it does at the moment is to display a static SVG file with the buttons. I've made the focus in/out animations for the buttons, but nothing happens.

What I'd like to accomplish is to write custom Java code for button click events utilizing focus in/out animations already in the svg file (rather than using java to render individual images).

Any help would be much appreciated! Thank you!
Offline   Reply With Quote