Exemplo n.º 1
0
 // Pre-condition:
 // Post-condition: If the the box has been picked (picked==true), draws the displaySymbol of the
 // object.
 // Description:
 public void draw(Graphics g) {
   super.draw(g);
   if (picked) {
     if (displaySymbol == PlayerType.exes) drawEx(g);
     if (displaySymbol == PlayerType.ohs) drawOh(g);
   }
 }
Exemplo n.º 2
0
 public void draw(Graphics g) {
   super.draw(g);
   if (mask) {
     g.setColor(Color.cyan);
     g.fillRect(getX(), getY(), getWidth(), getHeight());
     if (isDrawBorder()) {
       g.setColor(getBorderColor());
       g.drawRect(getX(), getY(), getWidth(), getHeight());
     }
     g.setColor(Color.black);
     g.drawString(getBoardChar(), getX() + 8, getY() + 14);
   }
 }