コード例 #1
0
  protected void drawInformation(GLGraphics gc) {
    super.drawInformation(gc);

    String info2 = "SHFIT+×ó  -  Ç°ÒÆ   SHIFT+ÓÒ  -  ºóÒÆ";
    Point ts = gc.textExtent(info2);
    Point size = getSize();
    gc.drawText(info2, size.x / 2 - ts.x / 2, size.y - ts.y * 2 - 5);
  }
コード例 #2
0
 protected void drawButtons(GLGraphics gc) {
   Point size = getSize();
   gc.setColor(AbstractImageViewer.invert(getBackground()));
   int bx = 1;
   int i;
   for (i = 0; i < buttonTexts.length; i++) {
     Point ts = gc.textExtent(buttonTexts[i]);
     int by = size.y - ts.y - 8;
     int bw = ts.x + 7;
     int bh = ts.y + 6;
     buttonBounds[i] = new Rectangle(bx, by, bw, bh);
     gc.setColor(AbstractImageViewer.invert(getBackground()));
     gc.drawRect(buttonBounds[i]);
     gc.drawText(buttonTexts[i], buttonBounds[i].x + 4, buttonBounds[i].y + 4);
     bx += bw + 2;
   }
 }