com.sybase.uep.bobclient.controls
Class SelectBox

java.lang.Object
  extended by net.rim.device.api.ui.Field
      extended by net.rim.device.api.ui.component.ChoiceField
          extended by net.rim.device.api.ui.component.ObjectChoiceField
              extended by com.sybase.uep.bobclient.controls.SelectBox
All Implemented Interfaces:
Control, MobileDataControl, PIMControl, IModelChangeListener, net.rim.device.api.ui.FieldChangeListener

public class SelectBox
extends net.rim.device.api.ui.component.ObjectChoiceField
implements Control, PIMControl, MobileDataControl, IModelChangeListener, net.rim.device.api.ui.FieldChangeListener

This is the select box control

Author:
tdang

Field Summary
protected  java.lang.String _namedQuery
           
protected  java.util.Vector _namedQuerySubmitElements
           
 
Fields inherited from class net.rim.device.api.ui.component.ChoiceField
CONTEXT_CHANGE_OPTION
 
Fields inherited from class net.rim.device.api.ui.Field
ACTION_INVOKE, EDITABLE, EDITABLE_MASK, FIELD_BOTTOM, FIELD_HALIGN_MASK, FIELD_HCENTER, FIELD_LEADING, FIELD_LEFT, FIELD_RIGHT, FIELD_TOP, FIELD_TRAILING, FIELD_VALIGN_MASK, FIELD_VCENTER, FOCUSABLE, FOCUSABLE_MASK, HIGHLIGHT_FOCUS, HIGHLIGHT_SELECT, NON_FOCUSABLE, NON_SPELLCHECKABLE, READONLY, SPELLCHECKABLE, SPELLCHECKABLE_MASK, STATUS_MOVE_FOCUS_HORIZONTALLY, STATUS_MOVE_FOCUS_VERTICALLY, USE_ALL_HEIGHT, USE_ALL_WIDTH, VISUAL_STATE_ACTIVE, VISUAL_STATE_DISABLED, VISUAL_STATE_DISABLED_FOCUS, VISUAL_STATE_FOCUS, VISUAL_STATE_NORMAL
 
Fields inherited from interface net.rim.device.api.ui.FieldChangeListener
PROGRAMMATIC
 
Constructor Summary
SelectBox(java.lang.String label, java.lang.Object[] choices, int initialIndex)
          Constructor to create a new select box
SelectBox(java.lang.String label, java.lang.Object[] choices, int initialIndex, long style)
          Constructor to create a new select box
 
Method Summary
 void clearQuery()
          Clear the cached query
