com.nutiteq.helpers
Class BluetoothGpsBrowser

java.lang.Object
  extended by javax.microedition.lcdui.Displayable
      extended by javax.microedition.lcdui.Screen
          extended by javax.microedition.lcdui.List
              extended by com.nutiteq.helpers.BluetoothGpsBrowser
All Implemented Interfaces:
BluetoothHandler, com.nutiteq.task.LocalTask, com.nutiteq.task.Task, javax.microedition.lcdui.Choice, javax.microedition.lcdui.CommandListener

public class BluetoothGpsBrowser
extends javax.microedition.lcdui.List
implements javax.microedition.lcdui.CommandListener, com.nutiteq.task.LocalTask, BluetoothHandler

Generic bluetooth GPS selector implemented using J2ME high level UI elements.


Field Summary
 
Fields inherited from class javax.microedition.lcdui.List
SELECT_COMMAND
 
Fields inherited from interface javax.microedition.lcdui.Choice
EXCLUSIVE, IMPLICIT, MULTIPLE, POPUP, TEXT_WRAP_DEFAULT, TEXT_WRAP_OFF, TEXT_WRAP_ON
 
Constructor Summary
BluetoothGpsBrowser(java.lang.String title, LocationSourceWaiter sourceWaiter, java.lang.String searchingMessage, java.lang.String noDevicesFoundMessage, java.lang.String selectCommandLabel, java.lang.String backCommandLabel)
          Create new browser that will be shown on screen.
 
Method Summary
 void commandAction(javax.microedition.lcdui.Command cmd, javax.microedition.lcdui.Displayable d)
           
 void execute()
           
 void remoteDevicesFound(DiscoveredDevice[] devicesFound)
          Give found devices to handler class
 
Methods inherited from class javax.microedition.lcdui.List
append, delete, deleteAll, getFitPolicy, getFont, getImage, getSelectedFlags, getSelectedIndex, getString, insert, isSelected, removeCommand, set, setFitPolicy, setFont, setSelectCommand, setSelectedFlags, setSelectedIndex, setTicker, setTitle, size
 
Methods inherited from class javax.microedition.lcdui.Displayable
addCommand, getHeight, getTicker, getTitle, getWidth, isShown, setCommandListener
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BluetoothGpsBrowser

public BluetoothGpsBrowser(java.lang.String title,
                           LocationSourceWaiter sourceWaiter,
                           java.lang.String searchingMessage,
                           java.lang.String noDevicesFoundMessage,
                           java.lang.String selectCommandLabel,
                           java.lang.String backCommandLabel)
Create new browser that will be shown on screen.

Parameters:
title - form title
sourceWaiter - calling class waiting for location source
searchingMessage - message shown while devices search is in progress
noDevicesFoundMessage - message shown if no devices found
selectCommandLabel - label on select command
backCommandLabel - label on back command
Method Detail

execute

public void execute()
Specified by:
execute in interface com.nutiteq.task.Task

commandAction

public void commandAction(javax.microedition.lcdui.Command cmd,
                          javax.microedition.lcdui.Displayable d)
Specified by:
commandAction in interface javax.microedition.lcdui.CommandListener

remoteDevicesFound

public void remoteDevicesFound(DiscoveredDevice[] devicesFound)
Description copied from interface: BluetoothHandler
Give found devices to handler class

Specified by:
remoteDevicesFound in interface BluetoothHandler
Parameters:
devicesFound - devices found by bluetooth device