MOMInfoGroup.java
资源名称:src.zip [点击查看]
上传用户:luxiaowei
上传日期:2022-06-06
资源大小:58k
文件大小:1k
源码类别:
J2ME
开发平台:
Java
- /*
- * To change this template, choose Tools | Templates
- * and open the template in the editor.
- */
- package com.MOM.ui.control;
- import com.MOM.Constants;
- import com.MOM.resources.Resources;
- import com.MOM.ui.MOMUiFactory;
- import com.framework.DisplayManager;
- import com.framework.ScrollableContainer;
- /**
- *
- * @author Swaroop Kumar
- */
- public abstract class MOMInfoGroup extends ScrollableContainer{
- boolean extraInformationAdded = false;
- public MOMInfoGroup(String title) {
- setWidth(DisplayManager.getInst().getWidth());
- addChildren(MOMUiFactory.getBlueLabel(title));
- setLayout(Constants.LIST_LAYOUT_01);
- }
- public void changeSize() {
- int h = 0;
- for (int i = 0; i < getSize(); i++) {
- h += (getChild(i).getHeight() - 1);
- }
- setHeight(h);
- }
- public void addExtraInformation(String info)
- {
- extraInformationAdded = true;
- MultilineArrowControl control = new MultilineArrowControl(info, false, true,Resources.getInstance().getFontBlackSmallPalin());
- control.setSelectionFont(Resources.getInstance().getFontWhiteSmallPalin());
- addChildren(control);
- control.setLeftArrowColor(0x999999);
- control.setSelectionBgColor(0x558ED5);
- control.setSelectionBorderColor(0x558ED5);
- changeSize();
- }
- }