protected  void drawFocus(net.rim.device.api.ui.Graphics g, boolean on)
          (non-Javadoc)
 void fieldChanged(net.rim.device.api.ui.Field field, int context)
          (non-Javadoc)
 MBOModel getApplicationData()
          Retrieve the application currently set for this table
 int getColSpan()
          (non-Javadoc)
 MBOAttribute[] getColumnAttributes()
          Retrieve the column attributes
 int getControlID()
          Returns the control's ID
 int getCurrentRecordIndex()
          Retrieve current record index
 java.lang.Object getCurrentRow()
          Retrieve current selected row
 ICustomEventsDelegate getCustomEventsDelegate()
          Returns the control's custom events delegate
 CustomEventsHandler getCustomEventsHandler()
          Returns the control's custom events handler
 IMobileApplicationDataHandler getDataHandler()
          Retrieve the mobile application data handler
 Query getDataProperties()
          Retrieve the data properties
 java.lang.String getDisplayName()
          The display name of the select box
 int getFieldIndex()
          Retrieve the edit index for this select box
 void getFocusRect(net.rim.device.api.ui.XYRect rect)
           
 FontStyle getFontStyle()
          Retrieve this control's font style
 long getHorizontalAlignment()
          (non-Javadoc)
 java.lang.String getLinkedValue()
          Retrieve the linked paramter value defined
 LinkParamNode getLinkParameters()
          Retrieve the link parameter object
 LinkParamListener getLinkParamListener()
          Gets the LinkParamListener
 LogicalType getLogicalType()
          Retrieve the logical type assign to this control
 java.lang.String getMobileAppID()
          Retrieve the Mobile Application ID
 java.lang.String getMobileApplicationName()
          Retrieve the application data name
 java.lang.String getName()
          (non-Javadoc)
 PagingObject getPagingObject()
          Retrieve a new paging object
 java.lang.String getParentAssociationName()
          Retrieve the parent association name
 IBOBScreen getParentScreen()
          (non-Javadoc)
 java.lang.Object getParentSelectedRow()
          Retrieve parent selected row
 java.lang.Object getPIMValue()
          Retrieve the PIM value
 int getPreferredHeight()
          (non-Javadoc)
 int getPreferredWidth()
          (non-Javadoc)
 MBOModel getRelationshipParentAppData()
          Retrieve relationship parent application dat
 int getRowSpan()
          (non-Javadoc)
 java.lang.String getSchemaType()
          Retrieve the schema type
 int getSelectedItemWidth()
          Retrieve selected item label width
 java.lang.String getType()
          Retrieve the type for this select box
 ValidationObject getValidationObj()
          Retrieve the validation object set on this checkbox
 java.lang.Object getValue()
          (non-Javadoc)
 long getVerticalAlignment()
          (non-Javadoc)
 boolean hasRelationshipAppData()
          Check is this mobile data control contains relationship data
 boolean hasValidation()
          Check if there is a validation object assigned to this control
 void initMobileApplicationData()
          Setup select boxes if there is a mobile application defined
 boolean isRequired()
          Check if this select box is required
protected  void layout(int width, int height)
          (non-Javadoc)
protected  void makeContextMenu(net.rim.device.api.ui.ContextMenu menu)
          (non-Javadoc)
 void modelChanged(ModelChangeEvent event)
          (non-Javadoc)
protected  boolean navigationClick(int status, int time)
          (non-Javadoc)
protected  boolean navigationMovement(int dx, int dy, int status, int time)
          (non-Javadoc)
protected  boolean navigationUnclick(int status, int time)
          (non-Javadoc)
protected  void onFocus(int direction)
          (non-Javadoc)
protected  void onUnfocus()
          (non-Javadoc)
protected  void paint(net.rim.device.api.ui.Graphics g)
          (non-Javadoc)
 void refresh()
          (non-Javadoc)
 void refreshData()
          Refresh the data
 void refreshFooter(java.lang.String valueToBeDisplay)
          Refresh the footer field from the screen that contains the text of the button.
 void setApplicationData(MBOModel applicationData)
          Set the application data
 void setBackgroundColor(int bgcolor)
          (non-Javadoc)
 void setChoices(java.lang.Object[] choices)
          Set choices of the select box
 void setColSpan(int colspan)
          (non-Javadoc)
 void setControlID(int controlID)
          Sets the control's ID
 void setCurrentRecordIndex(int currentRecordIndex)
          Set current record index
 void setCustomEventsDelegate(ICustomEventsDelegate delegate, int eventsFlags)
          Sets the control's custom events delegate for the given events
 void setDataProperties(Query dataProps)
          Set the data properties filtering
 void setDisplayName(java.lang.String name)
          Set display name
 void setDynamicNamedQuery(java.lang.String namedQuery)
          (non-Javadoc)
 void setDynamicNamedQueryParameters(java.util.Hashtable parameters)
          (non-Javadoc)
 void setFieldIndex(int index)
          Set edit index
 void setFocusFontStyle(FontStyle fontStyle)
          Set the focus font style for this control
 void setFontStyle(FontStyle fontStyle)
          Set the unfocus font style for this control
 void setFooterField(FooterField field)
          Set the footer field
 void setLayoutHeight(int height)
          (non-Javadoc)
 void setLayoutWidth(int width)
          (non-Javadoc)
 void setLinkedValue(java.lang.String value)
          Set linked value
 void setLinkParamListener(LinkParamListener linkParamListener)
          Sets the LinkParamListener
 void setLogicalType(LogicalType logicalType)
          Set logical type
 void setMobileAppID(java.lang.String appID)
          Set mobile application id
 void setName(java.lang.String name)
          Set a key name for this control
 void setNameColumnName(java.lang.String columnName)
          Set name of name column
 void setNamedQuery(java.lang.String namedQuery)
          (non-Javadoc)
 void setNamedQueryParameters(java.util.Hashtable parameters)
          (non-Javadoc)
 void setNamedQuerySubmitElements(java.util.Vector parameters)
          (non-Javadoc)
 void setPIMValue(java.lang.Object value)
          Sets the PIM value
 void setProperty(int key, java.lang.String value)
          Set the property values for this select box item
 void setRelationshipAppData(MBOModel parentAppData, java.lang.Object selectedRow, java.lang.String assoicationName)
          Set relationship application data
 void setRequired(boolean required)
          Set if this select box is required
 void setRowSpan(int rowspan)
          (non-Javadoc)
 void setSchemaType(java.lang.String schemaType)
          Set the schema type
 void setSelectedValue()
          Set the selected value for this select box
 void setSelectedValue(java.lang.String selectedValue)
          Set selected value
 void setType(java.lang.String type)
          Set type
 void setupMobileDataControlContextVariables()
          Save current selected row of this mobile data control
 void setValidationObject(ValidationObject obj)
          Set validation object
 void setValueColumnName(java.lang.String columnName)
          Set name of value column
 void setVariableLabel(ControlVariable variable)
          Set the control variable object for the label
 void setVariableSelectedValue(ControlVariable variable)
          Set the control variable object for the selected index of the select box
