|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnet.rim.device.api.ui.Field
net.rim.device.api.ui.Manager
com.sybase.uep.bobclient.controls.TabLayoutManager
public class TabLayoutManager
This is the Tab layout manager
Nested Class Summary | |
---|---|
static interface |
TabLayoutManager.TabChangeListener
Listener interface for handling tab change events. |
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 | |
---|---|
TabLayoutManager(FontStyle displayFontStyle,
FontStyle activeTabFontStyle,
FontStyle inactiveTabFontStyle,
FooterField footerField,
int activeTabBorderColor,
int inactiveTabBorderColor)
Constructor to instantiate a tab layout manager |
Method Summary | |
---|---|
void |
addTab(int nameRID,
java.lang.String titleImageName,
java.lang.String contentPanelBackgroundImageName,
boolean isScaleContentPanelBackgroundImage,
boolean isActive,
net.rim.device.api.ui.Field content)
Add new tab to the tab layout manager |
void |
addTab(java.lang.String name,
java.lang.String titleImageName,
java.lang.String contentPanelBackgroundImageName,
boolean isScaleContentPanelBackgroundImageAspectFit,
boolean isActive,
net.rim.device.api.ui.Field content)
Add new tab to the tab layout manager |
void |
addTabChangeListener(TabLayoutManager.TabChangeListener listener)
Add TabChangeListener instance to the list of listeners |
int |
getActiveTabBorderColor()
Retrieve active tab border color |
FontStyle |
getActiveTabFontStyle()
Retrieve active tab font style |
net.rim.device.api.ui.Field[] |
getAllFields()
Retrieve all the controls on this layout |
int |
getBorderEdgeBackgroundColor()
Retrieve border edge background color |
int |
getColSpan()
(non-Javadoc) |
TabContentPanel |
getContentPanel()
Gets content panel |
int |
getControlID()
Returns the control's ID |
net.rim.device.api.ui.Field |
getCurrentTabContent()
Retrieve current active tab contents |
ICustomEventsDelegate |
getCustomEventsDelegate()
Returns the control's custom events delegate |
long |
getHorizontalAlignment()
(non-Javadoc) |
int |
getInactiveTabBorderColor()
Retrieve inactive tab border color |
FontStyle |
getInactiveTabFontStyle()
Retrieve inactive tab font style |
int |
getMaxTabControlHeight()
Gets maximum tab control height of all tab controls |
int |
getMaxTabTextHeight()
Retrieve the tab max height based on the active and inactive font styles |
java.lang.String |
getName()
(non-Javadoc) |
net.rim.device.api.ui.Field |
getParentTabContent()
Retrieve parent tab contents |
int |
getPreferredHeight()
(non-Javadoc) |
int |
getRowSpan()
(non-Javadoc) |
int |
getSelectedTab()
Get selected tab index |
TabControlLayout |
getTabControlLayout()
Gets tab control layout |
net.rim.device.api.ui.Field |
getTabField(int index)
Retrieve the tab field with the index |
java.lang.Object |
getValue()
(non-Javadoc) |
long |
getVerticalAlignment()
(non-Javadoc) |
void |
gotoCurrentSelectedTab()
Goes to the current selected tab |
void |
gotoTab(int index)
Go to tab based on the index |
protected void |
makeContextMenu(net.rim.device.api.ui.ContextMenu menu)
(non-Javadoc) |
void |
nextTab()
Go to next tab |
void |
previousTab()
Go to previous tab |
void |
refresh()
(non-Javadoc) |
void |
refreshFooter(java.lang.String valueToBeDisplay)
Refresh the footer field from the screen that contains the text of the column cell. |
void |
removeTabChangeListener(TabLayoutManager.TabChangeListener listener)
Remove TabChangeListener instance from the list of listeners |
void |
setActiveTabFontStyle(FontStyle fontStyle)
Set active tab style for |
void |
setBackgroundColor(int bgcolor)
(non-Javadoc) |
void |
setBorderEdgeBackgroundColor(int color)
Set the border edge background color |
void |
setColSpan(int colspan)
(non-Javadoc) |
void |
setContent(net.rim.device.api.ui.Field content)
Set the tab content |
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 |
void |
setDisplayFontStyle(FontStyle fontStyle)
Set display font style for tab panel |
void |
setInactiveTabFontStyle(FontStyle fontStyle)
Set inactive tab font style |
void |
setLayoutHeight(int height)
(non-Javadoc) |
void |
setLayoutWidth(int width)
(non-Javadoc) |
void |
setProperty(int key,
java.lang.String value)
Set the property values for this tab layout manager |
void |
setRowSpan(int rowspan)
(non-Javadoc) |
protected void |
sublayout(int width,
int height)
(non-Javadoc) |
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, paint, 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, getPreferredWidth, getScreen, getState, getStyle, getTop, getVisualState, getWidth, invalidateAll, isEditable, isFocus, isPasteable, isSelectable, isSelectionCopyable, isSelectionCutable, isSelectionDeleteable, isSpellCheckable, isStyle, isVisible, 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 |
Methods inherited from interface com.sybase.uep.bobclient.controls.Control |
---|
getPreferredWidth |
Constructor Detail |
---|
public TabLayoutManager(FontStyle displayFontStyle, FontStyle activeTabFontStyle, FontStyle inactiveTabFontStyle, FooterField footerField, int activeTabBorderColor, int inactiveTabBorderColor)
displayFontStyle
- FontStyle
font style object for the displayactiveTabFontStyle
- FontStyle
font style object for the active tabinactiveTabFontStyle
- FontStyle
font style object for the inactive tabfooterField
- FooterField
object to display text information.
This is useful for long values, the text can be fully shown in the footer. Null for no footer.activeTabBorderColor
- int
HEX value of the active tab border color.
Examples of colors are 0x00FFFFFF, 0x00FF0000, 0x00000000inactiveTabBorderColor
- int
HEX value of the inactive tab border color.
Examples of colors are 0x00FFFFFF, 0x00FF0000, 0x00000000Method Detail |
---|
protected void sublayout(int width, int height)
sublayout
in class net.rim.device.api.ui.Manager
net.rim.device.api.ui.Field#sublayout(int width, int height)
public void previousTab()
public void nextTab()
public void gotoTab(int index)
index
- int
value for the tab indexpublic net.rim.device.api.ui.Field getCurrentTabContent()
Field
object of the current tabField
public net.rim.device.api.ui.Field getParentTabContent()
Field
object of the parent tabField
public void setLayoutWidth(int width)
setLayoutWidth
in interface Control
width
- int
value of the available layout widthControl.setLayoutWidth(int width)
public void setLayoutHeight(int height)
setLayoutHeight
in interface Control
height
- int
value of the available layout heightControl.setLayoutHeight(int height)
public int getPreferredHeight()
getPreferredHeight
in interface Control
getPreferredHeight
in class net.rim.device.api.ui.Field
int
value of the available layout heightControl.getPreferredHeight()
public java.lang.String getName()
getName
in interface Control
String
value of the key nameControl.getName()
public java.lang.Object getValue()
getValue
in interface Control
Object
of the value set for this controlControl.getValue()
public int getSelectedTab()
public void setColSpan(int colspan)
setColSpan
in interface Control
colspan
- int
value of the column spanControl.setColSpan(int colspan)
public int getColSpan()
getColSpan
in interface Control
int
value of the column spanControl.getColSpan()
public void setRowSpan(int rowspan)
setRowSpan
in interface Control
rowspan
- int
value of the row spanControl.setRowSpan(int rowspan)
public int getRowSpan()
getRowSpan
in interface Control
int
value of the row spanControl.getRowSpan()
public long getHorizontalAlignment()
getHorizontalAlignment
in interface Control
long
value of the horizontal alignment.
Possible values could be Field.FIELD_HCENTER, Field.FIELD_RIGHT, or Field.FIELD_LEFTControl.getHorizontalAlignment()
public long getVerticalAlignment()
getVerticalAlignment
in interface Control
long
value of the vertical alignment
Possible values could be Field.FIELD_TOP, Field.FIELD_BOTTOM, or Field.FIELD_VCENTERControl.getVerticalAlignment()
public void refresh()
refresh
in interface Control
Control.refresh()
public void gotoCurrentSelectedTab()
public void setBackgroundColor(int bgcolor)
setBackgroundColor
in interface Control
bgcolor
- int
value of the color in HEX.
For example: 0x00000000, 0x00FF0000, 0x00FFFFFFControl.setBackgroundColor(int bgcolor)
public int getActiveTabBorderColor()
int
HEX value of the active tab border color.
Examples of colors are 0x00FFFFFF, 0x00FF0000, 0x00000000public int getMaxTabTextHeight()
int
value of the tab max heightpublic int getMaxTabControlHeight()
public FontStyle getActiveTabFontStyle()
FontStyle
font style objectFontStyle
public void setDisplayFontStyle(FontStyle fontStyle)
fontStyle
- FontStyle
font style objectFontStyle
public void setActiveTabFontStyle(FontStyle fontStyle)
fontStyle
- FontStyle
font style objectFontStyle
public int getInactiveTabBorderColor()
int
HEX value of the inactive tab border color.
Examples of colors are 0x00FFFFFF, 0x00FF0000, 0x00000000public FontStyle getInactiveTabFontStyle()
FontStyle
font style objectFontStyle
public void setInactiveTabFontStyle(FontStyle fontStyle)
fontStyle
- FontStyle
font style objectFontStyle
public int getBorderEdgeBackgroundColor()
int
HEX value for the border edge background color.
Examples of colors are 0x00FFFFFF, 0x00FF0000, 0x00000000public void setBorderEdgeBackgroundColor(int color)
color
- int
HEX value for the border edge back ground color.
Examples of colors are 0x00FFFFFF, 0x00FF0000, 0x00000000public void addTab(int nameRID, java.lang.String titleImageName, java.lang.String contentPanelBackgroundImageName, boolean isScaleContentPanelBackgroundImage, boolean isActive, net.rim.device.api.ui.Field content)
nameRID
- int
value of the localization resource ID for the name of the tabtitleImageName
- String
image file name of the tab title iconcontentPanelBackgroundImageName
- - image file name of the content panel backgroundisScaleContentPanelBackgroundImage
- - true means to scale the background image to fill the containerisActive
- true
if the tab is currently active, otherwise false
content
- Field
object for the tab contents that will be displayedField
public void addTab(java.lang.String name, java.lang.String titleImageName, java.lang.String contentPanelBackgroundImageName, boolean isScaleContentPanelBackgroundImageAspectFit, boolean isActive, net.rim.device.api.ui.Field content)
name
- String
value of the name of the tabtitleImageName
- String
image file name of the tab title iconcontentPanelBackgroundImageName
- - image file name of the content panel backgroundisScaleContentPanelBackgroundImageAspectFit
- - true means to scale the background image as aspect fit, false as aspect fillisActive
- true
if the tab is currently active, otherwise false
content
- Field
object for the tab contents that will be displayedField
public void setContent(net.rim.device.api.ui.Field content)
content
- Field
object for the tab contentsField
public net.rim.device.api.ui.Field[] getAllFields()
Field
array list of ControlsField
public net.rim.device.api.ui.Field getTabField(int index)
index
- int
value for the tab index
Field
object of the tab with the indexField
public void setProperty(int key, java.lang.String value)
key
- int
int value for the key of a specific attributevalue
- String
value for this attributepublic void refreshFooter(java.lang.String valueToBeDisplay)
valueToBeDisplay
- String
value for the text value to be display in the footerprotected void makeContextMenu(net.rim.device.api.ui.ContextMenu menu)
makeContextMenu
in class net.rim.device.api.ui.Field
Field.makeContextMenu(ContextMenu menu)
public ICustomEventsDelegate getCustomEventsDelegate()
public void setCustomEventsDelegate(ICustomEventsDelegate delegate, int eventsFlags)
delegate
- custom events delegateeventsFlags
- the events to set delegate topublic int getControlID()
public void setControlID(int controlID)
controlId
- control IDpublic void addTabChangeListener(TabLayoutManager.TabChangeListener listener)
listener
- public void removeTabChangeListener(TabLayoutManager.TabChangeListener listener)
listener
- public TabContentPanel getContentPanel()
public TabControlLayout getTabControlLayout()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |