Java Reference
In-Depth Information
NetBeans IDE, so if you're building your application using the visual designer, you can
drag out the components you want to use in your application, just as you would for con-
ventional MIDP components, as you saw in Chapter 3. The org.netbeans.microedition.svg
class includes the following classes:
SVGPlayer : Provides a simple wrapper around the SVGAPI to play animated SVG
images. It accepts the events it receives as a Canvas implementation and forwards
them to the SVGAPI.
SVGSplashScreen : Provides a screen for showing a single SVG animation that
transitions to another screen.
SVGWaitScreen : Provides an interstitial screen that displays an SVG animation while
a blocking background task executes.
SVGMenu : Provides a player for an SVG that contains multiple selectable items.
Menu items are individual SVG elements in a single SVG image.
Note These classes are provided in the version of the org.netbeans.microedition.svg package that
NetBeans 6.1 includes. Previous versions of NetBeans had similar classes, although in those releases, the
SVGPlayer didn't exist; instead, it included the SVGAnimatorWrapper . If you're working with older versions
of NetBeans, you'll want to either upgrade or use SVGAnimatorWrapper . Upgrading is probably the right
choice to make, because SVGAnimatorWrapper is deprecated in more recent releases of the package.
It's easy to use the NetBeans visual GUI builder to create an application that uses
these classes, but of course you don't have to; you can also import the org.netbeans.
microedition.svg package and use these classes directly.
These classes and others are under constant refinement by the NetBeans developer
community; if you're interested in working with SVG content at a higher level than the
SVGAPI, you should consult the latest documentation at http://wiki.netbeans.org/ .
Putting the MMAPI and the SVGAPI to Work
You could build some interesting weather applications around the MMAPI and the SVGAPI,
such as a server-side application that provides weather reports as SVG animations to Java
ME clients, or a weather-blogging application that permits users to view, share, and interact
with weather data. However, they'd all be pretty complex. Consequently, rather than inte-
grating the MMAPI or the SVGAPI with the WeatherWidget example I've touched upon
throughout this topic, in this section I present a simple media player application that plays
media using both the MMAPI and the SVGAPI. The application opens with a list of media
 
Search WWH ::




Custom Search