protected  boolean touchEvent(net.rim.device.api.ui.TouchEvent message)
          (non-Javadoc)
 
Methods inherited from class net.rim.device.api.ui.component.ObjectChoiceField
getChoice
 
Methods inherited from class net.rim.device.api.ui.component.ChoiceField
getAccessibleContext, getHeightOfChoices, getLabel, getSelectedIndex, getSize, getWidthOfChoice, invokeAction, keyChar, keyControl, keyStatus, moveFocus, setLabel, setSelectedIndex, setSelectedIndex, setSelectedIndex, setSize, toString
 
Methods inherited from class net.rim.device.api.ui.Field
drawHighlightRegion, fieldChangeNotify, focusAdd, focusChangeNotify, focusRemove, getBackground, getBackground, getBorder, getBorder, getBorder, getChangeListener, getContentHeight, getContentLeft, getContentRect, getContentRect, getContentTop, getContentWidth, getContextMenu, getContextMenu, getCookie, getExtent, getExtent, getFieldStyle, getFocusListener, getFont, getHeight, getIndex, getLeafFieldWithFocus, getLeft, getManager, getMargin, getMarginBottom, getMarginLeft, getMarginRight, getMarginTop, getOriginal, getPadding, getPaddingBottom, getPaddingLeft, getPaddingRight, getPaddingTop, getScreen, getState, getStyle, getTop, getVisualState, getWidth, invalidate, invalidate, invalidateAll, isDataValid, isDirty, isEditable, isFocus, isFocusable, isMuddy, isPasteable, isSelectable, isSelecting, isSelectionCopyable, isSelectionCutable, isSelectionDeleteable, isSpellCheckable, isStyle, isVisible, keyDown, keyRepeat, keyUp, makeContextMenu, moveFocus, onDisplay, onExposed, onMenuDismissed, onMenuDismissed, onObscured, onUndisplay, onVisibilityChange, paintBackground, paste, select, selectionCopy, selectionCut, selectionDelete, setBackground, setBackground, setBorder, setBorder, setBorder, setBorder, setBorder, setChangeListener, setCookie, setDirty, setEditable, setExtent, setFocus, setFocusListener, setFont, setFont, setMargin, setMargin, setMuddy, setNonSpellCheckable, setPadding, setPadding, setPosition, setVisualState, trackwheelClick, trackwheelUnclick, updateLayout
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

_namedQuery

protected java.lang.String _namedQuery

