Skip to main content

Using SVG in J2ME

11 replies [Last post]
dexterfyp
Offline
Joined: 2007-08-08

Dear Java Community,

I m currently doing a project using J2ME and i would wish to use SVG for my UI. My current IDE is NetBeans and i understand that SVG does not support user input like text field (correct me if i m wrong). As such i was thinking of using SVG for basic menus and then using forms whenever i need input. Is this the right approach? Or can i somehow embed text field in SVG?

Any help is greatly appreciated because i m really new to J2ME and mobile development. Thanks in advance!!

Regards,

Dexter

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
dingbig

meinterest@MOBILEANDEMBEDDED.ORG 写道:
> Probably a more important consideration than the fact that you can do cool things with SVG is will it provide you with enough supported devices to make the application commercially viable enough. Will it enable you to reach your target market with only a small number of supported devices, as some mobile phone users do not have the latest and greatest phones.
>
> Even if you are not doing this as a commercial project it is still an important consideration for a student to get into the habit of thinking.
> [Message sent by forum member 'vedanuzal' (vedanuzal)]
>
> http://forums.java.net/jive/thread.jspa?messageID=230365
>
> ===========================================================================
> To unsubscribe, send email to listserv@java.sun.com and include in the body
> of the message "signoff KVM-INTEREST". For general help, send email to
> listserv@java.sun.com and include in the body of the message "help".
>
>
IS THIS FORUM DEAD?

===========================================================================
To unsubscribe, send email to listserv@java.sun.com and include in the body
of the message "signoff KVM-INTEREST". For general help, send email to
listserv@java.sun.com and include in the body of the message "help".

charlesvc
Offline
Joined: 2006-05-26

Hi This is Charles

I am too building an application in j2me. first time i created the UI on a form, then CustomItem, now with Canvas and KXML parsers.

Now I am looking forward to use SVG in UI design, but as per your request, You try to make UI designs with SVG and make it in Canvas, and it is not possible to insert into form at my knowledge.

And SVG is an XML based format and you should open the file inside midlet using viewer then the midlet will parse and automatically drawn to canvas.
and then u learn about how to make designs in SVG it is not related to j2me
first do that then use midlet to open the file then u will get cool ui graphics in canvas

vedanuzal
Offline
Joined: 2006-11-14

Probably a more important consideration than the fact that you can do cool things with SVG is will it provide you with enough supported devices to make the application commercially viable enough. Will it enable you to reach your target market with only a small number of supported devices, as some mobile phone users do not have the latest and greatest phones.

Even if you are not doing this as a commercial project it is still an important consideration for a student to get into the habit of thinking.

Robin Chaddock

SVG isn't impossible to implement on handsets without native SVG
support..... though it might be impracticably slow.

----- Original Message -----
From:
To:
Sent: Friday, August 10, 2007 2:40 AM
Subject: Re: Using SVG in J2ME

> Probably a more important consideration than the fact that you can do cool
> things with SVG is will it provide you with enough supported devices to
> make the application commercially viable enough. Will it enable you to
> reach your target market with only a small number of supported devices, as
> some mobile phone users do not have the latest and greatest phones.
>
> Even if you are not doing this as a commercial project it is still an
> important consideration for a student to get into the habit of thinking.
> [Message sent by forum member 'vedanuzal' (vedanuzal)]
>
> http://forums.java.net/jive/thread.jspa?messageID=230365
>
> ===========================================================================
> To unsubscribe, send email to listserv@java.sun.com and include in the
> body
> of the message "signoff KVM-INTEREST". For general help, send email to
> listserv@java.sun.com and include in the body of the message "help".
>

________________________________________________________________________
E-mail is an informal method of communication and may be subject to data corruption, interception and unauthorised amendment for which I-play, a trading name of Digital Bridges Ltd will accept no liability. Therefore, it will normally be inappropriate to rely on information contained on e-mail without obtaining written confirmation.

This e-mail may contain confidential and/or privileged information. If you are not the intended recipient (or have received this e-mail in error) please notify the sender immediately and destroy this e-mail. Any unauthorized copying, disclosure or distribution of the material in this e-mail is strictly forbidden.

(C) 2005. I-play is a trademark and trading name of Digital Bridges Limited. All Rights Reserved.
________________________________________________________________________
This message has been checked for all known viruses by the
MessageLabs Virus Scanning Service. For further information visit
http://www.messagelabs.com/stats.asp

===========================================================================
To unsubscribe, send email to listserv@java.sun.com and include in the body
of the message "signoff KVM-INTEREST". For general help, send email to
listserv@java.sun.com and include in the body of the message "help".

Robin Chaddock

A good technical exercise for a student :)

----- Original Message -----
From: "Robin Chaddock"
To:
Sent: Friday, August 10, 2007 1:39 PM
Subject: Re: Using SVG in J2ME

