// 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); } }
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); } }