_namedQuerySubmitElements

protected java.util.Vector _namedQuerySubmitElements
Constructor Detail

SelectBox

public SelectBox(java.lang.String label,
                 java.lang.Object[] choices,
                 int initialIndex,
                 long style)
Constructor to create a new select box

Parameters:
label - String value for the label
choices - Object array of choices that goes in this select box
initialIndex - int value for the selected index choice
style - long value for the style of the input

SelectBox

public SelectBox(java.lang.String label,
                 java.lang.Object[] choices,
                 int initialIndex)
Constructor to create a new select box

Parameters:
label - String value for the label
choices - Object array of choices that goes in this select box
initialIndex - int value for the selected index choice
Method Detail

getMobileAppID

public java.lang.String getMobileAppID()
Retrieve the Mobile Application ID

Specified by:
getMobileAppID in interface MobileDataControl
Returns:
String value of the mobile application ID

getMobileApplicationName

public java.lang.String getMobileApplicationName()
Retrieve the application data name

Specified by:
getMobileApplicationName in interface MobileDataControl
Returns:
String value of the name of the application data

getApplicationData

public MBOModel getApplicationData()
Retrieve the application currently set for this table

Specified by:
getApplicationData in interface MobileDataControl
Returns:
MBOModel application data object
See Also:
MBOModel

setApplicationData

public void setApplicationData(MBOModel applicationData)
Set the application data

Specified by:
setApplicationData in interface MobileDataControl
Parameters:
applicationData - MBOModel mobile application objects
See Also:
MBOModel

setRelationshipAppData

public void setRelationshipAppData(MBOModel parentAppData,
                                   java.lang.Object selectedRow,
                                   java.lang.String assoicationName)
Set relationship application data

Specified by:
setRelationshipAppData in interface MobileDataControl
Parameters:
parentAppData - MBOModel object for the parent relationship
selectedRow - Object value for the selected row object
assoicationName - String value for the parent relationship association name
See Also:
MBOModel

setNamedQuery

public void setNamedQuery(java.lang.String namedQuery)
(non-Javadoc)

Specified by:
setNamedQuery in interface MobileDataControl
Parameters:
namedQuery - String value for the named query name
See Also:
MobileDataControl.setNamedQuery(String)

setNamedQuerySubmitElements

public void setNamedQuerySubmitElements(java.util.Vector parameters)
(non-Javadoc)

Specified by:
setNamedQuerySubmitElements in interface MobileDataControl
Parameters:
parameters - Vector list of SubmitElement objects
See Also:
com.sybase.uep.bobclient.controls.MobileDataControl#setNamedQuerySubmitElements(String)

setNamedQueryParameters

public void setNamedQueryParameters(java.util.Hashtable parameters)
(non-Javadoc)

Specified by:
setNamedQueryParameters in interface MobileDataControl
Parameters:
parameters - Hashtable map of name value pair
See Also:
MobileDataControl.setNamedQueryParameters(Hashtable)

setDynamicNamedQuery

public void setDynamicNamedQuery(java.lang.String namedQuery)
(non-Javadoc)

Specified by:
setDynamicNamedQuery in interface MobileDataControl
Parameters:
namedQuery - String value for the dynamic named query name
See Also:
MobileDataControl.setDynamicNamedQuery(String)

setDynamicNamedQueryParameters

public void setDynamicNamedQueryParameters(java.util.Hashtable parameters)
(non-Javadoc)

Specified by:
setDynamicNamedQueryParameters in interface MobileDataControl
Parameters:
parameters - Hashtable map of name value pair
See Also:
MobileDataControl.setNamedQueryParameters(Hashtable)

hasRelationshipAppData

public boolean hasRelationshipAppData()
Check is this mobile data control contains relationship data

Specified by:
hasRelationshipAppData in interface MobileDataControl
Returns:
true if there are relationship data, otherwise false

getRelationshipParentAppData

public MBOModel getRelationshipParentAppData()
Retrieve relationship parent application dat

