There are 5 Field mangers in 4.5 JDE and newly 3 Field managers added in 5.0 JDE .
[4.5 JDE]
DialogFieldManager,VerticalFieldManager,HorizontalfieldManager,screen and FlowFieldManager.
#1)DialogFieldManager:
DialogFieldManager is a manager in which the layout consists of an icon,message,Fields.The icon is on the top left side and the respective message is on the top right corner.Message is a RichTextField.The fields are added like a body for he DialogFieldManager.We have to add it to the screen inorder to display.
The following shows the layout.
------------------
| Icon Message |
| Field1 |
| Field2 |
| ....... |
-------------
Some of the methods are.....
setIcon(BitMap bitmap),setMessage(RichTextField rch)
#2)VerticalFieldManager
The VerticalFieldManager adds fields in a vertical order.We can add Fields and Managers to this VerticalfieldManager.This VerticalFieldManager can be scrollable.We can set that styles in Constructor.VerticalFieldManager can be added to screen.
VerticalFieldManager Layout
------------------
| Field1 |
| Field2 |
| Field3 |
| ........... |
------------------
#3)HorizontalFieldManager
The HorizontalFieldManager adds fields in a horizontal order.We can add Fields and Managers to this HorizontalFieldManager.This HorizontalFieldManagercan be scrollable.We can set that styles in Constructor.HorizontalFieldManagercan be added to screen.
HorizontalFieldManager Layout
----------------------
| Field1 Field2 Field 3 |
-----------------------
#4)FlowFieldManager
FlowFieldManager has a special type of property.It acts both like a vertical FieldManager and HorizontalManager.Firstly it acts fields in horizontal way.If the field exceeds the screen length next fields are added in next row.That is it adds the fields in flow.
FlowFieldManager Layout
------------------
| Field1 Field2 |
| Field3 Field4 |
| Field3 .......... |
| ...................... |
------------------
#5)Screen:
The concept of screen is different to other Managers.Base class for all screens. Each UIEngine presents an interface to the user by pushing screens onto its display stack, and popping them off when interaction with the managed fields on that screen is finished.Screen is an abstract class.
The sub classes of Screen are:
PopupScreen and FullScreen.
Constructors o f screen contains a DelegateManager as argument.We have to send aManager inorder to invoke his abstract Class.
#a) PopupScreen:
PopupScreen is a screen which appears like a popup as mentioned in name itself.PopupScreen is pushed on to the screen and it appears continuously until it is poppedup functionally.By default it is not popped up by pressing any keys.If you want to customise your popupScreen then go for PopUpScreen.OtherWise there are some subclasses for popupscreen which provide som regularily used functionality like Info,Alert,status.
SubClasses of PopUpScreen are :
Dialog,Status.
Dialog:
Dialog is a subclass of popuspscreen.Unlike all other screens Dialog can be pushed automatically without using UIApplication.PushScreen(Scren).Dialog are of two types.Alert,Inform.We can directly call Dialog.Alert(String) and Dialog.inform(message) which will automaticaly pops a popup having Ok and Cancel buttons for Alert and Ok button for inform.The icon also changes for both of them.If you want to customise a Dialog and you want to push the Dialog manually,go for the Constructor and push Dialog using PushScreen(Screen).
We are having several Styles such as CANCEL,D_DELETE,D_OK,D_OK_CANCEL,D_SAVE,D_YES_NO etc....which can be used in our dialog by applying these styles in constructor.
Status:
Status has same functionality as Dialog but diffeence is it doesnt have any buttons.We can keep a time limit for the status.If we press space or esc it will disappear.
#B)FullScreen:
A screen that contains a single, vertical field manager.It is a subclass of Screen.Is has a subClass MainScreen which is widely used screen.
MainScreen:
SubClass of FullScreen.Main screen objects contain a title section, a separator element, and a main scrollable section.We can add Managers and fields to it .Than push this Screen.
Methods:
mainScreen.add(Field field);
mainScreen.addMenuItem(MenuItem menuItem);
There are few other Managers which are added in JDE 5.0.
they are BrowserField,AbsoluteFieldManager and GridFieldManager.
[27/07/10]
#1)BrowserField:
Upto Jde 5.0 if you want to hit an url or a web page ,the process is to hit browser which is an external application.Now by using BrowserField we can embed the browser within the java application.No need to call an external application.The process to initialise this browserfield involves three steps.They are:
- Instantiate Browser Field
BrowserField browserField = new BrowserField();
- Add browserField to UiManager or Screen
screen.add( browserField );
- Request the content to display.This method call is done only once.
browserField.requestContent( "http://blackberry.com" );
There are are 2 constructors for BrowserField.
- BrowserField()
- BrowserField(BrowserFieldConfig config)
Some methods involve back(),forward(),refresh() etc...
#2)GridFieldManager:
GridFieldManager is introduced in Blackberrry JDE 5.0.GridFieldManager is having fixed number of rows and columns.We can insert an element in a specific row and column using insert() or if you use add() method the fields are added like a FlowFieldManager one after other(First horizontally and then cumming to next row).
Row and column heights and widths may be specified as fixed sizes or may be automatically sized with the available space divided evenly among the rows and columns.
The grid will scroll vertically if the heights of the rows exceeds the visible height of the grid, and will scroll horizontally if the widths of the columns exceedst he visible width of the grid.
There is only one constructor
GridFieldManager(int rows,int columns,long style);
#3)AbsoluteFieldManager:
This is not having a JavaDoc upto now.No reference available for AbsoluteFieldManager as per my knowledge.If there is reference please comment me the link.
Reference:
http://www.blackberry.com/developers/docs/4.5.0api/index.html
http://www.blackberry.com/developers/docs/5.0.0api/