> SVG isn't impossible to implement on handsets without native SVG
> support..... though it might be impracticably slow.
>
> ----- Original Message -----
> From:
> To:
> Sent: Friday, August 10, 2007 2:40 AM
> Subject: Re: Using SVG in J2ME
>
>
>> Probably a more important consideration than the fact that you can do
>> cool
>> things with SVG is will it provide you with enough supported devices to
>> make the application commercially viable enough. Will it enable you to
>> reach your target market with only a small number of supported devices,
>> as
>> some mobile phone users do not have the latest and greatest phones.
>>
>> Even if you are not doing this as a commercial project it is still an
>> important consideration for a student to get into the habit of thinking.
>> [Message sent by forum member 'vedanuzal' (vedanuzal)]
>>
>> http://forums.java.net/jive/thread.jspa?messageID=230365
>>
>> ===========================================================================
>> To unsubscribe, send email to listserv@java.sun.com and include in the
>> body
>> of the message "signoff KVM-INTEREST". For general help, send email to
>> listserv@java.sun.com and include in the body of the message "help".
>>
>
>
> ________________________________________________________________________
> E-mail is an informal method of communication and may be subject to data
> corruption, interception and unauthorised amendment for which I-play, a
> trading name of Digital Bridges Ltd will accept no liability. Therefore,
> it will normally be inappropriate to rely on information contained on
> e-mail without obtaining written confirmation.
>
> This e-mail may contain confidential and/or privileged information. If you
> are not the intended recipient (or have received this e-mail in error)
> please notify the sender immediately and destroy this e-mail. Any
> unauthorized copying, disclosure or distribution of the material in this
> e-mail is strictly forbidden.
>
> (C) 2005. I-play is a trademark and trading name of Digital Bridges
> Limited. All Rights Reserved.
> ________________________________________________________________________
> This message has been checked for all known viruses by the
> MessageLabs Virus Scanning Service. For further information visit
> http://www.messagelabs.com/stats.asp
>
> ===========================================================================
> To unsubscribe, send email to listserv@java.sun.com and include in the
> body
> of the message "signoff KVM-INTEREST". For general help, send email to
> listserv@java.sun.com and include in the body of the message "help".
>

________________________________________________________________________
E-mail is an informal method of communication and may be subject to data corruption, interception and unauthorised amendment for which I-play, a trading name of Digital Bridges Ltd will accept no liability. Therefore, it will normally be inappropriate to rely on information contained on e-mail without obtaining written confirmation.

This e-mail may contain confidential and/or privileged information. If you are not the intended recipient (or have received this e-mail in error) please notify the sender immediately and destroy this e-mail. Any unauthorized copying, disclosure or distribution of the material in this e-mail is strictly forbidden.

(C) 2005. I-play is a trademark and trading name of Digital Bridges Limited. All Rights Reserved.
________________________________________________________________________
This message has been checked for all known viruses by the
MessageLabs Virus Scanning Service. For further information visit
http://www.messagelabs.com/stats.asp

===========================================================================
To unsubscribe, send email to listserv@java.sun.com and include in the body
of the message "signoff KVM-INTEREST". For general help, send email to
listserv@java.sun.com and include in the body of the message "help".

dexterfyp
Offline
Joined: 2007-08-08

Yes, thanks for e post to all! For now i shall stick with using forms and switching between SVG using netbeans mobility pack. I m quite sure there is some good practices that people are using to maintain consistency between forms and SVG. Anyone know of any good practice guidelines?

Also, i m really fascinated by twuik technologies and their UI engine? how exactly do they achieve such cool UI forms? Please enlighten me! Thanks in advance!

Regards,

Dexter

terrencebarr
Offline
Joined: 2004-03-04

Hi,

Please also see my other response:

http://forums.java.net/jive/thread.jspa?threadID=29559&tstart=0

SVG images are drawn on a Canvas and lcdui widgets are based on Forms and unfortunately you cannot mix the two approaches easily.

You could build a MIDP 2.0 CustomItem that displays a SVG image and layout that CustomItem on a Form together with lcdui elements such as TextField. However, the standard MIDP layout manager will prevent these elements from overlapping and so the results may not be very visually appealing.

If you really want a full-blown SVG-based look & feel you will need to create SVG-based widgets for all the functionality you need and skip lcdui altogether.

-- Terrence

dexterfyp
Offline
Joined: 2007-08-08

Hi Terence,

Thanks for your reply! Will certainly check it out and update you all on my progress! Much appreciated!

Regards,

Dexter

foo shyn

Hi,

SVG is a type of graphic format (vector type), so i'm guessing that what
you are trying to refer to is the Canvas class, pardon me if i'm wrong.

If you're new to J2ME then perhaps it is best that you try out with the
form class first, Canvas drawing can really be a pain if you want to use
user input :p

Thanx.
FooShyn

meinterest@MOBILEANDEMBEDDED.ORG wrote:
> Dear Java Community,
>
> I m currently doing a project using J2ME and i would wish to use SVG for my UI. My current IDE is NetBeans and i understand that SVG does not support user input like text field (correct me if i m wrong). As such i was thinking of using SVG for basic menus and then using forms whenever i need input. Is this the right approach? Or can i somehow embed text field in SVG?
>
> Any help is greatly appreciated because i m really new to J2ME and mobile development. Thanks in advance!!
>
> Regards,
>
> Dexter
> [Message sent by forum member 'dexterfyp' (dexterfyp)]
>
> http://forums.java.net/jive/thread.jspa?messageID=230104
>
> ===========================================================================
> To unsubscribe, send email to listserv@java.sun.com and include in the body
> of the message "signoff KVM-INTEREST". For general help, send email to
> listserv@java.sun.com and include in the body of the message "help".
>
>
>
>

===========================================================================
To unsubscribe, send email to listserv@java.sun.com and include in the body
of the message "signoff KVM-INTEREST". For general help, send email to
listserv@java.sun.com and include in the body of the message "help".

dexterfyp
Offline
Joined: 2007-08-08

Hi Foo Shyn,

Thanks for your reply! I m too sure if its the canvas class or anything. =( i m basically using the mobility pack in netbeans in which there are drag and drop of forms and SVG menus. My main concern is actually consistency if i m transiting between form and SVG, the look and feel maybe different. I was wondering whats the practice of developers with regards to using SVGs and Forms in J2ME?

I would certainly take your advice about using the form class first! Would you happen to have any good UI tutorial at hand? Thanks once again!

Regards,

Dexter

dexterfyp
Offline
Joined: 2007-08-08

* I m not too sure ( sorry my mistake)