Specified by:
getRelationshipParentAppData in interface MobileDataControl
Returns:
MBOModel application data object
See Also:
MBOModel

getColumnAttributes

public MBOAttribute[] getColumnAttributes()
Retrieve the column attributes

Specified by:
getColumnAttributes in interface MobileDataControl
Returns:
MBOAttribute array list of MBOAttribute objects
See Also:
MBOAttribute

getCurrentRow

public java.lang.Object getCurrentRow()
Retrieve current selected row

Specified by:
getCurrentRow in interface MobileDataControl
Returns:
Object value of the current Row

getDataProperties

public Query getDataProperties()
Retrieve the data properties

Specified by:
getDataProperties in interface MobileDataControl
Returns:
Query data properties object
See Also:
Query

setDataProperties

public void setDataProperties(Query dataProps)
Set the data properties filtering

Specified by:
setDataProperties in interface MobileDataControl
Parameters:
dataProps - Query object for the mobile application data propertiess

getLinkedValue

public java.lang.String getLinkedValue()
Retrieve the linked paramter value defined

Returns:
String value for the linked parameter

getLinkParameters

public LinkParamNode getLinkParameters()
Retrieve the link parameter object

Returns:
LinkParamNode link parameter object
See Also:
LinkParamNode

initMobileApplicationData

public void initMobileApplicationData()
Setup select boxes if there is a mobile application defined

Specified by:
initMobileApplicationData in interface MobileDataControl

setBackgroundColor

public void setBackgroundColor(int bgcolor)
(non-Javadoc)

Specified by:
setBackgroundColor in interface Control
Parameters:
bgcolor - int value of the color in HEX. For example: 0x00000000, 0x00FF0000, 0x00FFFFFF
See Also:
Control.setBackgroundColor(int bgcolor)

setColSpan

public void setColSpan(int colspan)
(non-Javadoc)

Specified by:
setColSpan in interface Control
Parameters:
colspan - int value of the column span
See Also:
Control.setColSpan(int colspan)

getColSpan

public int getColSpan()
(non-Javadoc)

Specified by:
getColSpan in interface Control
Returns:
int value of the column span
See Also:
Control.getColSpan()

setRowSpan

public void setRowSpan(int rowspan)
(non-Javadoc)

Specified by:
setRowSpan in interface Control
Parameters:
rowspan - int value of the row span
See Also:
Control.setRowSpan(int rowspan)

getRowSpan

public int getRowSpan()
(non-Javadoc)

Specified by:
getRowSpan in interface Control
Returns:
int value of the row span
See Also:
Control.getRowSpan()

getHorizontalAlignment

public long getHorizontalAlignment()
(non-Javadoc)

Specified by:
getHorizontalAlignment in interface Control
Returns:
long value of the horizontal alignment. Possible values could be Field.FIELD_HCENTER, Field.FIELD_RIGHT, or Field.FIELD_LEFT
See Also:
Control.getHorizontalAlignment()

getVerticalAlignment

public long getVerticalAlignment()
(non-Javadoc)

Specified by:
getVerticalAlignment in interface Control
Returns:
long value of the vertical alignment Possible values could be Field.FIELD_TOP, Field.FIELD_BOTTOM, or Field.FIELD_VCENTER
See Also:
Control.getVerticalAlignment()

setSelectedValue

public void setSelectedValue()
Set the selected value for this select box


setVariableSelectedValue

public void setVariableSelectedValue(ControlVariable variable)
Set the control variable object for the selected index of the select box

Parameters:
variable - ControlVariable control variable object
See Also:
ControlVariable

setVariableLabel

public void setVariableLabel(ControlVariable variable)
Set the control variable object for the label

Parameters:
variable - ControlVariable control variable object
See Also:
ControlVariable

getFontStyle

public FontStyle getFontStyle()
Retrieve this control's font style

Returns:
FontStyle font style object
See Also:
FontStyle

setFontStyle

public void setFontStyle(FontStyle fontStyle)
Set the unfocus font style for this control

Parameters:
fontStyle - FontStyle font style object
See Also:
FontStyle

