com.sybase.uep.bobclient.screens
Class PersonalizationScreen

java.lang.Object
  extended by net.rim.device.api.ui.Field
      extended by net.rim.device.api.ui.Manager
          extended by net.rim.device.api.ui.Screen
              extended by net.rim.device.api.ui.container.FullScreen
                  extended by net.rim.device.api.ui.container.MainScreen
                      extended by com.sybase.uep.bobclient.screens.BaseBOBScreen
                          extended by com.sybase.uep.bobclient.screens.BaseBOBStockScreen
                              extended by com.sybase.uep.bobclient.screens.PersonalizationScreen
All Implemented Interfaces:
IBOBScreen, java.lang.Runnable

public class PersonalizationScreen
extends BaseBOBStockScreen

This is the personalization screen

This screen will list out available personalization keys

Author:
tdang
See Also:
BaseBOBStockScreen

Field Summary
static java.lang.String COMPLEX_PK_SUFFIX
           
static java.lang.String DEFAULT_ADD_MENU_LABEL
           
static java.lang.String DEFAULT_CLOSE_BUTTON_LABEL
           
static java.lang.String DEFAULT_CLOSE_MENU_LABEL
           
static java.lang.String DEFAULT_EDIT_MENU_LABEL
           
static java.lang.String DEFAULT_ERROR_LOADING_PERSONALIZATION_MESSAGE
           
static java.lang.String DEFAULT_NO_PERSONALIZATION_APP_MESSAGE
           
static java.lang.String DEFAULT_NO_PERSONALIZATION_KEYS_MESSAGE
           
static java.lang.String DEFAULT_NO_PERSONALIZATION_KEYS_NO_CHANGE_MESSAGE
           
static java.lang.String DEFAULT_NULL_CHECKBOX_LABEL
           
static net.rim.device.api.system.EncodedImage DEFAULT_PACKAGE_ICON
           
static net.rim.device.api.system.Bitmap DEFAULT_PERSONALIZATION_ICON
           
static java.lang.String DEFAULT_REMOVE_MENU_LABEL
           
static java.lang.String DEFAULT_TITLE_LABEL
           
static java.lang.String DEFAULT_UPDATE_BUTTON_LABEL
           
static java.lang.String DEFAULT_UPDATE_MENU_LABEL
           
static int DEFAULT_VALUE_MAX_LENGTH
           
static java.lang.String DEFAULT_VALUE_NULLABE_VALUE_MESSAGE
           
static java.lang.String DEFAULT_VALUE_TOO_LONG_VALUE_MESSAGE
           
static java.lang.String LIST_SCALAR_PK_SUFFIX
           
static java.lang.String SIMPLE_PK_SUFFIX
           
 
Fields inherited from class com.sybase.uep.bobclient.screens.BaseBOBStockScreen
_backgroundImage, _isScaleBackgroundImageAspectFit, _navigationBarBorderStyle, _navigationBarStyle, _screenTitle
 
Fields inherited from class com.sybase.uep.bobclient.screens.BaseBOBScreen
_appLogger, KEY
 
Fields inherited from class net.rim.device.api.ui.container.MainScreen
NO_STATUS_SEPARATOR, NO_TITLE_SEPARATOR
 
Fields inherited from class net.rim.device.api.ui.Screen
DEFAULT_CLOSE, DEFAULT_MENU, NO_SYSTEM_MENU_ITEMS
 
Fields inherited from class net.rim.device.api.ui.Manager
BOTTOMMOST, DOWNWARD, HORIZONTAL_SCROLL, HORIZONTAL_SCROLL_MASK, HORIZONTAL_SCROLLBAR, HORIZONTAL_SCROLLBAR_MASK, LEAVE_BLANK_SPACE, LEFTMOST, LEFTWARD, NO_HORIZONTAL_SCROLL, NO_HORIZONTAL_SCROLLBAR, NO_SCROLL_RESET, NO_VERTICAL_SCROLL, NO_VERTICAL_SCROLLBAR, QUANTA_FONT, RIGHTMOST, RIGHTWARD, TOPMOST, UPWARD, VERTICAL_SCROLL, VERTICAL_SCROLL_MASK, VERTICAL_SCROLLBAR, VERTICAL_SCROLLBAR_MASK
 
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
 
Constructor Summary
PersonalizationScreen(int screenTitleRID)
          Constructor to create the Personalization Screen
PersonalizationScreen(java.lang.String screenTitle)
          Constructor to create the Personalization Screen
 
Method Summary
protected  void defineScreen()
          (non-Javadoc)
 FontStyle getButtonFocusFontStyle()
          Get the button focus font style
 FontStyle getButtonUnfocusFontStyle()
          Get the button unfocus font style
 FontStyle getLabelFontStyle()
          Get label font style
 FontStyle getProfileLabelFontStyle()
          Get profile label font style
 FontStyle getScreenFontStyle()
          Get this screen's font style
protected  void onFocusNotify(boolean focus)
          (non-Javadoc)
protected  boolean onSavePrompt()
          This is called when the user click the escape We will then want to ask if the user want to save the form
 void refresh()
          (non-Javadoc)
 void refreshPerListTree(java.lang.String key)
           
 void setAddScalarPersKeyMenuLabel(java.lang.String label)
          Set the add personalization key menu label
 void setButtonFocusFontStyle(FontStyle fontStyle)
          Set the button focus font style for this control
 void setButtonUnfocusFontStyle(FontStyle fontStyle)
          Set the button unfocus font style for this control
 void setCloseButtonLabel(java.lang.String label)
          Set the close button label
 void setCloseMenuLabel(java.lang.String label)
          Set the close menu label
 void setEditScalarPersKeyMenuLabel(java.lang.String label)
          Set the edit personalization key menu label
 void setLabelFontStyle(FontStyle fontStyle)
          Set label font style
 void setNoPersonalizationAppErrorMessage(java.lang.String msg)
          Set the no personalization application error message
 void setNoPersonalizationKeysMessage(java.lang.String msg)
          Set the no personalization keys message
 void setNoPersonalizationKeysNoChangeMessage(java.lang.String msg)
          Set the no personalization keys change message
 void setNullValueNotAllowedMessage(java.lang.String msg)
           
 void setPackageIcon(java.lang.Object image)
          Set personalization package icon
 void setPersonalizationErrorMessage(java.lang.String msg)
          Set the loading personalization error message
 void setPersonizationIcon(java.lang.Object image)
          Set personization icon
 void setProfileLabelFontStyle(FontStyle fontStyle)
          Set profile label font style
 void setProperty(int key, int resourceID)
          Set the property values for the screen
 void setProperty(int key, java.lang.Object value)
          Set the property values for this screen
 void setRemoveScalarPersKeyMenuLabel(java.lang.String label)
          Set the remove personalization key menu label
 void setScreenFontStyle(FontStyle fontStyle)
          Set the font style for this screen
 void setUpdatePersKeyButtonLabel(java.lang.String label)
          Set the update personalization key button label
 void setUpdatePersKeyMenuLabel(java.lang.String label)
          Set the update personalization key menu label
 void setValueMaxLength(java.lang.String value)
          Set the value max length
 void setValueTooLongPersonalizationMsg(java.lang.String msg)
          Set the value max length exceeded error message
 void updatePersonalizationKeys()
          Update personalization keys
 
Methods inherited from class com.sybase.uep.bobclient.screens.BaseBOBStockScreen
closeScreen, runOnSaveActions, setNavigationBarBorderStyle, setNavigationBarLabel, setNavigationBarStyle, setOnCloseActions, setOnSaveActions
 
Methods inherited from class com.sybase.uep.bobclient.screens.BaseBOBScreen
addMenuAction, addMenuAction, addMenuAction, addMenuAction, addMenuAction, addMenuAction, addMenuAction, addMenuAction, addMenuAction, addMenuAction, addMenuSeperator, addMenuSeperator, addReferencedMBO, addSourceConnectionReference, addSpacer, askMobileDataControlRefresh, deleteMenuAction, getFooter, getLabelMsgString, getLabelMsgValue, getMenuGroup, getMenuItemByName, getMenuItemByNameAndDisable, getParentScreen, getReferencedMBOList, getScreenContext, getSyncProgressBar, getUIController, initAppLogger, initScreenContext, isCache, isSynchronizing, keyChar, makeMenu, refreshScreenContext, run, setFooter, setFooterBorderColor, setFooterFontStyle, setFooterHasBorder, setFooterLabel, setHeaderFooter, setIsCache, setLabelMsgValue, setParentScreen, setSynchronizing
 
Methods inherited from class net.rim.device.api.ui.container.MainScreen
addMenuItem, getField, getFieldCount, getFieldWithFocus, getFieldWithFocusIndex, getMainManager, keyCharUnhandled, removeAllMenuItems, removeMenuItem, setBanner, setId, setStatus, setTitle, setTitle, setTitle, setTitle
 
