PenProfile 2.x

com.livescribe.ext.ui
Class Menu.MenuItem

java.lang.Object
  extended by com.livescribe.ext.ui.Menu.MenuItem
All Implemented Interfaces:
BrowseList.Item
Enclosing class:
Menu

protected static class Menu.MenuItem
extends Object
implements BrowseList.Item

An implementation of a browse list item. The items in the browse list will be an instance of this class.

See Also:
BrowseList.Item

Method Summary
 String getAudioMimeType()
          Returns the MIME type of the audio stream.
 InputStream getAudioStream()
          Returns the audio stream that should be played when this Item has focus.
 Image getIcon()
          Gets the image that should be displayed when this Item has focus.
protected  int getIndex()
          Gets the item's index number.
 Object getText()
          Returns the text that should be displayed when this Item has focus.
 boolean isSelectable()
          Indicates if the item can be selected.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

isSelectable

public boolean isSelectable()
Description copied from interface: BrowseList.Item
Indicates if the item can be selected. When the pen user selects this item, your code can perform an action.

Specified by:
isSelectable in interface BrowseList.Item
Returns:
true if the the item is selectable; otherwise.

getText

public Object getText()
Description copied from interface: BrowseList.Item
Returns the text that should be displayed when this Item has focus.

Specified by:
getText in interface BrowseList.Item
Returns:
the String text to display or an AttributedText

getIcon

public Image getIcon()
Description copied from interface: BrowseList.Item
Gets the image that should be displayed when this Item has focus.

Specified by:
getIcon in interface BrowseList.Item
Returns:
the Image containing the icon; or null if this Item does not support an icon.

getAudioStream

public InputStream getAudioStream()
Description copied from interface: BrowseList.Item
Returns the audio stream that should be played when this Item has focus. Return an InputStream that should be played; or null if no audio should be played.

Specified by:
getAudioStream in interface BrowseList.Item

getAudioMimeType

public String getAudioMimeType()
Description copied from interface: BrowseList.Item
Returns the MIME type of the audio stream.

Specified by:
getAudioMimeType in interface BrowseList.Item
Returns:
a String with the MIME type; or null if this Item does not support audio. In the case of a String, the allowable MIME types are:

getIndex

protected int getIndex()
Gets the item's index number.

Returns:
the index number

PenProfile 2.x

Copyright © 2010 Livescribe Inc. All Rights Reserved.
Confidential and subject to NDA.