org.netbeans.microedition.lcdui.pda
Class PIMBrowser

java.lang.Object
  extended by javax.microedition.lcdui.Displayable
      extended by javax.microedition.lcdui.Screen
          extended by javax.microedition.lcdui.List
              extended by org.netbeans.microedition.lcdui.pda.PIMBrowser
All Implemented Interfaces:
javax.microedition.lcdui.Choice, javax.microedition.lcdui.CommandListener

public class PIMBrowser
extends javax.microedition.lcdui.List
implements javax.microedition.lcdui.CommandListener

The PIMBrowser custom component uses PIM API which gives access to the Personal Information Management (PIM) database including to-do lists, calendars and contact data. Requires JSR 75.


Field Summary
static javax.microedition.lcdui.Command SELECT_PIM_ITEM
          Command fired when PIMItem selected.
 
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
PIMBrowser(javax.microedition.lcdui.Display display, int listType)
          Creates a new instance of PIMBrowser for given Display object and PIM list type.
 
Method Summary
 void commandAction(javax.microedition.lcdui.Command command, javax.microedition.lcdui.Displayable displayable)
          Called by a system to indicated that a command has been invoked on a particular displayable.
protected  javax.microedition.lcdui.CommandListener getCommandListener()
          Returns command listener.
 int getListType()
          Returns PIM list type.
 javax.microedition.pim.PIMItem getSelectedItem()
          Returns selected PIMItem object.
 void setCommandListener(javax.microedition.lcdui.CommandListener commandListener)
          Sets command listener to this component.
 
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, sizeChanged
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

SELECT_PIM_ITEM

public static final javax.microedition.lcdui.Command SELECT_PIM_ITEM
Command fired when PIMItem selected.

Constructor Detail

PIMBrowser

public PIMBrowser(javax.microedition.lcdui.Display display,
                  int listType)
Creates a new instance of PIMBrowser for given Display object and PIM list type.

Parameters:
display - non-null Display object.
listType - type representing the PIM list type to open, either PIM.CONTACT_LIST, PIM.EVENT_LIST, or PIM.TODO_LIST.
Method Detail

getCommandListener

protected javax.microedition.lcdui.CommandListener getCommandListener()
Returns command listener.

Returns:
non null CommandListener object

setCommandListener

public void setCommandListener(javax.microedition.lcdui.CommandListener commandListener)
Sets command listener to this component.

Overrides:
setCommandListener in class javax.microedition.lcdui.Displayable
Parameters:
commandListener - CommandListener to be used

commandAction

public void commandAction(javax.microedition.lcdui.Command command,
                          javax.microedition.lcdui.Displayable displayable)
Called by a system to indicated that a command has been invoked on a particular displayable.

Specified by:
commandAction in interface javax.microedition.lcdui.CommandListener
Parameters:
command - the Command that was invoked
displayable - the Displayable where the command was invoked

getListType

public int getListType()
Returns PIM list type.

Returns:
possible values: PIM.CONTACT_LIST represents contact list, PIM.EVENT_LIST represents event list, PIM.TODO_LIST represents to-do list.

getSelectedItem

public javax.microedition.pim.PIMItem getSelectedItem()
Returns selected PIMItem object.

Returns:
selected PIMItem object