|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface Control
This is the interface class for all the controls used in BOB Blackberry client.
All controls that goes in the LayoutManager
needs to implement the Control
class.
Any controls that is used to contain data such as TextInput
, SelectBox
,
RadioBox
, CheckBox
, and etc. will also need to implement this interface.
The SubmitAction
action loops through the list of controls on the screen and looks
for the Control
objects. Then it will call the Control#getName()
and Control#getValue()
method of each control to retrieve and set the value to
send to the server for processing.
NOTE: You only need to implement the Control
interface if you want to use your control
in a SubmitAction
action or if you want it included in a designer layout like the LayoutManager
.
Otherwise, the control will be added to the end of an existing layout design.
If you wants to add your own custom control you can extend any existing control and overwrite the exposed methods,
or you can create your own control and implement the Control
interface to that control.
If the control is a third party control you may have to place a sub-classing wrapper around the control
that implements this interface. If this doesn’t work, then you will have to implement your own layout
and screen manager that works with the control.
LayoutManager
,
com.sybase.uep.bobclient.SubmitAction
,
Button
,
CheckBox
,
DateChoice
,
EmailAddressInput
,
HorizontalRuler
,
HyperLink
,
HyperLinkRichField
,
ImageControl
,
Label
,
ListFieldControl
,
NavigationBarField
,
NumericChoice
,
PasswordInput
,
PhoneEmailRichTextInput
,
RadioBox
,
RegionManager
,
RichTextInput
,
SelectBox
,
Spacer
,
TabLayoutManager
,
TableField
,
TextInput
,
TwoColumnLayout
Method Summary | |
---|---|
int |
getColSpan()
Retrieves the column span for this control |
long |
getHorizontalAlignment()
Retrieves the horizontal alignment of this control |
java.lang.String |
getName()
Retrieves the key name for this control |
int |
getPreferredHeight()
Retrieves the available layout height of this control |
int |
getPreferredWidth()
Retrieves the available layout width of this control |
int |
getRowSpan()
Retrieves the row span for this control |
java.lang.Object |
getValue()
Retrieves the control value. |
long |
getVerticalAlignment()
Retrieves the vertical alignment of this control |
void |
refresh()
Refresh or redraws the control |
void |
setBackgroundColor(int bgcolor)
Set the back ground color of this control |
void |
setColSpan(int colspan)
Set the column span for this control. |
void |
setLayoutHeight(int height)
Set the available layout height for this control |
void |
setLayoutWidth(int width)
Set the available layout width for this control |
void |
setRowSpan(int rowspan)
Set the row span for this control. |
Method Detail |
---|
void setLayoutWidth(int width)
This is called by the LayoutManager
to set the available width of this control.
width
- int
value of the available layout widthLayoutManager
int getPreferredWidth()
This is called by the LayoutManager
to get the available width of this control.
int
value of the available layout widthLayoutManager
void setLayoutHeight(int height)
This is called by the LayoutManager
to set the available height of this control.
height
- int
value of the available layout heightLayoutManager
int getPreferredHeight()
This is called by the LayoutManager
to get the available height of this control.
int
value of the available layout heightLayoutManager
java.lang.String getName()
This is called by the SubmitAction
to get key name of this control.
String
value of the key nameSubmitAction
java.lang.Object getValue()
This is called by the SubmitAction
to get value set for this control.
Object
of the value set for this controlSubmitAction
void setColSpan(int colspan)
colspan
- int
value of the column spanint getColSpan()
This is called by the LayoutManager
to get the column span of this control.
int
value of the column spanLayoutManager
void setRowSpan(int rowspan)
rowspan
- int
value of the row spanint getRowSpan()
This is called by the LayoutManager
to get the row span of this control.
int
value of the row spanLayoutManager
long getVerticalAlignment()
This is called by the LayoutManager
to get the vertical alignment of this control.
long
value of the vertical alignment
Possible values could be Field.FIELD_TOP, Field.FIELD_BOTTOM, or Field.FIELD_VCENTERLayoutManager
,
Field
long getHorizontalAlignment()
This is called by the LayoutManager
to get the horizontal alignment of this control.
long
value of the horizontal alignment.
Possible values could be Field.FIELD_HCENTER, Field.FIELD_RIGHT, or Field.FIELD_LEFTLayoutManager
,
Field
void refresh()
This is called by the LayoutManager
to refresh the control.
LayoutManager
void setBackgroundColor(int bgcolor)
This is called by the LayoutManager
to set the background color of this control.
If the layout is set to a specific back ground color, this background needs to set
to it's controls to paint the same color as the layout's background. Also if there
are alternating colors, then the LayoutManager
will set each corresponding
row with a different alternating back ground color.
bgcolor
- int
value of the color in HEX.
For example: 0x00000000, 0x00FF0000, 0x00FFFFFFLayoutManager
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |