com.sybase.uep.bobclient.controls
Class TabContentPanel

java.lang.Object
  extended by net.rim.device.api.ui.Field
      extended by net.rim.device.api.ui.Manager
          extended by com.sybase.uep.bobclient.controls.TabContentPanel

public class TabContentPanel
extends net.rim.device.api.ui.Manager

This is the Tab content panel that goes under a specific tab

Author:
tdang

Field Summary
static int DEFAULT_BORDER_COLOR
           
 
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
TabContentPanel()
          Constructor to instantiate the tab content panel
 
Method Summary
 java.lang.String getBackgroundImage()
          Gets the full file name of the background image
 net.rim.device.api.ui.Field getContent()
           
 int getPreferredHeight()
          Gets the preferred height of the button.
 int getPreferredWidth()
          Retrieves this field's preferred width.
 boolean isScaleBackgroundImage()
          Gets if to scale the background image to fill the container
protected  void paint(net.rim.device.api.ui.Graphics g)
          Draws the border around this panel This field's manager invokes this method during the repainting process to instruct this field to repaint itself.
 void setBackgroundImage(java.lang.String backgroundImage, boolean isScaleBackgroundImageAspectFit)
          Sets the background image of the content panel
 void setBorderColor(int color)
          Set border color around the panel
 void setContent(net.rim.device.api.ui.Field content)
          Set the content for this panel
 void setDisplayFontStyle(FontStyle fontStyle)
          Set display font style for tab panel
protected  void sublayout(int width, int height)
          Implements custom layout features for this manager.
 
Methods inherited from class net.rim.device.api.ui.Manager
add, clearCustomScrollArrows, delete, deleteAll, deleteRange, getAccessibleContext, getField, getFieldAtLocation, getFieldCount, getFieldWithFocus, getFieldWithFocusIndex, getFocusRect, getHorizontalScroll, getLeafFieldWithFocus, getPreferredHeightOfChild, getPreferredWidthOfChild, getVerticalScroll, getVirtualHeight, getVirtualWidth, getVisibleHeight, getVisibleWidth, insert, invalidate, invalidate, invalidateFieldRange, invokeAction, isDataValid, isDirty, isDownArrowShown, isFocusable, isMuddy, isSelecting, isUpArrowShown, isValidLayout, keyChar, keyControl, keyDown, keyRepeat, keyStatus, keyUp, layout, layoutChild, makeMenu, moveFocus, moveFocus, moveFocus, navigationClick, navigationMovement, navigationUnclick, nextFocus, nextFocus, onFocus, onUndisplay, onUnfocus, paintChild, replace, setDirty, setFocus, setHorizontalQuantization, setHorizontalScroll, setNonfocusableOverride, setPositionChild, setScrollListener, setVerticalQuantization, setVerticalScroll, setVirtualExtent, subpaint, touchEvent, trackwheelClick, trackwheelUnclick
 
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, getScreen, getState, getStyle, getTop, getVisualState, getWidth, invalidateAll, isEditable, isFocus, isPasteable, isSelectable, isSelectionCopyable, isSelectionCutable, isSelectionDeleteable, isSpellCheckable, isStyle, isVisible, makeContextMenu, makeContextMenu, onDisplay, onExposed, onMenuDismissed, onMenuDismissed, onObscured, onVisibilityChange, paintBackground, paste, select, selectionCopy, selectionCut, selectionDelete, setBackground, setBackground, setBorder, setBorder, setBorder, setBorder, setBorder, setChangeListener, setCookie, setEditable, setExtent, setFocus, 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_BORDER_COLOR

public static final int DEFAULT_BORDER_COLOR
See Also:
Constant Field Values
Constructor Detail

TabContentPanel

public TabContentPanel()
Constructor to instantiate the tab content panel

Method Detail

sublayout

protected void sublayout(int width,
                         int height)
Implements custom layout features for this manager. If implementing a manager with custom layout features, extend the Manager class and implement this method. Invoking the sublayout method prompts your manager subclass to lay out controlled fields appropriately. layout(int, int) invokes this method to perform custom layout handling.

Specified by:
sublayout in class net.rim.device.api.ui.Manager
Parameters:
width - - Width available for this manager.
height - - Height available for this manager.

setDisplayFontStyle

public void setDisplayFontStyle(FontStyle fontStyle)
Set display font style for tab panel

Parameters:
fontStyle - - font style object

setBorderColor

public void setBorderColor(int color)
Set border color around the panel

Parameters:
color - - int value of the color

setContent

public void setContent(net.rim.device.api.ui.Field content)
Set the content for this panel

Parameters:
content - - Field type contents for this tab panel

getContent

public net.rim.device.api.ui.Field getContent()

getPreferredWidth

public int getPreferredWidth()
Retrieves this field's preferred width. Your implementation of getPreferredWidth() should return the width of your custom field if it has any amount of space available.

Overrides:
getPreferredWidth in class net.rim.device.api.ui.Field
Returns:
Preferred width for this field in pixels.

paint

protected void paint(net.rim.device.api.ui.Graphics g)
Draws the border around this panel This field's manager invokes this method during the repainting process to instruct this field to repaint itself.

Overrides:
paint in class net.rim.device.api.ui.Manager
Parameters:
graphics - Graphics context for repainting this field.

getPreferredHeight

public int getPreferredHeight()
Gets the preferred height of the button.

Overrides:
getPreferredHeight in class net.rim.device.api.ui.Field
Returns:
int value of the height

getBackgroundImage

public java.lang.String getBackgroundImage()
Gets the full file name of the background image

Returns:
full image file name

setBackgroundImage

public void setBackgroundImage(java.lang.String backgroundImage,
                               boolean isScaleBackgroundImageAspectFit)
Sets the background image of the content panel

Parameters:
backgroundImage - - full file name of the background image
isScaleBackgroundImageAspectFit - - true means to scale the background image as aspect fit, false as aspect fill

isScaleBackgroundImage

public boolean isScaleBackgroundImage()
Gets if to scale the background image to fill the container

Returns:
true means to scale the background image to fill the container