org.openuat.channel.oob.j2me
Class J2MEButtonChannelImpl

java.lang.Object
  extended by org.openuat.channel.oob.ButtonChannelImpl
      extended by org.openuat.channel.oob.j2me.J2MEButtonChannelImpl

public class J2MEButtonChannelImpl
extends ButtonChannelImpl

This is a J2ME specific implementation of the ButtonChannelImpl class.

Version:
1.0
Author:
Lukas Huser

Field Summary
protected  javax.microedition.lcdui.Command abortCommand
          Allows the user to cancel the currently displayed screen.
protected  javax.microedition.lcdui.CommandListener abortHandler
          This CommandListener will be invoked whenever the user aborts the current transmission or capture process.
protected  javax.microedition.lcdui.Canvas currentScreen
          Current gui element displayed on screen.
protected  javax.microedition.lcdui.Font defaultFont
          Default font when drawing text on the screen.
protected  javax.microedition.lcdui.Display display
          Main applications Display.
 
Fields inherited from class org.openuat.channel.oob.ButtonChannelImpl
intervalList, logger, prepareSignal, progress, showCount, showSignal, signalCount, transmissionMode, TRANSMIT_BAR, TRANSMIT_PLAIN, TRANSMIT_SIGNAL, TRANSMIT_TRAFFIC_LIGHT, TRANSMIT_VERT_BARS
 
Constructor Summary
J2MEButtonChannelImpl(javax.microedition.lcdui.Display display, javax.microedition.lcdui.CommandListener abortHandler)
          Creates a new instance.
 
Method Summary
 void repaint()
          Repaints the currently displayed gui element.
 void showCaptureGui(java.lang.String text, ButtonInputHandler inputHandler)
          Starts the capturing process by launching a gui element that listens to button inputs.
 void showTransmitGui(java.lang.String text, int type)
          Starts the transmitting process.
 void vibrate(int milliseconds)
          Vibrates for milliseconds ms.
 
Methods inherited from class org.openuat.channel.oob.ButtonChannelImpl
setInterval, setPrepareSignal, setProgress, setShowCount, setSignal, setSignalCount
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

display

protected javax.microedition.lcdui.Display display
Main applications Display.


currentScreen

protected javax.microedition.lcdui.Canvas currentScreen
Current gui element displayed on screen.


abortCommand

protected javax.microedition.lcdui.Command abortCommand
Allows the user to cancel the currently displayed screen.


abortHandler

protected javax.microedition.lcdui.CommandListener abortHandler
This CommandListener will be invoked whenever the user aborts the current transmission or capture process.


defaultFont

protected javax.microedition.lcdui.Font defaultFont
Default font when drawing text on the screen.

Constructor Detail

J2MEButtonChannelImpl

public J2MEButtonChannelImpl(javax.microedition.lcdui.Display display,
                             javax.microedition.lcdui.CommandListener abortHandler)
Creates a new instance.

Parameters:
display - The main applications Display.
abortHandler - It will be invoked when the user aborts the current transmission or capture process. Note: this listener should only react to events of type Command.STOP.
Example:
        public void commandAction(Command command, Displayable displayable) {
                if (command.getCommandType() == Command.STOP) {
                        // abort current processing...
                }
        }
 
Method Detail

repaint

public void repaint()
Description copied from class: ButtonChannelImpl
Repaints the currently displayed gui element.

Specified by:
repaint in class ButtonChannelImpl

showCaptureGui

public void showCaptureGui(java.lang.String text,
                           ButtonInputHandler inputHandler)
Description copied from class: ButtonChannelImpl
Starts the capturing process by launching a gui element that listens to button inputs. text should be an instructive and/or informative text that helps the user to perform his task.

Specified by:
showCaptureGui in class ButtonChannelImpl
Parameters:
text - Is displayed on screen while capturing.
inputHandler - Button inputs are delegated to inputHandler.

showTransmitGui

public void showTransmitGui(java.lang.String text,
                            int type)
Description copied from class: ButtonChannelImpl
Starts the transmitting process.

Specified by:
showTransmitGui in class ButtonChannelImpl
Parameters:
text - Is displayed on screen before transmitting starts.
type - Defines the transmission type.

vibrate

public void vibrate(int milliseconds)
Description copied from class: ButtonChannelImpl
Vibrates for milliseconds ms.
This method returns immediately and does not block the caller.

Specified by:
vibrate in class ButtonChannelImpl
Parameters:
milliseconds - The vibration duration.


2005-2009, Rene Mayrhofer.