setFocusFontStyle

public void setFocusFontStyle(FontStyle fontStyle)
Set the focus font style for this control

Parameters:
fontStyle -

getFieldIndex

public int getFieldIndex()
Retrieve the edit index for this select box

Returns:
int value for the field index

getType

public java.lang.String getType()
Retrieve the type for this select box

Returns:
String value for the control type

getName

public java.lang.String getName()
(non-Javadoc)

Specified by:
getName in interface Control
Returns:
String value of the key name
See Also:
Control.getName()

getDisplayName

public java.lang.String getDisplayName()
The display name of the select box

Returns:
String value for the display name

getLogicalType

public LogicalType getLogicalType()
Retrieve the logical type assign to this control

Specified by:
getLogicalType in interface PIMControl
Returns:
LogicalType logical type object
See Also:
LogicalType

setLogicalType

public void setLogicalType(LogicalType logicalType)
Set logical type

Parameters:
logicalType - LogicalType logical type object
See Also:
LogicalType

getSchemaType

public java.lang.String getSchemaType()
Retrieve the schema type

Specified by:
getSchemaType in interface PIMControl
Returns:
String value for the schema type

setSchemaType

public void setSchemaType(java.lang.String schemaType)
Set the schema type

Parameters:
schemaType - String value for the schema type

setPIMValue

public void setPIMValue(java.lang.Object value)
Sets the PIM value

Specified by:
setPIMValue in interface PIMControl
Parameters:
value - Object PIM value

getPIMValue

public java.lang.Object getPIMValue()
Retrieve the PIM value

Specified by:
getPIMValue in interface PIMControl
Returns:
Object value for the PIM

getValue

public java.lang.Object getValue()
(non-Javadoc)

Specified by:
getValue in interface Control
Returns:
Object of the value set for this control
See Also:
Control.getValue()

getValidationObj

public ValidationObject getValidationObj()
Retrieve the validation object set on this checkbox

Returns:
ValidationObject validation object
See Also:
ValidationObject

hasValidation

public boolean hasValidation()
Check if there is a validation object assigned to this control

Returns:
true if there is validation object set, otherwise false

setRequired

public void setRequired(boolean required)
Set if this select box is required

Parameters:
required - true if control is required, otherwise false

isRequired

public boolean isRequired()
Check if this select box is required

Returns:
true if required, otherwise false

setLayoutWidth

public void setLayoutWidth(int width)
(non-Javadoc)

Specified by:
setLayoutWidth in interface Control
Parameters:
width - int value of the available layout width
See Also:
Control.setLayoutWidth(int width)

makeContextMenu

protected void makeContextMenu(net.rim.device.api.ui.ContextMenu menu)
(non-Javadoc)

Overrides:
makeContextMenu in class net.rim.device.api.ui.component.ChoiceField
See Also:
Field.makeContextMenu(ContextMenu menu)

getPreferredWidth

public int getPreferredWidth()
(non-Javadoc)

Specified by:
getPreferredWidth in interface Control
Overrides:
getPreferredWidth in class net.rim.device.api.ui.component.ChoiceField
Returns:
int value of the available layout width
See Also:
Control.getPreferredWidth()

getSelectedItemWidth

public int getSelectedItemWidth()
Retrieve selected item label width

Returns:
int value of the width of the text of the selected item.

setLayoutHeight

public void setLayoutHeight(int height)
(non-Javadoc)

Specified by:
setLayoutHeight in interface Control
Parameters:
height - int value of the available layout height
See Also:
Control.setLayoutHeight(int height)

getPreferredHeight

public int getPreferredHeight()
(non-Javadoc)

Specified by:
getPreferredHeight in interface Control
Overrides:
getPreferredHeight in class net.rim.device.api.ui.component.ChoiceField
Returns:
int value of the available layout height
See Also:
Control.getPreferredHeight()

onFocus

protected void onFocus(int direction)
(non-Javadoc)

Overrides:
onFocus in class net.rim.device.api.ui.Field
See Also:
Field.onFocus(int direction)