Methods inherited from class net.rim.device.api.ui.container.FullScreen
sublayout
 
Methods inherited from class net.rim.device.api.ui.Screen
add, addKeyListener, addScreenUiEngineAttachedListener, addTrackwheelListener, close, delete, deleteRange, dispatchKeyEvent, doLayout, doPaint, ensureRegionVisible, getAccessibleContext, getApplication, getDefaultMenuItem, getDelegate, getFieldAtLocation, getFocusRect, getGraphics, getLeafFieldWithFocus, getMenu, getScreenAbove, getScreenBelow, getUiEngine, getVirtualKeyboard, insert, invalidate, invalidate, invalidateAll, invalidateLayout, invokeAction, isDataValid, isDirty, isDisplayed, isFocus, isFocusable, isGlobal, isGlobalStatus, isMuddy, isObscured, isSelecting, keyControl, keyDown, keyRepeat, keyStatus, keyUp, layoutDelegate, navigationClick, navigationMovement, navigationUnclick, onClose, onDisplay, onExposed, onFocus, onMenu, onMenuDismissed, onMenuDismissed, onObscured, onSave, onUiEngineAttached, onUndisplay, onUnfocus, openDevelopmentBackdoor, openProductionBackdoor, paint, paintBackground, removeFocus, removeKeyListener, removeScreenUiEngineAttachedListener, removeTrackwheelListener, replace, save, scroll, setBackdoorAltStatus, setDefaultClose, setDirty, setFocus, setFocus, setFocus, setHorizontalQuantization, setPositionDelegate, setTrackballFilter, setTrackballSensitivityXOffset, setTrackballSensitivityYOffset, setVerticalQuantization, touchEvent, trackwheelClick, trackwheelClickUnhandled, trackwheelRoll, trackwheelUnclick, updateDisplay
 
Methods inherited from class net.rim.device.api.ui.Manager
clearCustomScrollArrows, deleteAll, getHorizontalScroll, getPreferredHeightOfChild, getPreferredWidthOfChild, getVerticalScroll, getVirtualHeight, getVirtualWidth, getVisibleHeight, getVisibleWidth, invalidateFieldRange, isDownArrowShown, isUpArrowShown, isValidLayout, layout, layoutChild, moveFocus, moveFocus, moveFocus, nextFocus, nextFocus, paintChild, setFocus, setHorizontalScroll, setNonfocusableOverride, setPositionChild, setScrollListener, setVerticalScroll, setVirtualExtent, subpaint
 
Methods inherited from class net.rim.device.api.ui.Field
drawFocus, 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, getLeft, getManager, getMargin, getMarginBottom, getMarginLeft, getMarginRight, getMarginTop, getOriginal, getPadding, getPaddingBottom, getPaddingLeft, getPaddingRight, getPaddingTop, getPreferredHeight, getPreferredWidth, getScreen, getState, getStyle, getTop, getVisualState, getWidth, isEditable, isPasteable, isSelectable, isSelectionCopyable, isSelectionCutable, isSelectionDeleteable, isSpellCheckable, isStyle, isVisible, makeContextMenu, makeContextMenu, onVisibilityChange, paste, select, selectionCopy, selectionCut, selectionDelete, setBackground, setBackground, setBorder, setBorder, setBorder, setBorder, setBorder, setChangeListener, setCookie, setEditable, setExtent, setFocusListener, setFont, setFont, setMargin, setMargin, setMuddy, setNonSpellCheckable, setPadding, setPadding, setPosition, setVisualState, updateLayout
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DEFAULT_TITLE_LABEL

public static final java.lang.String DEFAULT_TITLE_LABEL
See Also:
Constant Field Values

DEFAULT_PERSONALIZATION_ICON

public static final net.rim.device.api.system.Bitmap DEFAULT_PERSONALIZATION_ICON

DEFAULT_PACKAGE_ICON

public static final net.rim.device.api.system.EncodedImage DEFAULT_PACKAGE_ICON

DEFAULT_CLOSE_MENU_LABEL

public static final java.lang.String DEFAULT_CLOSE_MENU_LABEL
See Also:
Constant Field Values

DEFAULT_UPDATE_MENU_LABEL

public static final java.lang.String DEFAULT_UPDATE_MENU_LABEL
See Also:
Constant Field Values

