de.enough.polish.blackberry.nativeui
Class FieldHelper

java.lang.Object
  extended by de.enough.polish.blackberry.nativeui.FieldHelper
All Implemented Interfaces:
net.rim.device.api.ui.FocusChangeListener

public class FieldHelper
extends Object
implements net.rim.device.api.ui.FocusChangeListener

Helper utility for native representations for J2ME Polish items.

Copyright Enough Software 2007

 history
        Jan 23, 2010 - rob creation
 

Author:
Robert Virkus, j2mepolish@enough.de

Field Summary
static String KEY_FIELD
          The key for storing native fields into item attributes.
 
Fields inherited from interface net.rim.device.api.ui.FocusChangeListener
FOCUS_CHANGED, FOCUS_GAINED, FOCUS_LOST
 
Method Summary
static net.rim.device.api.ui.Field createField(Item item)
           
 void focusChanged(net.rim.device.api.ui.Field field, int eventType)
           
static net.rim.device.api.ui.Field getField(Item item)
           
static FieldHelper getInstance()
           
static long getStyle(Item item)
          Retrieves the blackberry style for the given item
static void makeContextMenu(net.rim.device.api.ui.ContextMenu menu, Item item)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

KEY_FIELD

public static final String KEY_FIELD
The key for storing native fields into item attributes.

See Also:
Constant Field Values
Method Detail

getStyle

public static long getStyle(Item item)
Retrieves the blackberry style for the given item

Parameters:
item - the item
Returns:
the corresponding blackberry style, e.g. FOCUSABLE

createField

public static net.rim.device.api.ui.Field createField(Item item)

makeContextMenu

public static void makeContextMenu(net.rim.device.api.ui.ContextMenu menu,
                                   Item item)

getField

public static net.rim.device.api.ui.Field getField(Item item)

getInstance

public static FieldHelper getInstance()

focusChanged

public void focusChanged(net.rim.device.api.ui.Field field,
                         int eventType)
Specified by:
focusChanged in interface net.rim.device.api.ui.FocusChangeListener