onUnfocus

protected void onUnfocus()
(non-Javadoc)

Overrides:
onUnfocus in class net.rim.device.api.ui.Field
See Also:
Field.onUnfocus()

navigationClick

protected boolean navigationClick(int status,
                                  int time)
(non-Javadoc)

Overrides:
navigationClick in class net.rim.device.api.ui.Field
See Also:
Field.navigationClick(int status, int time)

navigationUnclick

protected boolean navigationUnclick(int status,
                                    int time)
(non-Javadoc)

Overrides:
navigationUnclick in class net.rim.device.api.ui.Field
See Also:
Field.navigationUnclick(int status, int time)

navigationMovement

protected boolean navigationMovement(int dx,
                                     int dy,
                                     int status,
                                     int time)
(non-Javadoc)

Overrides:
navigationMovement in class net.rim.device.api.ui.Field
See Also:
Field.navigationMovement(int dx, int dy, int status, int time)

fieldChanged

public void fieldChanged(net.rim.device.api.ui.Field field,
                         int context)
(non-Javadoc)

Specified by:
fieldChanged in interface net.rim.device.api.ui.FieldChangeListener
See Also:
FieldChangeListener.fieldChanged(Field field, int context)

touchEvent

protected boolean touchEvent(net.rim.device.api.ui.TouchEvent message)
(non-Javadoc)

Overrides:
touchEvent in class net.rim.device.api.ui.Field
See Also:
Field.touchEvent(TouchEvent message)

layout

protected void layout(int width,
                      int height)
(non-Javadoc)

Overrides:
layout in class net.rim.device.api.ui.component.ChoiceField
See Also:
Field.layout(int width, int height)

drawFocus

protected void drawFocus(net.rim.device.api.ui.Graphics g,
                         boolean on)
(non-Javadoc)

Overrides:
drawFocus in class net.rim.device.api.ui.Field
See Also:
Field.drawFocus(Graphics g, boolean on)

getFocusRect

public void getFocusRect(net.rim.device.api.ui.XYRect rect)
Overrides:
getFocusRect in class net.rim.device.api.ui.component.ChoiceField

paint

protected void paint(net.rim.device.api.ui.Graphics g)
(non-Javadoc)

Overrides:
paint in class net.rim.device.api.ui.component.ChoiceField
See Also:
Field.paint(Graphics g)

refresh

public void refresh()
(non-Javadoc)

Specified by:
refresh in interface Control
See Also:
Control.refresh()

setProperty

public void setProperty(int key,
                        java.lang.String value)
Set the property values for this select box item

Parameters:
key - int int value for the key of a specific attribute
value - String value for this attribute

refreshFooter

public void refreshFooter(java.lang.String valueToBeDisplay)
Refresh the footer field from the screen that contains the text of the button.

Parameters:
valueToBeDisplay - String value of the text value to be display in the footer

setupMobileDataControlContextVariables

public void setupMobileDataControlContextVariables()
Save current selected row of this mobile data control

Specified by:
setupMobileDataControlContextVariables in interface MobileDataControl

setDisplayName

public void setDisplayName(java.lang.String name)
Set display name

Parameters:
name - String value of the display name for this control

setType

public void setType(java.lang.String type)
Set type

Parameters:
type - String value for the type of the update

setName

public void setName(java.lang.String name)
Set a key name for this control

Parameters:
name - String value for the key name for this control

setValidationObject

public void setValidationObject(ValidationObject obj)
Set validation object

Parameters:
obj - ValidationObject validation object
See Also:
ValidationObject

setFieldIndex

public void setFieldIndex(int index)
Set edit index

Parameters:
editIndex - int value of the edit index used by update container

setFooterField

public void setFooterField(FooterField field)
Set the footer field

Parameters:
{@link - FooterField} footer field to put the text of the textinput into. This is useful for long text, so it can be displayed in the footer. null value if there is no footer.
See Also:
FooterField

setMobileAppID

public void setMobileAppID(java.lang.String appID)
Set mobile application id

Parameters:
mobileAppId - String value for the mobile application ID

