Ejemplo n.º 1
0
    /**
     * Paint a background for all groups and a round blue border and background when a cell is
     * selected.
     *
     * @param g the <tt>Graphics</tt> object
     */
    private void internalPaintComponent(Graphics g) {
      AntialiasingManager.activateAntialiasing(g);

      Graphics2D g2 = (Graphics2D) g;

      if (isSelected) {
        g2.setColor(selectedColor);
        g2.fillRect(0, 0, this.getWidth(), this.getHeight());
      }
    }
Ejemplo n.º 2
0
 /**
  * Paints the UI for the given component through the given graphics object.
  *
  * @param g the <tt>Graphics</tt> object used for painting
  * @param c the component to paint
  */
 public void paint(Graphics g, JComponent c) {
   AntialiasingManager.activateAntialiasing(g);
   super.paint(g, c);
 }