|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnet.rim.device.api.ui.Field
com.sybase.uep.bobclient.controls.TableField
public abstract class TableField
This is a custom Table Field control It will draw the table with the mobile application data displayed in rows.
Field Summary | |
---|---|
protected int |
_controlID
|
protected net.rim.device.api.ui.UiApplication |
_controller
|
protected CustomEventsHandler |
_customEventsHandler
|
protected int |
_orientation
|
static int |
DEFAULT_BORDER_COLOR
|
static long |
KEY
|
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.DrawStyle |
---|
BASELINE, BOTTOM, ELLIPSIS, HALIGN_MASK, HCENTER, HDEFAULT, HFULL, LEADING, LEFT, RIGHT, TOP, TRAILING, TRUNCATE_BEGINNING, VALIGN_MASK, VCENTER, VDEFAULT, VFULL |
Constructor Summary | |
---|---|
TableField()
Constructor to create the table field control |
Method Summary | |
---|---|
void |
addMenuItem(net.rim.device.api.ui.MenuItem menu)
Add Menu Item to the Table control |
void |
addMenuSeperator()
Add menu seperator |
void |
clearMenuItems()
Remove all the menu items on the table control |
protected ImageScreen |
createImageScreen(int rowIndex,
int columnIndex)
Create an image screen for the table item selected. |
protected void |
drawFocus(net.rim.device.api.ui.Graphics g,
boolean on)
(non-Javadoc) |
abstract MBOModel |
getApplicationData()
Retrieve the MBO that is set to the table |
int |
getColSpan()
(non-Javadoc) |
protected abstract LogicalType |
getColumnLogicalType(int columnIndex)
Retrieve the column logical type |
protected abstract java.lang.String |
getColumnSchemaType(int columnIndex)
Retrieve the column schema type |
protected abstract boolean |
getColumnValues(int rowIndex,
java.lang.Object[] columns)
Retrieve the row data values |
int |
getControlID()
Returns the control's ID |
ICustomEventsDelegate |
getCustomEventsDelegate()
Returns the control's custom events delegate |
int |
getDataRecordCount()
Get the data record count |
FontStyle |
getEvenRowFontStyle()
Get the table even row font style |
FontStyle |
getFocusFontStyle()
Get the table focus font style |
void |
getFocusRect(net.rim.device.api.ui.XYRect rect)
Retrieve the focus section |
FontStyle |
getHeaderFontStyle()
Get the table header font style |
int |
getHeaderHeight()
Get the header height |
long |
getHorizontalAlignment()
(non-Javadoc) |
protected abstract java.util.Vector |
getLogicalTypeItems()
Retrieve all MBO attribute's information which have logical type defined |
protected abstract java.lang.String |
getMobileAppID()
Retrieve the Mobile Application ID |
java.lang.String |
getName()
(non-Javadoc) |
FontStyle |
getOddRowFontStyle()
Get the table odd row font style |
FontStyle |
getPendingFontStyle()
Get the table Pending font style |
int |
getPreferredHeight()
(non-Javadoc) |
int |
getPreferredWidth()
(non-Javadoc) |
abstract java.lang.Object |
getRowByIndex(int rowIndex)
Retrieve data of a row by row index of the table |
int |
getRowCount()
Retrieve the table row count |
net.rim.device.api.ui.Font |
getRowFont()
Retrieve the row font |
int |
getRowHeight()
Retrieve the row height |
int |
getRowSpan()
(non-Javadoc) |
int |
getSelectedColumn()
The current selected column |
int |
getSelectedRow()
Retrieve the selected row in the table control |
java.lang.Object |
getValue()
(non-Javadoc) |
long |
getVerticalAlignment()
(non-Javadoc) |
int |
getVisiableRows()
Get the number of visiable rows being displayed |
boolean |
hasSearchMenus()
Check if search menu flag is turned on |
boolean |
hasSortMenus()
Check if sort menu flag is turned on |
void |
invalidate()
Invalidate and repaint the table |
boolean |
keyChar(char key,
int status,
int time)
(non-Javadoc) |
protected void |
layout(int width,
int height)
(non-Javadoc) |
protected void |
makeContextMenu(net.rim.device.api.ui.ContextMenu menu)
(non-Javadoc) |
protected int |
moveFocus(int amount,
int status,
int time)
(non-Javadoc) |
void |
moveToBottom()
Move focus to the bottom of the table |
void |
moveToTop()
Move focus to the top of the table |
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 |
onRecordChange()
This method is called when the record selection changes. |
protected void |
onUnfocus()
(non-Javadoc) |
void |
pageDown()
Page down on the table |
void |
pageUp()
Page up in the table |
protected void |
paint(net.rim.device.api.ui.Graphics g)
(non-Javadoc) |
void |
populateEmptyTable()
Create a empty table |
void |
refresh()
(non-Javadoc) |
protected abstract void |
refreshFooter(java.lang.String valueToBeDisplay)
Refresh the footer field from the screen that contains this table |
void |
resizeColumns()
Resize the columns |
void |
setBackgroundColor(int bgcolor)
(non-Javadoc) |
void |
setBanding(boolean banding)
Set the table banding |
void |
setBorder(boolean border)
Set the border on or off |
void |
setBorderColor(int color)
Set the border color |
void |
setColSpan(int colspan)
(non-Javadoc) |
void |
setColumnClickThru(int column,
java.lang.String caLabel)
Set the column click thru value |
void |
setColumnLabel(int column,
java.lang.String label)
Set the column label |
void |
setColumns(int columns)
Set the number of columns |
void |
setColumnWidth(int column,
java.lang.String typicalStr)
Set the column width |
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 |
setDataRecordCount(int count)
Set the data record count |
void |
setDefaultAction(IBOBAction action)
Sets the table's default action |
void |
setEvenRowFontStyle(FontStyle fontStyle)
Set the table even row font style |
void |
setFocusFontStyle(FontStyle fontStyle)
Set the table focus font style |
void |
setHasAltRow(boolean bol)
Set if the table has alternating colors |
void |
setHasBorder(boolean bol)
Set if the table has border |
void |
setHasSearchMenus(boolean bol)
Set search menu flag |
void |
setHasSortMenus(boolean bol)
Set sort menu flag |
void |
setHeaderFontStyle(FontStyle fontStyle)
Set the table header font style |
void |
setHrefTextValue(java.lang.String hrefTextValue)
Set the href key text value |
void |
setImageTextValue(java.lang.String imageTextValue)
Set the image key text value |
void |
setLayoutHeight(int height)
(non-Javadoc) |
void |
setLayoutWidth(int width)
(non-Javadoc) |
void |
setOddRowFontStyle(FontStyle fontStyle)
Set the table odd row font style |
void |
setOuterBorderColor(int color)
Set the outer border color |
void |
setPendingFontStyle(FontStyle fontStyle)
Set the table pending font style |
void |
setProperty(int key,
java.lang.Object value)
Set the property values for the table |
void |
setRowCount(int count)
Set the row count for the table |
void |
setRowSpan(int rowspan)
(non-Javadoc) |
void |
setSelectedRow(int currentRecordIndex)
Set the selected row in the table control |
void |
setTopRow(int row)
Set the Top Row |
void |
setupVisibleRows()
Setup the possible visible rows that can be displayed on the screen |
void |
setVisibleRows(int visible)
Set the number of visiable rows |
protected boolean |
touchEvent(net.rim.device.api.ui.TouchEvent message)
|
Methods inherited from class net.rim.device.api.ui.Field |
---|
drawHighlightRegion, fieldChangeNotify, focusAdd, focusChangeNotify, focusRemove, getAccessibleContext, 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, invalidateAll, invokeAction, isDataValid, isDirty, isEditable, isFocus, isFocusable, isMuddy, isPasteable, isSelectable, isSelecting, isSelectionCopyable, isSelectionCutable, isSelectionDeleteable, isSpellCheckable, isStyle, isVisible, keyControl, keyDown, keyRepeat, keyStatus, 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, toString, wait, wait, wait |
Field Detail |
---|
public static final long KEY
public static final int DEFAULT_BORDER_COLOR
protected net.rim.device.api.ui.UiApplication _controller
protected CustomEventsHandler _customEventsHandler
protected int _controlID
protected int _orientation
Constructor Detail |
---|
public TableField()
Method Detail |
---|
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 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 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 setBackgroundColor(int bgcolor)
setBackgroundColor
in interface Control
bgcolor
- int
value of the color in HEX.
For example: 0x00000000, 0x00FF0000, 0x00FFFFFFControl.setBackgroundColor(int bgcolor)
public void populateEmptyTable()
public void addMenuItem(net.rim.device.api.ui.MenuItem menu)
menu
- MenuItem
menu objectMenuItem
public void addMenuSeperator()
public void clearMenuItems()
public FontStyle getHeaderFontStyle()
FontStyle
font style objectFontStyle
public void setHeaderFontStyle(FontStyle fontStyle)
fontStyle
- FontStyle
font style objectFontStyle
public FontStyle getEvenRowFontStyle()
FontStyle
font style objectFontStyle
public void setEvenRowFontStyle(FontStyle fontStyle)
fontStyle
- FontStyle
font style objectFontStyle
public FontStyle getOddRowFontStyle()
FontStyle
font style objectFontStyle
public void setOddRowFontStyle(FontStyle fontStyle)
fontStyle
- FontStyle
font style objectFontStyle
public FontStyle getPendingFontStyle()
FontStyle
font style objectFontStyle
public void setPendingFontStyle(FontStyle fontStyle)
fontStyle
- FontStyle
font style objectFontStyle
public FontStyle getFocusFontStyle()
FontStyle
font style objectFontStyle
public void setFocusFontStyle(FontStyle fontStyle)
fontStyle
- FontStyle
font style objectFontStyle
public void setHasAltRow(boolean bol)
bol
- true
if there are alternating row colors, otherwise false
public void setHasBorder(boolean bol)
bol
- true
if there are border, otherwise false
public void setOuterBorderColor(int color)
color
- int
HEX value for the outer border color.
Examples of colors are 0x00FFFFFF, 0x00FF0000, 0x00000000public void setBorderColor(int color)
color
- int
HEX value for the border color.
Examples of colors are 0x00FFFFFF, 0x00FF0000, 0x00000000public void setProperty(int key, java.lang.Object value)
key
- int
int value for the key of a specific attributevalue
- String
value for this attributepublic void setHasSearchMenus(boolean bol)
bol
- true
if there are search menus, otherwise false
public boolean hasSearchMenus()
true
if there are search menus, otherwise falses
public void setHasSortMenus(boolean bol)
bol
- true
if there are sort menus, otherwise falses
public boolean hasSortMenus()
true
if there are sort menus, otherwise false
protected void drawFocus(net.rim.device.api.ui.Graphics g, boolean on)
drawFocus
in class net.rim.device.api.ui.Field
Field.drawFocus(Graphics g, boolean on)
public void setImageTextValue(java.lang.String imageTextValue)
imageTextValue
- String
value for the image text valuepublic void setHrefTextValue(java.lang.String hrefTextValue)
hrefTextValue
- String
value for the Href text valuepublic void getFocusRect(net.rim.device.api.ui.XYRect rect)
getFocusRect
in class net.rim.device.api.ui.Field
XYRect
- XYRect
value for the focused sectionpublic int getHeaderHeight()
int
value for the header heightpublic int getPreferredHeight()
getPreferredHeight
in interface Control
getPreferredHeight
in class net.rim.device.api.ui.Field
int
value of the available layout heightControl.getPreferredHeight()
public int getPreferredWidth()
getPreferredWidth
in interface Control
getPreferredWidth
in class net.rim.device.api.ui.Field
int
value of the available layout widthControl.getPreferredWidth()
public int getDataRecordCount()
int
value for the number of data recordpublic void setDataRecordCount(int count)
count
- int
value for the number of data recordspublic int getRowCount()
int
value for the number of rows in this tablepublic net.rim.device.api.ui.Font getRowFont()
Font
font objectFont
public int getRowHeight()
int
value for the row heightpublic int getSelectedRow()
int
value for the position of the selected rowpublic void setSelectedRow(int currentRecordIndex)
public void invalidate()
invalidate
in class net.rim.device.api.ui.Field
public void setupVisibleRows()
protected void layout(int width, int height)
layout
in class net.rim.device.api.ui.Field
Field.layout(int width, int height)
protected void makeContextMenu(net.rim.device.api.ui.ContextMenu menu)
makeContextMenu
in class net.rim.device.api.ui.Field
Field.makeContextMenu(ContextMenu menu)
protected ImageScreen createImageScreen(int rowIndex, int columnIndex)
rowIndex
- int
value for the row index of the selected cellcolumnIndex
- int
value for the column index of the selected cell
ImageScreen
image screen objectImageScreen
protected int moveFocus(int amount, int status, int time)
moveFocus
in class net.rim.device.api.ui.Field
Field.moveFocus(int amount, int status, int time)
protected void paint(net.rim.device.api.ui.Graphics g)
paint
in class net.rim.device.api.ui.Field
Field.paint(Graphics g)
public void resizeColumns()
public void setBanding(boolean banding)
banding
- true
to turn on the banding, otherwise false
public void setBorder(boolean border)
border
- true
to turn on the border, otherwise false
public void setColumns(int columns)
columns
- int
value for the number of columnspublic void setColumnLabel(int column, java.lang.String label)
column
- int
value for the column indexlabel
- int
value for the label of this columnpublic void setColumnClickThru(int column, java.lang.String caLabel)
column
- int
value for the column indexcaLabel
- String
value for the clickacross labelpublic void setColumnWidth(int column, java.lang.String typicalStr)
column
- int
value for the position of the columntypicalStr
- String
value for the number of characters to displaypublic void setRowCount(int count)
count
- String
value for the number of rowspublic void setTopRow(int row)
row
- String
value for the row positionpublic void setVisibleRows(int visible)
visible
- String
value for the number of visible rowspublic int getVisiableRows()
String
value for the number of visiable rows.public int getSelectedColumn()
String
value for the selected columnprotected abstract void refreshFooter(java.lang.String valueToBeDisplay)
valueToBeDisplay
- String
value for the text value to be displayed in the footerprotected abstract java.lang.String getMobileAppID()
String
value for the mobile application IDprotected abstract boolean getColumnValues(int rowIndex, java.lang.Object[] columns)
rowIndex
- int
value for the row index to retrieve the data valuescolumns
- Object
array to hold the data values
true
if the row is new or updated, otherise false
protected abstract LogicalType getColumnLogicalType(int columnIndex)
columnIndex
- int
value for the column on table
LogicalType
logical type objectLogicalType
protected abstract java.util.Vector getLogicalTypeItems()
Vector
list of logical type itemsprotected abstract java.lang.String getColumnSchemaType(int columnIndex)
columnIndex
- int
value for the column index
String
value for the column schema type.
Can be values in MBOAttribute
schema type constants.
For example, MBOAttribute.SCHEMA_TYPE_STRING
, MBOAttribute.SCHEMA_TYPE_INT
, MBOAttribute.SCHEMA_TYPE_DATE
MBOAttribute
public abstract MBOModel getApplicationData()
MBOModel
object that represents a MBOMBOModel
public abstract java.lang.Object getRowByIndex(int rowIndex)
rowIndex
- int
value for the row index that starts from 0
OBject
that represents data of a table rowpublic void moveToTop()
public void moveToBottom()
public void pageUp()
public void pageDown()
public boolean keyChar(char key, int status, int time)
keyChar
in class net.rim.device.api.ui.Field
Field.keyChar(char key, int status, int time)
public void setDefaultAction(IBOBAction action)
action
- the default action to setprotected void onFocus(int direction)
onFocus
in class net.rim.device.api.ui.Field
Field.onFocus(int direction)
protected void onUnfocus()
onUnfocus
in class net.rim.device.api.ui.Field
Field.onUnfocus()
protected boolean navigationClick(int status, int time)
navigationClick
in class net.rim.device.api.ui.Field
Field.navigationClick(int status, int time)
protected boolean navigationUnclick(int status, int time)
navigationUnclick
in class net.rim.device.api.ui.Field
Field.navigationUnclick(int status, int time)
protected boolean navigationMovement(int dx, int dy, int status, int time)
navigationMovement
in class net.rim.device.api.ui.Field
Field.navigationMovement(int dx, int dy, int status, int time)
protected void onRecordChange()
protected boolean touchEvent(net.rim.device.api.ui.TouchEvent message)
touchEvent
in class net.rim.device.api.ui.Field
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 ID
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |