Пример #1
0
 public void paint(Graphics g, int x, int y) {
   if (style != null) {
     g.setFont(style.font);
     g.setColor(style.color);
   }
   if (string != null) {
     g.drawString(string, x + local_x, y + local_y, Graphics.TOP | Graphics.LEFT);
   } else if (smileLink != null) {
     smileLink.updateLocation(x + local_x, y + local_y);
     Smiles.smiles[smileLink.smileIndex].paint(g, smileLink.x, smileLink.y, smileLink.frameIndex);
     smileLink.analyzeFrame();
   }
 }
Пример #2
0
 public void repaint(Graphics g) {
   if (isFocusable && isFocused) {
     g.setColor(actOuterLight);
     g.drawRect(x, y, width, height);
     g.setColor(actInnerLight);
     g.drawRect(x + 1, y + 1, width - 2, height - 2);
   }
   smileLink.updateLocation(
       x + (isCenteredHorizontally ? (width / 2 - smileLink.getWidth() / 2) : 0),
       y
           + (isCenteredVertically
               ? (height / 2 - smileLink.getHeight() / 2)
               : (isUpSize ? Theme.upSize : 0)));
   if (g != null) {
     Smiles.smiles[smileLink.smileIndex].paint(g, smileLink.x, smileLink.y, smileLink.frameIndex);
     smileLink.analyzeFrame();
   }
 }
Пример #3
0
 public int getHeight() {
   if (height == 0) {
     height = smileLink.getHeight() + (isUpSize ? Theme.upSize * 2 : 0);
   }
   return height;
 }