DEFAULT_EDIT_MENU_LABEL

public static final java.lang.String DEFAULT_EDIT_MENU_LABEL
See Also:
Constant Field Values

DEFAULT_ADD_MENU_LABEL

public static final java.lang.String DEFAULT_ADD_MENU_LABEL
See Also:
Constant Field Values

DEFAULT_REMOVE_MENU_LABEL

public static final java.lang.String DEFAULT_REMOVE_MENU_LABEL
See Also:
Constant Field Values

DEFAULT_CLOSE_BUTTON_LABEL

public static final java.lang.String DEFAULT_CLOSE_BUTTON_LABEL
See Also:
Constant Field Values

DEFAULT_UPDATE_BUTTON_LABEL

public static final java.lang.String DEFAULT_UPDATE_BUTTON_LABEL
See Also:
Constant Field Values

DEFAULT_NULL_CHECKBOX_LABEL

public static final java.lang.String DEFAULT_NULL_CHECKBOX_LABEL
See Also:
Constant Field Values

DEFAULT_NO_PERSONALIZATION_KEYS_MESSAGE

public static final java.lang.String DEFAULT_NO_PERSONALIZATION_KEYS_MESSAGE
See Also:
Constant Field Values

DEFAULT_NO_PERSONALIZATION_KEYS_NO_CHANGE_MESSAGE

public static final java.lang.String DEFAULT_NO_PERSONALIZATION_KEYS_NO_CHANGE_MESSAGE
See Also:
Constant Field Values

DEFAULT_NO_PERSONALIZATION_APP_MESSAGE

public static final java.lang.String DEFAULT_NO_PERSONALIZATION_APP_MESSAGE
See Also:
Constant Field Values

DEFAULT_ERROR_LOADING_PERSONALIZATION_MESSAGE

public static final java.lang.String DEFAULT_ERROR_LOADING_PERSONALIZATION_MESSAGE
See Also:
Constant Field Values

DEFAULT_VALUE_MAX_LENGTH

public static final int DEFAULT_VALUE_MAX_LENGTH
See Also:
Constant Field Values

DEFAULT_VALUE_TOO_LONG_VALUE_MESSAGE

public static final java.lang.String DEFAULT_VALUE_TOO_LONG_VALUE_MESSAGE
See Also:
Constant Field Values

DEFAULT_VALUE_NULLABE_VALUE_MESSAGE

public static final java.lang.String DEFAULT_VALUE_NULLABE_VALUE_MESSAGE
See Also:
Constant Field Values

LIST_SCALAR_PK_SUFFIX

public static final java.lang.String LIST_SCALAR_PK_SUFFIX
See Also:
Constant Field Values

SIMPLE_PK_SUFFIX

public static final java.lang.String SIMPLE_PK_SUFFIX
See Also:
Constant Field Values

COMPLEX_PK_SUFFIX

public static final java.lang.String COMPLEX_PK_SUFFIX
See Also:
Constant Field Values
Constructor Detail

PersonalizationScreen

public PersonalizationScreen(java.lang.String screenTitle)
Constructor to create the Personalization Screen

Parameters:
screenTitle - String value for the screen title

PersonalizationScreen

public PersonalizationScreen(int screenTitleRID)
Constructor to create the Personalization Screen

Parameters:
screenTitleRID - int value for the screen title resource id
Method Detail

defineScreen

protected void defineScreen()
(non-Javadoc)

Overrides:
defineScreen in class BaseBOBStockScreen
See Also:
BaseBOBScreen.defineScreen()

refreshPerListTree

public void refreshPerListTree(java.lang.String key)

getScreenFontStyle

public FontStyle getScreenFontStyle()
Get this screen's font style

Returns:
FontStyle font style object
See Also:
FontStyle

setScreenFontStyle

public void setScreenFontStyle(FontStyle fontStyle)
Set the font style for this screen

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

getLabelFontStyle

public FontStyle getLabelFontStyle()
Get label font style

Returns:
FontStyle font style object
See Also:
FontStyle

setLabelFontStyle

public void setLabelFontStyle(FontStyle fontStyle)
Set label font style

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

getProfileLabelFontStyle

public FontStyle getProfileLabelFontStyle()
Get profile label font style

Returns:
FontStyle font style object
See Also:
FontStyle

setProfileLabelFontStyle

public void setProfileLabelFontStyle(FontStyle fontStyle)
Set profile label font style

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

getButtonUnfocusFontStyle

public FontStyle getButtonUnfocusFontStyle()
Get the button unfocus font style

Returns:
FontStyle font style object
See Also:
FontStyle

setButtonUnfocusFontStyle

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

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

getButtonFocusFontStyle

public FontStyle getButtonFocusFontStyle()
Get the button focus font style

Returns:
FontStyle font style object
See Also:
FontStyle

setButtonFocusFontStyle

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

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

setCloseMenuLabel

public void setCloseMenuLabel(java.lang.String label)
Set the close menu label

Parameters:
label - String value for the new label

setUpdatePersKeyMenuLabel

public void setUpdatePersKeyMenuLabel(java.lang.String label)
Set the update personalization key menu label

Parameters:
label - String value for the new label

setCloseButtonLabel

public void setCloseButtonLabel(java.lang.String label)
Set the close button label

Parameters:
label - String value for the new label

setUpdatePersKeyButtonLabel

public void setUpdatePersKeyButtonLabel(java.lang.String label)
Set the update personalization key button label

Parameters:
label - String value for the new label

setAddScalarPersKeyMenuLabel

public void setAddScalarPersKeyMenuLabel(java.lang.String label)
Set the add personalization key menu label

Parameters:
label - String value for the new label

setEditScalarPersKeyMenuLabel

public void setEditScalarPersKeyMenuLabel(java.lang.String label)
Set the edit personalization key menu label

Parameters:
label - String value for the new label

setRemoveScalarPersKeyMenuLabel

public void setRemoveScalarPersKeyMenuLabel(java.lang.String label)
Set the remove personalization key menu label

Parameters:
label - String value for the new label

setNoPersonalizationKeysMessage

public void setNoPersonalizationKeysMessage(java.lang.String msg)
Set the no personalization keys message

Parameters:
msg - String value for the new message

setNullValueNotAllowedMessage

public void setNullValueNotAllowedMessage(java.lang.String msg)

setNoPersonalizationKeysNoChangeMessage

public void setNoPersonalizationKeysNoChangeMessage(java.lang.String msg)
Set the no personalization keys change message

Parameters:
msg - String value for the new message

setPersonalizationErrorMessage

public void setPersonalizationErrorMessage(java.lang.String msg)
Set the loading personalization error message

Parameters:
msg - String value for the new message

setNoPersonalizationAppErrorMessage

public void setNoPersonalizationAppErrorMessage(java.lang.String msg)
Set the no personalization application error message

Parameters:
msg - String value for the new message

setValueTooLongPersonalizationMsg

public void setValueTooLongPersonalizationMsg(java.lang.String msg)
Set the value max length exceeded error message

Parameters:
msg - String value for the new message

setValueMaxLength

public void setValueMaxLength(java.lang.String value)
Set the value max length

Parameters:
msg - String value for the new message

setPersonizationIcon

public void setPersonizationIcon(java.lang.Object image)
Set personization icon

Parameters:
image - String value for the file name of the image or the Bitmap object

setPackageIcon

public void setPackageIcon(java.lang.Object image)
Set personalization package icon

Parameters:
image - String value for the file name of the image or the Bitmap object

updatePersonalizationKeys

public void updatePersonalizationKeys()
Update personalization keys


refresh

public void refresh()
(non-Javadoc)

Specified by:
refresh in interface IBOBScreen
Overrides:
refresh in class BaseBOBScreen
See Also:
BaseBOBScreen.refresh()

setProperty

public void setProperty(int key,
                        int resourceID)
Set the property values for the screen

Overrides:
setProperty in class BaseBOBScreen
Parameters:
key - int value for the screen property attribute
resourceID - int for the string localization resource ID

setProperty

public void setProperty(int key,
                        java.lang.Object value)
Set the property values for this screen

Overrides:
setProperty in class BaseBOBStockScreen
Parameters:
key - int value for a screen attribute
value - Object value for the attribute value
See Also:
ScreenProperties

onFocusNotify

protected void onFocusNotify(boolean focus)
Description copied from class: BaseBOBScreen
(non-Javadoc)

Overrides:
onFocusNotify in class BaseBOBScreen
See Also:
Screen.onFocusNotify(boolean focus)

onSavePrompt

protected boolean onSavePrompt()
This is called when the user click the escape We will then want to ask if the user want to save the form

Overrides:
onSavePrompt in class net.rim.device.api.ui.container.MainScreen
Returns:
true if prompt's resulting choice is to save; false if the prompt's resulting choice is to cancel