com.sybase.uep.bobclient.controls
Class TabControlLayout

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.container.VerticalFieldManager
              extended by com.sybase.uep.bobclient.controls.TabControlLayout

public class TabControlLayout
extends net.rim.device.api.ui.container.VerticalFieldManager

This is the Tab control layout container It contains a tabs layout to accommodate all tabs and a horizontal field manage to accommodate the active tab's header if any.

Author:
tdang

Nested Class Summary
protected  class TabControlLayout.TabsLayout
           
 
Field Summary
 
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
TabControlLayout(TabLayoutManager tabLayoutManager)
          Constructor to instantiate a tab control layout
 
Method Summary
 TabControl addTab(java.lang.String name, java.lang.String titleImageName, java.lang.String contentPanelBackgroundImageName, boolean isScaleContentPanelBackgroundImage, net.rim.device.api.ui.Field contents, boolean isActive)
          Add new tab to the tab layout manager
 void addTabChangeListener(TabLayoutManager.TabChangeListener listener)
          Add TabChangeListener instance to the list of listeners
 net.rim.device.api.ui.Field[] getAllFields()
          Get all the controls on this layout
 int getControlID()
          Returns the control's ID
 net.rim.device.api.ui.Field getCurrentTabContent()
          Get current active tab contents
 ICustomEventsDelegate getCustomEventsDelegate()
          Returns the control's custom events delegate
 int getMaxHeight()
          Get all the controls on this layout
 int getMaxTabHeight()
          Gets maximum tab control height of all tab controls
 int getParentTab()
          Get parent tab index
 net.rim.device.api.ui.Field getParentTabContent()
          Get parent tab contents
 int getSelectedTab()
          Get selected tab index
 TabControlLayout.TabsLayout getTabsLayout()
          Returns the tabs layout
 void gotoNextTab()
          Go to next tab
 void gotoPreviousTab()
          Go to previous tab
 void gotoTabIndex(int tabIndex)
          Go to tab by index
 boolean isDoubleClick()
          Is the tab being double clicked on
 void removeTabChangeListener(TabLayoutManager.TabChangeListener listener)
          Remove TabChangeListener instance from the list of listeners
 void setControlID(int controlID)
          Sets the control's ID
 void setCustomEventsDelegate(ICustomEventsDelegate delegate, int eventsFlags)
          Sets the control's custom events delegate for the given events
 
Methods inherited from class net.rim.device.api.ui.container.VerticalFieldManager
getFieldAtLocation, getPreferredHeight, getPreferredWidth, sublayout, subpaint
 
Methods inherited from class net.rim.device.api.ui.Manager
add, clearCustomScrollArrows, delete, deleteAll, deleteRange, getAccessibleContext, getField, 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, paint, paintChild, replace, setDirty, setFocus, setHorizontalQuantization, setHorizontalScroll, setNonfocusableOverride, setPositionChild, setScrollListener, setVerticalQuantization, setVerticalScroll, setVirtualExtent, 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
 

Constructor Detail

TabControlLayout

public TabControlLayout(TabLayoutManager tabLayoutManager)
Constructor to instantiate a tab control layout

Method Detail

addTab

public TabControl addTab(java.lang.String name,
                         java.lang.String titleImageName,
                         java.lang.String contentPanelBackgroundImageName,
                         boolean isScaleContentPanelBackgroundImage,
                         net.rim.device.api.ui.Field contents,
                         boolean isActive)
Add new tab to the tab layout manager

Parameters:
name - - name of the tab
titleImageName - - image file name of the tab title icon
contentPanelBackgroundImageName - - image file name of the content panel background
isScaleContentPanelBackgroundImage - - true means to scale the background image to fill the container
isActive - - True if the tab is currently active
contents - - contents that will be displayed for this tab
fontStyle - - Font Style

gotoPreviousTab

public void gotoPreviousTab()
Go to previous tab


gotoNextTab

public void gotoNextTab()
Go to next tab


gotoTabIndex

public void gotoTabIndex(int tabIndex)
Go to tab by index

Parameters:
tabIndex - - tab index

getSelectedTab

public int getSelectedTab()
Get selected tab index

Returns:
- index of the currently selected tab

isDoubleClick

public boolean isDoubleClick()
Is the tab being double clicked on

Returns:
- True if the tab is being double clicked

getParentTab

public int getParentTab()
Get parent tab index

Returns:
- index of the parent tab

getCurrentTabContent

public net.rim.device.api.ui.Field getCurrentTabContent()
Get current active tab contents

Returns:
Field object of the current tab

getParentTabContent

public net.rim.device.api.ui.Field getParentTabContent()
Get parent tab contents

Returns:
Field object of the parent tab

getAllFields

public net.rim.device.api.ui.Field[] getAllFields()
Get all the controls on this layout

Returns:
array of Controls

getMaxHeight

public int getMaxHeight()
Get all the controls on this layout

Returns:
array of Controls

getMaxTabHeight

public int getMaxTabHeight()
Gets maximum tab control height of all tab controls

Returns:
maximum tab control height

addTabChangeListener

public void addTabChangeListener(TabLayoutManager.TabChangeListener listener)
Add TabChangeListener instance to the list of listeners

Parameters:
listener -

removeTabChangeListener

public void removeTabChangeListener(TabLayoutManager.TabChangeListener listener)
Remove TabChangeListener instance from the list of listeners

Parameters:
listener -

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

getTabsLayout

public TabControlLayout.TabsLayout getTabsLayout()
Returns the tabs layout

Returns:
the tabs layout