Exemplo n.º 1
1
 /**
  * Set the current background color to the given color.
  *
  * <p>The color object is cloned; you can change the original afterwards. If the color object is
  * null, the current background color is turned off (same as nobackground).
  *
  * @param c the color object.
  * @return the current background color.
  */
 public Color background(Color c) {
   return canvas.setBackground(c == null ? null : c.clone());
 }
Exemplo n.º 2
-1
 @Override
 public Object clone() throws CloneNotSupportedException {
   final CellStyle result = (CellStyle) super.clone();
   if (bottomBorderColor != null) result.bottomBorderColor = (Color) bottomBorderColor.clone();
   if (fillBackgroundColor != null)
     result.fillBackgroundColor = (Color) fillBackgroundColor.clone();
   if (leftBorderColor != null) result.leftBorderColor = (Color) leftBorderColor.clone();
   if (rightBorderColor != null) result.rightBorderColor = (Color) rightBorderColor.clone();
   if (topBorderColor != null) result.topBorderColor = (Color) topBorderColor.clone();
   if (font != null) result.font = (Font) font.clone();
   return result;
 }