|
|||||||||
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.component.LabelField
com.sybase.uep.bobclient.controls.Label
public class Label
This is the label field control
Field Summary | |
---|---|
protected int |
_controlID
|
protected CustomEventsHandler |
_customEventsHandler
|
protected java.lang.String[] |
_dataParts
|
protected int |
_orientation
|
protected boolean |
_wrapText
|
Fields inherited from class net.rim.device.api.ui.component.LabelField |
---|
DEFAULT_POSITION |
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 | |
---|---|
Label(int labelRID,
long style)
Label constructor |
|
Label(int labelRID,
long style,
boolean showBackgroundColor)
Label constructor |
|
Label(java.lang.String label,
long style)
Label constructor |
|
Label(java.lang.String label,
long style,
boolean showBackgroundColor)
Label constructor |
Method Summary | |
---|---|
protected void |
drawFocus(net.rim.device.api.ui.Graphics g,
boolean on)
(non-Javadoc) |
void |
drawLabel(net.rim.device.api.ui.Graphics g,
boolean focus)
|
int |
getColSpan()
(non-Javadoc) |
int |
getControlID()
Returns the control's ID |
ICustomEventsDelegate |
getCustomEventsDelegate()
Returns the control's custom events delegate |
FontStyle |
getFocusFontStyle()
Retrieve this control's focus font style |
FontStyle |
getFontStyle()
Retrieve this control's font style |
long |
getHorizontalAlignment()
(non-Javadoc) |
int |
getLabelWidth()
Retrieve label width |
protected int |
getLayoutWidth()
Gets layout width |
java.lang.String |
getName()
(non-Javadoc) |
int |
getPreferredHeight()
(non-Javadoc) |
int |
getPreferredWidth()
(non-Javadoc) |
int |
getRowSpan()
(non-Javadoc) |
java.lang.Object |
getValue()
(non-Javadoc) |
long |
getVerticalAlignment()
(non-Javadoc) |
protected void |
layout(int width,
int height)
(non-Javadoc) |
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 |
onUnfocus()
Invoked when a field loses the focus. |
protected void |
paint(net.rim.device.api.ui.Graphics g)
(non-Javadoc) |
void |
refresh()
(non-Javadoc) |
protected void |
resetTextIfTruncated(boolean isFocus)
|
void |
setBackgroundColor(int bgcolor)
(non-Javadoc) |
void |
setColSpan(int colspan)
(non-Javadoc) |
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 |
setFocusFontStyle(FontStyle fontStyle)
Set the focus font style for this control |
void |
setFontStyle(FontStyle fontStyle)
Set the font style for this control |
void |
setFooterField(FooterField field)
Set the footer field |
void |
setIsGridType(boolean isGridType)
Set if it's a grid lookup type, if it is, we show the grid icon. |
void |
setIsRequired(boolean isRequired)
Set if this input field is required |
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 label |
void |
setRequiredForegroundColor(int color)
Set the required foreground color for the text |
void |
setRowSpan(int rowspan)
(non-Javadoc) |
void |
setText(java.lang.Object text)
Set the label value |
void |
setVariableLabel(ControlVariable variable)
Set the variable key |
int |
setWrapHeight()
Set the height of the label field |
void |
setWrapText(boolean bol)
Set if the text should wrap or not |
protected boolean |
touchEvent(net.rim.device.api.ui.TouchEvent message)
(non-Javadoc) |
Methods inherited from class net.rim.device.api.ui.component.LabelField |
---|
getAccessibleContext, getPosition, getText, isSelectionCopyable, selectionCopy, setPosition, setText, setText, setText, toString |
Methods inherited from class net.rim.device.api.ui.Field |
---|
drawHighlightRegion, fieldChangeNotify, focusAdd, focusChangeNotify, focusRemove, getBackground, getBackground, getBorder, getBorder, getBorder, getChangeListener, getContentHeight, getContentLeft, getContentRect, getContentRect, getContentTop, getContentWidth, getContextMenu, getContextMenu, getCookie, getExtent, getExtent, getFieldStyle, getFocusListener, getFocusRect, getFont, getHeight, getIndex, getLeafFieldWithFocus, getLeft, getManager, getMargin, getMarginBottom, getMarginLeft, getMarginRight, getMarginTop, getOriginal, getPadding, getPaddingBottom, getPaddingLeft, getPaddingRight, getPaddingTop, getScreen, getState, getStyle, getTop, getVisualState, getWidth, invalidate, invalidate, invalidateAll, invokeAction, isDataValid, isDirty, isEditable, isFocus, isFocusable, isMuddy, isPasteable, isSelectable, isSelecting, isSelectionCutable, isSelectionDeleteable, isSpellCheckable, isStyle, isVisible, keyChar, keyControl, keyDown, keyRepeat, keyStatus, keyUp, makeContextMenu, makeContextMenu, moveFocus, moveFocus, onDisplay, onExposed, onMenuDismissed, onMenuDismissed, onObscured, onUndisplay, onVisibilityChange, paintBackground, paste, select, 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, wait, wait, wait |
Field Detail |
---|
protected java.lang.String[] _dataParts
protected boolean _wrapText
protected CustomEventsHandler _customEventsHandler
protected int _controlID
protected int _orientation
Constructor Detail |
---|
public Label(java.lang.String label, long style)
label
- String
value for the label to be displayedstyle
- long
value for the style of this label control
eg. Field.FIELD_LEFT
, Field.FIELD_RIGHT
, Field.FIELD_HCENTER
, etc.Field
public Label(int labelRID, long style)
labelRID
- int
value for localization resource ID of the label to be displayedstyle
- long
value for the style of this label control
eg. Field.FIELD_LEFT
, Field.FIELD_RIGHT
, Field.FIELD_HCENTER
, etc.Field
public Label(java.lang.String label, long style, boolean showBackgroundColor)
label
- String
value for the label to be displayedstyle
- long
value for the style of this label control
eg. Field.FIELD_LEFT
, Field.FIELD_RIGHT
, Field.FIELD_HCENTER
, etc.showBackgroundColor
- true
to show background color, otherwise false
Field
public Label(int labelRID, long style, boolean showBackgroundColor)
labelRID
- int
value for localization resource ID of the label to be displayedstyle
- long
value for the style of this label control
eg. Field.FIELD_LEFT
, Field.FIELD_RIGHT
, Field.FIELD_HCENTER
, etc.showBackgroundColor
- true
to show background color, otherwise false
Field
Method Detail |
---|
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 setWrapText(boolean bol)
bol
- true
if text should auto wrap, otherwise false
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 setVariableLabel(ControlVariable variable)
variable
- ControlVariable
control variable objectControlVariable
public FontStyle getFontStyle()
FontStyle
font style objectFontStyle
public void setFontStyle(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 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 setIsGridType(boolean isGridType)
isGridType
- true
if it's of grid lookup type, otherwise false
public void setIsRequired(boolean isRequired)
isRequired
- true
if label is required, otherwise false
public void setText(java.lang.Object text)
setText
in class net.rim.device.api.ui.component.LabelField
text
- String
value for the labelprotected int getLayoutWidth()
public void setLayoutWidth(int width)
setLayoutWidth
in interface Control
width
- int
value of the available layout widthControl.setLayoutWidth(int width)
public void setRequiredForegroundColor(int color)
color
- int
HEX value for the required foreground color.
Examples of colors are 0x00FFFFFF, 0x00FF0000, 0x00000000public int getPreferredWidth()
getPreferredWidth
in interface Control
getPreferredWidth
in class net.rim.device.api.ui.component.LabelField
int
value of the available layout widthControl.getPreferredWidth()
public int getLabelWidth()
int
value for the label widthpublic 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.component.LabelField
int
value of the available layout heightControl.getPreferredHeight()
protected void layout(int width, int height)
layout
in class net.rim.device.api.ui.component.LabelField
Field.layout(int width, int height)
protected 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
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 boolean touchEvent(net.rim.device.api.ui.TouchEvent message)
touchEvent
in class net.rim.device.api.ui.Field
Field.touchEvent(TouchEvent message)
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)
protected void paint(net.rim.device.api.ui.Graphics g)
paint
in class net.rim.device.api.ui.component.LabelField
Field.paint(Graphics g)
public void drawLabel(net.rim.device.api.ui.Graphics g, boolean focus)
public int setWrapHeight()
int
value for the heightpublic void refresh()
refresh
in interface Control
Control.refresh()
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 setFooterField(FooterField field)
{@link
- FooterField} footer field to put the text of the textinput into.
This is useful for long text, so it can be displayed in the footer.
null
value if there is no footer.FooterField
protected void resetTextIfTruncated(boolean isFocus)
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 |