com.nokia.mid.ui
Class PopupListItem

java.lang.Object
  extended by com.nokia.mid.ui.PopupListItem
Direct Known Subclasses:
PopupList

public class PopupListItem
extends java.lang.Object

This class represents an item in a popuplist. PopupList item types are: Text:

Text

Text and Icon:
IconText

Text and additional marking (checkbox) functionality:
TextV

Text and Icon and marking:
IconTextV


Constructor Summary
PopupListItem(java.lang.String itemText)
          This constructor instantiates the PopupList item.
PopupListItem(java.lang.String itemText, boolean markingEnabled)
          This constructor instantiates the PopupList item.
PopupListItem(java.lang.String itemText, javax.microedition.lcdui.Image itemIcon)
          This constructor instantiates the PopupList item.
PopupListItem(java.lang.String itemText, javax.microedition.lcdui.Image itemIcon, boolean itemHasMarking, boolean marked)
          This constructor instantiates the PopupList item.
 
Method Summary
 javax.microedition.lcdui.Image getIcon()
          This returns the icon currently used in this PopupList item.
 java.lang.String getText()
          This method gets the text displayed by the PopupList item.
 boolean hasMarking()
          This retrieves whether the PopupListItem has marking or not
 boolean isMarked()
          This retrieves whether the PopupListItem is marked (checked).
 void setHasMarking(boolean hasMarking)
          This method sets whether the PopupListItem has marking or not.
 void setIcon(javax.microedition.lcdui.Image itemIcon)
          This method sets the current icon of this PopupList item.
 void setMarked(boolean marked)
          This method sets whether the PopupListItem is marked (checked).
 void setText(java.lang.String itemText)
          This method sets the text for the PopupList item to the indicated value.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PopupListItem

public PopupListItem(java.lang.String itemText)
              throws java.lang.NullPointerException
This constructor instantiates the PopupList item.

Parameters:
itemText - The text to show on the PopupList item.
Throws:
java.lang.NullPointerException - if null itemText is null.

PopupListItem

public PopupListItem(java.lang.String itemText,
                     boolean markingEnabled)
              throws java.lang.NullPointerException
This constructor instantiates the PopupList item.

Parameters:
itemText - The text to show on the PopupList item.
markingEnabled - if marking is supported on this item
Throws:
java.lang.NullPointerException - if null itemText is null.

PopupListItem

public PopupListItem(java.lang.String itemText,
                     javax.microedition.lcdui.Image itemIcon)
              throws java.lang.NullPointerException
This constructor instantiates the PopupList item.

Parameters:
itemText - The text to show on the PopupList item.
itemIcon - The icon to show on the PopupList item.
Throws:
java.lang.NullPointerException - if null itemText is null.

PopupListItem

public PopupListItem(java.lang.String itemText,
                     javax.microedition.lcdui.Image itemIcon,
                     boolean itemHasMarking,
                     boolean marked)
              throws java.lang.NullPointerException
This constructor instantiates the PopupList item.

Parameters:
itemText - The text to show on the PopupList item.
itemIcon - The icon to show on the PopupList item. null if no icon should be used
itemHasMarking - Indicates that a check mark icon should be used in the PopupList item.
marked - true: item is default checked, false: item is default not checked.
Throws:
java.lang.NullPointerException - if null itemText is null.
Method Detail

setText

public void setText(java.lang.String itemText)
             throws java.lang.NullPointerException
This method sets the text for the PopupList item to the indicated value.

Parameters:
itemText - The text to set the PopupList item to.
Throws:
java.lang.NullPointerException - if itemText is null

getText

public java.lang.String getText()
This method gets the text displayed by the PopupList item.

Returns:
The current text shown by the PopupList item.

setIcon

public void setIcon(javax.microedition.lcdui.Image itemIcon)
This method sets the current icon of this PopupList item.

Parameters:
itemIcon - The icon to show on the PopupList item.

getIcon

public javax.microedition.lcdui.Image getIcon()
This returns the icon currently used in this PopupList item.

Returns:
The icon shown in this PopupList item.

setMarked

public void setMarked(boolean marked)
This method sets whether the PopupListItem is marked (checked).

Parameters:
marked - true: item is checked, false: item is not checked.

isMarked

public boolean isMarked()
This retrieves whether the PopupListItem is marked (checked).

Returns:
true: item is marked, false: item is not marked.

setHasMarking

public void setHasMarking(boolean hasMarking)
This method sets whether the PopupListItem has marking or not.

Parameters:
hasMarking - true: item has marking, false: item doesn't have marking.

hasMarking

public boolean hasMarking()
This retrieves whether the PopupListItem has marking or not

Returns:
true: item has marking, false it doesn't


Copyright © 2012 Nokia Corporation. All rights reserved.

Nokia is registered trademark of Nokia Corporation. Java and all Java-based marks are trademarks or registered trademarks of Oracle Corporation. Other product and company names mentioned herein may be trademarks or trade names of their respective owners. This document is confidential information of Nokia Corporation.

Disclaimer
The information in this document is provided "as is," with no warranties whatsoever, including any warranty of merchantability, fitness for any particular purpose, or any warranty otherwise arising out of any proposal, specification, or sample. Furthermore, information provided in this document is preliminary, and may be changed substantially prior to final release.

Nokia Corporation disclaims all liability, including liability for infringement of any proprietary rights, relating to this document and implementation of any information presented in this document.

Nokia Corporation retains the right to make changes to this document at any time, without notice.

License
Subject to above disclaimer, a license is hereby granted to use this documentation solely under existing Limited License Agreement and non-disclosure agreement between the companies for the agreed application development for Series 40 Nokia phones. No other licenses e.g. to any intellectual property rights are granted herein. Any use of the screen shots of this documentation, including any icons thereof, is subject to Nokia's prior written approval.