com.nutiteq.helpers
Class FileBrowser

java.lang.Object
  extended by com.nutiteq.helpers.FileBrowser
All Implemented Interfaces:
javax.microedition.lcdui.CommandListener

public class FileBrowser
extends java.lang.Object
implements javax.microedition.lcdui.CommandListener

This class implements a file browser using J2ME MIDP UI.

Version:
1.0
Author:
CristiS

Constructor Summary
FileBrowser(FileSystem fs)
          Create a FileBrowser object.
 
Method Summary
 void commandAction(javax.microedition.lcdui.Command cmd, javax.microedition.lcdui.Displayable disp)
          Called when a command is selected.
 void showUI(javax.microedition.midlet.MIDlet midlet, java.lang.String startDir, FileBrowserListener listener)
          Show file browser UI (list).
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FileBrowser

public FileBrowser(FileSystem fs)
Create a FileBrowser object.

Parameters:
fs - FileSystem implementation to use
Method Detail

showUI

public void showUI(javax.microedition.midlet.MIDlet midlet,
                   java.lang.String startDir,
                   FileBrowserListener listener)
Show file browser UI (list).

Parameters:
midlet -
startDir - directory to start browsing. Use null to start with the list of roots.
listener - FileBrowserListener object used for accepting a file or directory. The FileBrowserListener implementation should remember the file or directory selected and should change the displayable before returning true in one of its methods.

commandAction

public void commandAction(javax.microedition.lcdui.Command cmd,
                          javax.microedition.lcdui.Displayable disp)
Called when a command is selected.

Specified by:
commandAction in interface javax.microedition.lcdui.CommandListener
Parameters:
cmd - command
disp - current displayable
See Also:
CommandListener.commandAction(javax.microedition.lcdui.Command, javax.microedition.lcdui.Displayable)