コード例 #1
0
  /** Creates a new instance of SmilePicker */
  public SmilePicker(Display display, MessageEdit me, int caretPos) {
    super(display);
    this.me = me;
    this.caretPos = caretPos;

    il = SmilesIcons.getInstance();
    // #ifdef SMILES
    // #         smileTable=MessageParser.getInstance().getSmileTable();
    // #endif
    imgCnt = smileTable.size();
    // il.getCount();

    imgWidth = il.getWidth() + 2 * CURSOR_HOFFSET;
    lineHeight = il.getHeight() + 2 * CURSOR_VOFFSET;

    xCnt = getWidth() / imgWidth;

    lines = imgCnt / xCnt;
    xLastCnt = imgCnt - lines * xCnt;
    if (xLastCnt > 0) lines++;
    else xLastCnt = xCnt;

    addCommand(cmdOK);
    addCommand(cmdBack);
    setCommandListener(this);
  }
コード例 #2
0
  /** Creates a new instance of Config */
  private Config() {
    getPhoneManufacturer();

    int gmtloc = TimeZone.getDefault().getRawOffset() / 3600000;
    locOffset = 0;
    gmtOffset = gmtloc;

    short greenKeyCode = -1000;

    if (phoneManufacturer == SONYE) {
      // prefetch images
      RosterIcons.getInstance();
      SmilesIcons.getInstance();

      allowMinimize = true;
      greenKeyCode = VirtualList.SE_GREEN;
      if (phoneManufacturer == SONYE_M600) {
        KEY_BACK = -11;
      }
    } else if (phoneManufacturer == NOKIA) {
      // blFlash=false;
      greenKeyCode = VirtualList.NOKIA_GREEN;
    } else if (phoneManufacturer == MOTOEZX) {
      // VirtualList.keyClear=0x1000;
      VirtualList.keyVolDown = VirtualList.MOTOE680_VOL_DOWN;
      KEY_BACK = VirtualList.MOTOE680_REALPLAYER;
    } else if (phoneManufacturer == MOTO) {
      ghostMotor = true;
      // blFlash=false;
      istreamWaiting = true;
      greenKeyCode = VirtualList.MOTOROLA_GREEN;
      // VirtualList.keyClear=0x1000;
    } else if (phoneManufacturer == SIEMENS || phoneManufacturer == SIEMENS2) {
      keyLock = '#';
      keyVibra = '*';
      allowLightControl = true;
      // blFlash=true;
      KEY_BACK = -4; // keyCode==702
      greenKeyCode = VirtualList.SIEMENS_GREEN;
    } else if (phoneManufacturer == WTK) {
      greenKeyCode = VirtualList.NOKIA_GREEN;
    }

    VirtualList.greenKeyCode = greenKeyCode;
  }