setNameColumnName

public void setNameColumnName(java.lang.String columnName)
Set name of name column

Parameters:
nameColumnName - String value for the column name

setValueColumnName

public void setValueColumnName(java.lang.String columnName)
Set name of value column

Parameters:
valueColumnName - String value for the column name

setLinkedValue

public void setLinkedValue(java.lang.String value)
Set linked value

Parameters:
linkedValue - String value for the link parameter. A null (not linked) or value if this choice is linked with other SelectBox items in this layout with the same mobileAppId assigned.

setChoices

public void setChoices(java.lang.Object[] choices)
Set choices of the select box

Overrides:
setChoices in class net.rim.device.api.ui.component.ObjectChoiceField
Parameters:
choices - Object array list for the choices that goes in this select box

setSelectedValue

public void setSelectedValue(java.lang.String selectedValue)
Set selected value

Parameters:
selectedValue - String value for the selected value of the select box

getParentSelectedRow

public java.lang.Object getParentSelectedRow()
Retrieve parent selected row

Specified by:
getParentSelectedRow in interface MobileDataControl
Returns:
Object row object

getParentAssociationName

public java.lang.String getParentAssociationName()
Retrieve the parent association name

Specified by:
getParentAssociationName in interface MobileDataControl
Returns:
String value for the parent association name

getPagingObject

public PagingObject getPagingObject()
Retrieve a new paging object

Specified by:
getPagingObject in interface MobileDataControl
Returns:
PagingObject paging object
See Also:
PagingObject

getParentScreen

public IBOBScreen getParentScreen()
(non-Javadoc)

Specified by:
getParentScreen in interface MobileDataControl
Returns:
See Also:
MobileDataControl.getParentScreen()

modelChanged

public void modelChanged(ModelChangeEvent event)
(non-Javadoc)

Specified by:
modelChanged in interface IModelChangeListener
Parameters:
event - ModelChangeEvent model change event
See Also:
com.sybase.uep.bobclient.data.ModelChangeEvent#modelChanged(ModelChangeEvent event)

getCurrentRecordIndex

public int getCurrentRecordIndex()
Retrieve current record index

Specified by:
getCurrentRecordIndex in interface MobileDataControl
Returns:
int value for the current record index

setCurrentRecordIndex

public void setCurrentRecordIndex(int currentRecordIndex)
Set current record index

Specified by:
setCurrentRecordIndex in interface MobileDataControl

getDataHandler

public IMobileApplicationDataHandler getDataHandler()
Retrieve the mobile application data handler

Specified by:
getDataHandler in interface MobileDataControl
Returns:
MobileApplicationDataHandler mobile application data handler object
See Also:
MobileApplicationDataHandler

refreshData

public void refreshData()
Refresh the data

Specified by:
refreshData in interface MobileDataControl

clearQuery

public void clearQuery()
Description copied from interface: MobileDataControl
Clear the cached query

Specified by:
clearQuery in interface MobileDataControl

getCustomEventsDelegate

public ICustomEventsDelegate getCustomEventsDelegate()
Returns the control's custom events delegate

Returns:
the control's custom events delegate

setCustomEventsDelegate

public void setCustomEventsDelegate(ICustomEventsDelegate delegate,
                                    int eventsFlags)
Sets the control's custom events delegate for the given events

Parameters:
delegate - custom events delegate
eventsFlags - the events to set delegate to

getControlID

public int getControlID()
Returns the control's ID

Returns:
the control's Id

setControlID

public void setControlID(int controlID)
Sets the control's ID

Parameters:
controlId - control ID

getCustomEventsHandler

public CustomEventsHandler getCustomEventsHandler()
Returns the control's custom events handler

Returns:
the control's custom events handler

setLinkParamListener

public void setLinkParamListener(LinkParamListener linkParamListener)
Sets the LinkParamListener

Parameters:
linkParamListener -

getLinkParamListener

public LinkParamListener getLinkParamListener()
Gets the LinkParamListener

Returns:
the selectBox's LinkParamListener