example.bluetooth.demo
Class GUIImageClient

java.lang.Object
  extended by example.bluetooth.demo.GUIImageClient
All Implemented Interfaces:
javax.microedition.lcdui.CommandListener

final class GUIImageClient
extends java.lang.Object
implements javax.microedition.lcdui.CommandListener

Provides a GUI to present the download options to used, gives a chance to make a choice, finally shows the downloaded image.


Constructor Summary
GUIImageClient(DemoMIDlet parent)
          Constructs client GUI.
 
Method Summary
 void commandAction(javax.microedition.lcdui.Command c, javax.microedition.lcdui.Displayable d)
          Process the command events.
(package private)  void completeInitialization(boolean isBTReady)
          We have to provide this method due to "do not do network operation in command listener method" restriction, which is caused by crooked midp design.
(package private)  void destroy()
          Destroys this component.
(package private)  void informLoadError(java.lang.String resMsg)
          Informs the error during the selected image load.
(package private)  void informSearchError(java.lang.String resMsg)
          Informs the error during the images search.
(package private)  void showImage(javax.microedition.lcdui.Image img, java.lang.String imgName)
          Shows the downloaded image.
(package private)  boolean showImagesNames(java.util.Hashtable base)
          Shows the available images names.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

GUIImageClient

GUIImageClient(DemoMIDlet parent)
Constructs client GUI.

Method Detail

commandAction

public void commandAction(javax.microedition.lcdui.Command c,
                          javax.microedition.lcdui.Displayable d)
Process the command events.

Specified by:
commandAction in interface javax.microedition.lcdui.CommandListener
Parameters:
c - - the issued command.
d - - the screen object the command was issued for.

completeInitialization

void completeInitialization(boolean isBTReady)
We have to provide this method due to "do not do network operation in command listener method" restriction, which is caused by crooked midp design. This method is called by BTImageClient after it is done with bluetooth initialization and next screen is ready to appear.


destroy

void destroy()
Destroys this component.


informSearchError

void informSearchError(java.lang.String resMsg)
Informs the error during the images search.


informLoadError

void informLoadError(java.lang.String resMsg)
Informs the error during the selected image load.


showImage

void showImage(javax.microedition.lcdui.Image img,
               java.lang.String imgName)
Shows the downloaded image.


showImagesNames

boolean showImagesNames(java.util.Hashtable base)
Shows the available images names.

Returns:
false if no images names were found actually