Customizing Device Application Designer Code

After you generate code from your BlackBerry development environment, choosing the Custom Class generation option, go to the folders that contain the custom classes, and modify the code as needed. For example, adding controls to screens, adding widget event code, and so on.

Generated Screen Class Outline:
public class BOBScreenSales_order extends 
BaseBOBScreen implements IBOBScreen {

	protected void defineScreen() {
		createStyles();
		createControls();
		createMenus();
	}

	protected void createStyles() {
		createStyleById(XXX_STYLE);
	}

	protected void createControls() {
		createControlById(CONTROL1);
		configureControlById(CONTROL1);
	}

	protected void configureControlById(int ID) {
		switch (ID) {
		case LAYOUTMANAGER:
			configureObjectMetaDataById(ID, layoutManager);
			configureObjectHandlersById(ID, layoutManager);
			return;
		}
	}

	protected void createMenus() {
		menu1 = createMenuById(MENU1);
	}

	public Object getControlById(int ID);
}