org.openbandy.log
Class SelectBtDeviceForm
java.lang.Object
javax.microedition.lcdui.Displayable
javax.microedition.lcdui.Screen
javax.microedition.lcdui.List
org.openbandy.log.SelectBtDeviceForm
- All Implemented Interfaces:
- java.lang.Runnable, javax.bluetooth.DiscoveryListener, javax.microedition.lcdui.Choice, javax.microedition.lcdui.CommandListener, BandyDisplayable
public class SelectBtDeviceForm
- extends javax.microedition.lcdui.List
- implements BandyDisplayable, javax.microedition.lcdui.CommandListener, java.lang.Runnable, javax.bluetooth.DiscoveryListener
This form is used to list all Bluetooth devices in range and, if selected,
send the log messages as a file (OBEX).
NOTE Make sure that your computer is setup to receive files!! - Mac:
Bluetooth Settings, Sharing - Windows (XP SP2): 'Receive File'
(c) Copyright P. Bolliger 2007, ALL RIGHTS RESERVED.
- Version:
- 1.0
- Author:
- Philipp Bolliger (philipp@bolliger.name)
| Fields inherited from class javax.microedition.lcdui.List |
SELECT_COMMAND |
| Fields inherited from interface javax.bluetooth.DiscoveryListener |
INQUIRY_COMPLETED, INQUIRY_ERROR, INQUIRY_TERMINATED, SERVICE_SEARCH_COMPLETED, SERVICE_SEARCH_DEVICE_NOT_REACHABLE, SERVICE_SEARCH_ERROR, SERVICE_SEARCH_NO_RECORDS, SERVICE_SEARCH_TERMINATED |
| Fields inherited from interface javax.microedition.lcdui.Choice |
EXCLUSIVE, IMPLICIT, MULTIPLE, POPUP, TEXT_WRAP_DEFAULT, TEXT_WRAP_OFF, TEXT_WRAP_ON |
|
Constructor Summary |
SelectBtDeviceForm(java.lang.String logAsString)
Create a new select bt device form |
|
Method Summary |
void |
commandAction(javax.microedition.lcdui.Command c,
javax.microedition.lcdui.Displayable d)
|
void |
deviceDiscovered(javax.bluetooth.RemoteDevice remoteDevice,
javax.bluetooth.DeviceClass deviceClass)
|
void |
inquiryCompleted(int discType)
|
void |
run()
|
void |
servicesDiscovered(int transID,
javax.bluetooth.ServiceRecord[] servRecord)
|
void |
serviceSearchCompleted(int transID,
int respCode)
|
void |
show(javax.microedition.lcdui.Display display,
javax.microedition.lcdui.Displayable previousDisplayable)
Tells the BandyDisplayable to set itself as the current screen. |
| Methods inherited from class javax.microedition.lcdui.List |
append, delete, deleteAll, getFitPolicy, getFont, getImage, getSelectedFlags, getSelectedIndex, getString, getTicker, insert, isSelected, removeCommand, set, setFitPolicy, setFont, setSelectCommand, setSelectedFlags, setSelectedIndex, setTicker, setTitle, size |
| Methods inherited from class javax.microedition.lcdui.Displayable |
addCommand, getHeight, getTitle, getWidth, isShown, setCommandListener |
| Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
SelectBtDeviceForm
public SelectBtDeviceForm(java.lang.String logAsString)
- Create a new select bt device form
- Parameters:
logAsString - String representation of the log that will be sent to the remote device
commandAction
public void commandAction(javax.microedition.lcdui.Command c,
javax.microedition.lcdui.Displayable d)
- Specified by:
commandAction in interface javax.microedition.lcdui.CommandListener
run
public void run()
- Specified by:
run in interface java.lang.Runnable
show
public void show(javax.microedition.lcdui.Display display,
javax.microedition.lcdui.Displayable previousDisplayable)
- Description copied from interface:
BandyDisplayable
- Tells the BandyDisplayable to set itself as the current screen.
- Specified by:
show in interface BandyDisplayable
- Parameters:
display - The MIDlets displaypreviousDisplayable - The displayable that is shown before this one
deviceDiscovered
public void deviceDiscovered(javax.bluetooth.RemoteDevice remoteDevice,
javax.bluetooth.DeviceClass deviceClass)
- Specified by:
deviceDiscovered in interface javax.bluetooth.DiscoveryListener
inquiryCompleted
public void inquiryCompleted(int discType)
- Specified by:
inquiryCompleted in interface javax.bluetooth.DiscoveryListener
serviceSearchCompleted
public void serviceSearchCompleted(int transID,
int respCode)
- Specified by:
serviceSearchCompleted in interface javax.bluetooth.DiscoveryListener
servicesDiscovered
public void servicesDiscovered(int transID,
javax.bluetooth.ServiceRecord[] servRecord)
- Specified by:
servicesDiscovered in interface javax.bluetooth.DiscoveryListener