com.sun.perseus.demo.locationBasedService
Class LocationBasedService

java.lang.Object
  extended by javax.microedition.midlet.MIDlet
      extended by com.sun.perseus.demo.PlaySVGImageDemo
          extended by com.sun.perseus.demo.locationBasedService.LocationBasedService
All Implemented Interfaces:
java.lang.Runnable, javax.microedition.lcdui.CommandListener, javax.microedition.m2g.SVGEventListener

public final class LocationBasedService
extends PlaySVGImageDemo
implements java.lang.Runnable

An example of zooming and panning. A sample itinerary is used in combination with a map of downtown San Francisco to show how a route can be traced from a starting point to an ending point. This also demonstrates how to insert/remove the traced route into/from the map content so that the route can also be scaled with the map.


Nested Class Summary
(package private)  class LocationBasedService.FinalDisplay
           
(package private)  class LocationBasedService.InitialDisplay
           
(package private)  class LocationBasedService.LocationBasedServiceAnim
           
 
Field Summary
(package private)  org.w3c.dom.svg.SVGElement[] connectors
          Marker connectors
(package private)  java.lang.Runnable finalDisplay
           
(package private)  org.w3c.dom.svg.SVGRect initialBBox
          Initial screen bbox
(package private)  java.lang.Runnable initialDisplay
          Animation steps
(package private)  org.w3c.dom.svg.SVGRect initialVB
          Initial viewbox
(package private)  java.lang.Runnable locationBasedServiceAnim
           
(package private)  org.w3c.dom.svg.SVGRGBColor MARKER_BLACK
           
(package private)  org.w3c.dom.svg.SVGRGBColor MARKER_COLOR
          Color constant for markers and connectors
(package private)  org.w3c.dom.svg.SVGRGBColor MARKER_WHITE
           
(package private)  org.w3c.dom.svg.SVGElement[] markers
          Location markers
(package private)  org.w3c.dom.svg.SVGElement message
          Message element
(package private)  org.w3c.dom.svg.SVGElement messageBackground
          Message background
(package private)  float messageX
          Message location
(package private)  float messageY
          Message location
(package private)  boolean paused
          Controls whether the animation is paused or not
(package private)  java.lang.Object[][] points
           
(package private)  java.lang.Runnable step
          Current Animation
 
Fields inherited from class com.sun.perseus.demo.PlaySVGImageDemo
doc, ERROR_COULD_NOT_LOAD_SVG, KEY_HELP, KEY_PAUSE, KEY_PLAY, KEY_ROTATE, KEY_START_DEMO, KEY_STOP, SPLASH_MIN_LENGTH, splashCanvas, splashImageName, state, STATE_INTERRUPTED, STATE_PAUSED, STATE_PLAYING, STATE_STOPPED, svg, SVG_NAMESPACE_URI, svgAnimator, svgCanvas, svgImage, svgImageName
 
Constructor Summary
LocationBasedService()
          Default constructor
 
Method Summary
 void init(org.w3c.dom.Document doc)
           
 void keyPressed(int keyCode)
           
 void run()
           
 void startApp()
          By default, start the demo in the playing state.
 
Methods inherited from class com.sun.perseus.demo.PlaySVGImageDemo
commandAction, destroyApp, hideNotify, keyReleased, pauseApp, pointerPressed, pointerReleased, showNotify, sizeChanged
 
Methods inherited from class javax.microedition.midlet.MIDlet
checkPermission, getAppProperty, notifyDestroyed, notifyPaused, platformRequest, resumeRequest
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

points

java.lang.Object[][] points

markers

org.w3c.dom.svg.SVGElement[] markers
Location markers


connectors

org.w3c.dom.svg.SVGElement[] connectors
Marker connectors


initialDisplay

java.lang.Runnable initialDisplay
Animation steps


locationBasedServiceAnim

java.lang.Runnable locationBasedServiceAnim

finalDisplay

java.lang.Runnable finalDisplay

message

org.w3c.dom.svg.SVGElement message
Message element


messageX

float messageX
Message location


messageY

float messageY
Message location


messageBackground

org.w3c.dom.svg.SVGElement messageBackground
Message background


MARKER_COLOR

org.w3c.dom.svg.SVGRGBColor MARKER_COLOR
Color constant for markers and connectors


MARKER_BLACK

org.w3c.dom.svg.SVGRGBColor MARKER_BLACK

MARKER_WHITE

org.w3c.dom.svg.SVGRGBColor MARKER_WHITE

step

java.lang.Runnable step
Current Animation


initialVB

org.w3c.dom.svg.SVGRect initialVB
Initial viewbox


initialBBox

org.w3c.dom.svg.SVGRect initialBBox
Initial screen bbox


paused

boolean paused
Controls whether the animation is paused or not

Constructor Detail

LocationBasedService

public LocationBasedService()
Default constructor

Method Detail

startApp

public void startApp()
By default, start the demo in the playing state.

Overrides:
startApp in class PlaySVGImageDemo

init

public void init(org.w3c.dom.Document doc)
Parameters:
doc - the DocumentNode holding the expected SVG content.

keyPressed

public void keyPressed(int keyCode)
Specified by:
keyPressed in interface javax.microedition.m2g.SVGEventListener
Overrides:
keyPressed in class PlaySVGImageDemo

run

public void run()
Specified by:
run in interface java.lang.Runnable