BlackBerry Forums Support Community
              

Closed Thread
 
LinkBack Thread Tools
Old 02-08-2010, 01:56 AM   #1 (permalink)
New Member
 
Join Date: Feb 2010
Model: 9700
PIN: N/A
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.

Code:
public void paint(net.rim.device.api.ui.Graphics graphics)
{
            super.paint(graphics);

            // Make sure image is non-null
            if (_image == null)
            {
                return;
            }

            // Bind target Graphics 
            _scalableGraphics.bindTarget(graphics);

            // Set the viewport  dimensions         
            _image.setViewportWidth(MAX_WIDTH);
            _image.setViewportHeight(MAX_HEIGHT);

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

            // Release bindings on Graphics       
            _scalableGraphics.releaseTarget();
}
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  
Old 02-12-2010, 06:42 AM   #2 (permalink)
New Member
 
Join Date: Dec 2009
Model: 8330
PIN: N/A
Carrier: airtel
Posts: 1
Post Thanks: 0
Thanked 0 Times in 0 Posts
Default two images for on and off button

you better write code for navigationclick() function . you set two images one is for on button and one for off button set off image by default and set on image in navigationclick() event...........
Offline  
Closed Thread


Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

10uF 6.3V 20% X5R SMD-0805 Capacitors - Samsung CL21A106MQNE - Reel of 2000
$18.99
10uF 6.3V 20% X5R SMD-0805 Capacitors - Samsung CL21A106MQNE - Reel of 2000 picture100pF 25V 5% NPO SMD-0201 Capacitors - Samsung CL03C101JA3ANNC - Reel of 10000
$24.99
100pF 25V 5% NPO SMD-0201 Capacitors - Samsung CL03C101JA3ANNC - Reel of 10000 picture5 PCS New IC WTR1605L WTR1605 for Samsung N7105 S ny LT36I IF
$7.99
5 PCS New IC WTR1605L WTR1605 for Samsung N7105 S ny LT36I IF pictureKA556 IC OSC TIMER DUAL 14-DIP 100 Pcs. 555 Type
$24.99
KA556 IC OSC TIMER DUAL 14-DIP 100 Pcs. 555 Type pictureSamsung K4W2G1646Q-BC11
$4.0
Samsung K4W2G1646Q-BC11 picture






Copyright 2004-2016 BlackBerryForums.com.
The names RIM and BlackBerry are registered Trademarks of BlackBerry Inc.