Ejemplo n.º 1
0
 protected void createCustomUI(LGraphics g, int x, int y, int w, int h) {
   if (!visible) {
     return;
   }
   Color oldColor = g.getColor();
   LFont oldFont = g.getLFont();
   g.setColor(fontColor);
   g.setFont(messageFont);
   sizeFont = messageFont.getSize();
   doubleSizeFont = sizeFont * 2;
   if (doubleSizeFont == 0) {
     doubleSizeFont = 20;
   }
   messageLeft = (x + doubleSizeFont + sizeFont / 2) + tmpOffset + left + doubleSizeFont;
   if (message != null) {
     messageTop = y + doubleSizeFont + top - 10;
     g.drawString(message, messageLeft, messageTop);
   } else {
     messageTop = y + top;
   }
   nTop = messageTop;
   if (selects != null) {
     nLeft = messageLeft - sizeFont / 4;
     for (int i = 0; i < selects.length; i++) {
       nTop += 30;
       type = i + 1;
       isSelect = (type == (selectFlag > 0 ? selectFlag : 1));
       if ((buoyage != null) && isSelect) {
         g.setAlpha(autoAlpha);
         g.drawImage(buoyage, nLeft, nTop - (int) (buoyage.getHeight() / 1.5));
         g.setAlpha(1.0F);
       }
       g.drawString(selects[i], messageLeft, nTop);
       if ((cursor != null) && isSelect) {
         g.drawImage(cursor, nLeft, nTop - cursor.getHeight() / 2);
       }
     }
   }
   // g.setAntiAlias(false);
   g.setColor(oldColor);
   g.setFont(oldFont);
 }
Ejemplo n.º 2
0
 public LSelect(LImage formImage, int x, int y) {
   this(formImage, x, y, formImage.getWidth(), formImage.getHeight());
 }