private Rectangle2D decodeRect1() {
   rect.setRect(
       decodeX(0.0f), // x
       decodeY(0.0f), // y
       decodeX(3.0f) - decodeX(0.0f), // width
       decodeY(3.0f) - decodeY(0.0f)); // height
   return rect;
 }
 private Rectangle2D decodeRect6() {
   rect.setRect(
       decodeX(2.0f), // x
       decodeY(1.0f), // y
       decodeX(2.3333333f) - decodeX(2.0f), // width
       decodeY(2.0f) - decodeY(1.0f)); // height
   return rect;
 }
 private Rectangle2D decodeRect11() {
   rect.setRect(
       decodeX(0.6f), // x
       decodeY(2.4f), // y
       decodeX(2.4f) - decodeX(0.6f), // width
       decodeY(2.6f) - decodeY(2.4f)); // height
   return rect;
 }
 private Rectangle2D decodeRect9() {
   rect.setRect(
       decodeX(1.3815789f), // x
       decodeY(1.6111112f), // y
       decodeX(1.4366028f) - decodeX(1.3815789f), // width
       decodeY(1.7739899f) - decodeY(1.6111112f)); // height
   return rect;
 }
 private Rectangle2D decodeRect10() {
   rect.setRect(
       decodeX(1.7918661f), // x
       decodeY(1.7752526f), // y
       decodeX(1.8349283f) - decodeX(1.7918661f), // width
       decodeY(1.4217172f) - decodeY(1.7752526f)); // height
   return rect;
 }
 private Rectangle2D decodeRect7() {
   rect.setRect(
       decodeX(1.4389952f), // x
       decodeY(1.7209597f), // y
       decodeX(1.7882775f) - decodeX(1.4389952f), // width
       decodeY(1.7765152f) - decodeY(1.7209597f)); // height
   return rect;
 }
 private Rectangle2D decodeRect8() {
   rect.setRect(
       decodeX(1.5645933f), // x
       decodeY(1.4078283f), // y
       decodeX(1.7870812f) - decodeX(1.5645933f), // width
       decodeY(1.5239899f) - decodeY(1.4078283f)); // height
   return rect;
 }
 private Rectangle2D decodeRect5() {
   rect.setRect(
       decodeX(1.6267943f), // x
       decodeY(1.3888888f), // y
       decodeX(1.673445f) - decodeX(1.6267943f), // width
       decodeY(1.6085858f) - decodeY(1.3888888f)); // height
   return rect;
 }
 private Rectangle2D decodeRect6() {
   rect.setRect(
       decodeX(1.3684211f), // x
       decodeY(1.6111112f), // y
       decodeX(1.4210527f) - decodeX(1.3684211f), // width
       decodeY(1.7777778f) - decodeY(1.6111112f)); // height
   return rect;
 }
 private Rectangle2D decodeRect4() {
   rect.setRect(
       decodeX(1.2643541f), // x
       decodeY(1.5542929f), // y
       decodeX(1.6315789f) - decodeX(1.2643541f), // width
       decodeY(1.5997474f) - decodeY(1.5542929f)); // height
   return rect;
 }
 private Rectangle2D decodeRect3() {
   rect.setRect(
       decodeX(1.2212919f), // x
       decodeY(1.6047981f), // y
       decodeX(1.270335f) - decodeX(1.2212919f), // width
       decodeY(1.3876263f) - decodeY(1.6047981f)); // height
   return rect;
 }
 private Rectangle2D decodeRect2() {
   rect.setRect(
       decodeX(1.2165072f), // x
       decodeY(1.2790405f), // y
       decodeX(1.6746411f) - decodeX(1.2165072f), // width
       decodeY(1.3876263f) - decodeY(1.2790405f)); // height
   return rect;
 }
 private Rectangle2D decodeRect6() {
   rect.setRect(
       decodeX(0.22222222f), // x
       decodeY(0.13333334f), // y
       decodeX(2.916668f) - decodeX(0.22222222f), // width
       decodeY(2.75f) - decodeY(0.13333334f)); // height
   return rect;
 }
예제 #14
0
 public void draw(
     Graphics2D g,
     Color stringColor,
     Color foreground,
     Color background,
     String info,
     double x,
     double y) {
   FontMetrics fm = g.getFontMetrics();
   int h = fm.getHeight();
   int w = fm.stringWidth(info);
   r1.setRect(
       x - w / 2 - in.left, y - in.top - h / 2, w + in.right + in.left, h + in.bottom + in.top);
   g.setColor(background);
   g.fill(r1);
   g.setColor(stringColor);
   g.draw(r1);
   g.setColor(foreground);
   r2.setRect(r1.getX() + 1, r1.getY() + 1, r1.getWidth() - 2, r1.getHeight() - 2);
   g.draw(r2);
   g.setColor(stringColor);
   g.drawString(
       info, (float) (r2.getX() + in.left), (float) (r2.getY() + h - (r2.getHeight() - h) / 2));
 }