/** * Sets backgroundColor represented by the OpenDocument format used data * type {@odf.datatype color} See * <a href="http://www.w3.org/TR/CSS21/syndata.html#value-def-color">W3C CSS * specification</a> for further details. * @param bkColor */ public void setBackgroundColor(Color bkColor) { mElement.setFoBackgroundColorAttribute(bkColor.toString()); }
/** * Sets backgroundColor represented by the OpenDocument format used data * type {@odf.datatype color} See * <a href="http://www.w3.org/TR/CSS21/syndata.html#value-def-color">W3C CSS * specification</a> for further details. * @param bkColor */ public void setBackgroundColor(Color bkColor) { mElement.setFoBackgroundColorAttribute(bkColor.toString()); }
/** * Sets backgroundColor represented by the OpenDocument format used data * type {@odf.datatype color} See * <a href="http://www.w3.org/TR/CSS21/syndata.html#value-def-color">W3C CSS * specification</a> for further details. * @param bkColor */ public void setBackgroundColorAttribute(Color bkColor) { if (bkColor != null) { mElement.setFoBackgroundColorAttribute(bkColor.toString()); } else { mElement.setFoBackgroundColorAttribute(null); } }
/** * Sets backgroundColor represented by the OpenDocument format used data * type {@odf.datatype color} See * <a href="http://www.w3.org/TR/CSS21/syndata.html#value-def-color">W3C CSS * specification</a> for further details. * @param bkColor */ public void setBackgroundColorAttribute(Color bkColor) { if (bkColor != null) { mElement.setFoBackgroundColorAttribute(bkColor.toString()); } else { mElement.setFoBackgroundColorAttribute(null); } }
/** * Set the background color. * <p> * If the parameter <code>aColor</code> is null, the background color * definition will be removed. * * @param aColor * - the background color */ public void setBackgroundColor(Color aColor) { if (aColor == null) mElement.removeAttribute(FoBackgroundColorAttribute.ATTRIBUTE_NAME.getQName()); mElement.setFoBackgroundColorAttribute(aColor.toString()); }
/** * Set the font color. * <p> * If the parameter <code>fontColor</code> is null, the font color * definition will be removed. * * @param fontColor - the font color */ public void setFontColor(Color fontColor) { if (fontColor == null) { mElement.removeAttribute(FoColorAttribute.ATTRIBUTE_NAME.getQName()); } else { mElement.setFoColorAttribute(fontColor.toString()); } }
/** * Set the font color. * <p> * If the parameter <code>fontColor</code> is null, the font color * definition will be removed. * * @param fontColor * - the font color */ public void setFontColor(Color fontColor) { if (fontColor == null) mElement.removeAttribute(FoColorAttribute.ATTRIBUTE_NAME.getQName()); else mElement.setFoColorAttribute(fontColor.toString()); }
/** * Set the font color. * <p> * If the parameter <code>fontColor</code> is null, the font color * definition will be removed. * * @param fontColor - the font color */ public void setFontColor(Color fontColor) { if (fontColor == null) { mElement.removeAttribute(FoColorAttribute.ATTRIBUTE_NAME.getQName()); } else { mElement.setFoColorAttribute(fontColor.toString()); } }
/** * Set the background color. * <p> * If the parameter <code>aColor</code> is null, the background color * definition will be removed. * * @param aColor * - the background color */ public void setBackgroundColor(Color aColor) { if (aColor == null) { mElement.removeAttribute(FoBackgroundColorAttribute.ATTRIBUTE_NAME.getQName()); } else { mElement.setFoBackgroundColorAttribute(aColor.toString()); } }
/** * Set the background color. * <p> * If the parameter <code>aColor</code> is null, the background color * definition will be removed. * * @param aColor * - the background color */ public void setBackgroundColor(Color aColor) { if (aColor == null) { mElement.removeAttribute(FoBackgroundColorAttribute.ATTRIBUTE_NAME.getQName()); } else { mElement.setFoBackgroundColorAttribute(aColor.toString()); } }
case SOLID: mElement.setDrawFillAttribute("solid"); mElement.setDrawFillColorAttribute(color.toString()); break; case BITMAP:
@Override public boolean equals(Object o) { if (o == Border.NONE && this == Border.NONE) return true; if (o instanceof Border) { Border aBorder = (Border) o; if (aBorder.getLineStyle() != this.getLineStyle()) return false; if (!aBorder.color.toString().equals(this.color.toString())) return false; if (aBorder.linearMeasure != this.linearMeasure) { Border bBorder = aBorder.changeLineMeasure(this.linearMeasure); return this.equals(bBorder); } if (!doubleEqual(aBorder.width, this.width)) return false; if (lineStyle == StyleTypeDefinitions.LineType.DOUBLE) { if (!doubleEqual(aBorder.distance, this.distance)) return false; if (!doubleEqual(aBorder.innerLineWidth, this.innerLineWidth)) return false; if (!doubleEqual(aBorder.outerLineWidth, this.outerLineWidth)) return false; } return true; } return false; }
@Override public boolean equals(Object o) { if (o == Border.NONE && this == Border.NONE) return true; if (o instanceof Border) { Border aBorder = (Border) o; if (aBorder.getLineStyle() != this.getLineStyle()) return false; if (!aBorder.color.toString().equals(this.color.toString())) return false; if (aBorder.linearMeasure != this.linearMeasure) { Border bBorder = aBorder.changeLineMeasure(this.linearMeasure); return this.equals(bBorder); } if (!doubleEqual(aBorder.width, this.width)) return false; if (lineStyle == StyleTypeDefinitions.LineType.DOUBLE) { if (!doubleEqual(aBorder.distance, this.distance)) return false; if (!doubleEqual(aBorder.innerLineWidth, this.innerLineWidth)) return false; if (!doubleEqual(aBorder.outerLineWidth, this.outerLineWidth)) return false; } return true; } return false; }
@Override public boolean equals(Object o) { if (o == Border.NONE && this == Border.NONE) return true; if (o instanceof Border) { Border aBorder = (Border) o; if (aBorder.getLineStyle() != this.getLineStyle()) return false; if (!aBorder.color.toString().equals(this.color.toString())) return false; if (aBorder.linearMeasure != this.linearMeasure) { Border bBorder = aBorder.changeLineMeasure(this.linearMeasure); return this.equals(bBorder); } if (!doubleEqual(aBorder.width, this.width)) return false; if (lineStyle == StyleTypeDefinitions.LineType.DOUBLE) { if (!doubleEqual(aBorder.distance, this.distance)) return false; if (!doubleEqual(aBorder.innerLineWidth, this.innerLineWidth)) return false; if (!doubleEqual(aBorder.outerLineWidth, this.outerLineWidth)) return false; } return true; } return false; }
/** * Set the background color of this cell. * * @param cellBackgroundColor * the background color that need to set. * If <code>cellBackgroundColor</code> is null, default background color <code>Color.WHITE</code> will be set. */ public void setCellBackgroundColor(Color cellBackgroundColor) { if (cellBackgroundColor == null) { cellBackgroundColor = Color.WHITE; } splitRepeatedCells(); OdfStyleBase styleElement = getCellStyleElementForWrite(); if (styleElement != null) { OdfStyleProperty bkColorProperty = OdfStyleProperty.get(OdfStylePropertiesSet.TableCellProperties, OdfName.newName(OdfDocumentNamespace.FO, "background-color")); styleElement.setProperty(bkColorProperty, cellBackgroundColor.toString()); } }
/** * Set the background color of this cell. * * @param cellBackgroundColor * the background color that need to set. * If <code>cellBackgroundColor</code> is null, default background color <code>Color.WHITE</code> will be set. */ public void setCellBackgroundColor(Color cellBackgroundColor) { if (cellBackgroundColor == null) { cellBackgroundColor = Color.WHITE; } splitRepeatedCells(); OdfStyleBase styleElement = getCellStyleElementForWrite(); if (styleElement != null) { OdfStyleProperty bkColorProperty = OdfStyleProperty.get(OdfStylePropertiesSet.TableCellProperties, OdfName.newName(OdfDocumentNamespace.FO, "background-color")); styleElement.setProperty(bkColorProperty, cellBackgroundColor.toString()); } }
/** * Set the background color of this cell. * * @param cellBackgroundColor * the background color that need to set. * If <code>cellBackgroundColor</code> is null, default background color <code>Color.WHITE</code> will be set. */ public void setCellBackgroundColor(Color cellBackgroundColor) { if (cellBackgroundColor == null) { cellBackgroundColor = Color.WHITE; } splitRepeatedCells(); OdfStyleBase styleElement = getCellStyleElementForWrite(); if (styleElement != null) { OdfStyleProperty bkColorProperty = OdfStyleProperty.get(OdfStylePropertiesSet.TableCellProperties, OdfName.newName(OdfDocumentNamespace.FO, "background-color")); styleElement.setProperty(bkColorProperty, cellBackgroundColor.toString()); } }
@Override public boolean equals(Object o) { if (o instanceof Font) { Font f = (Font) o; if (!this.getFamilyName().equals(f.getFamilyName())) return false; if (!(Math.abs(this.getSize() - f.getSize()) < 0.005)) return false; if (!(this.getFontStyle() == f.getFontStyle())) return false; // if ((this.getLocale() != null && f.getLocale() == null) // || (this.getLocale() == null && f.getLocale() != null)) // return false; // if ((this.getLocale() != null && f.getLocale() != null) // && (!this.getLocale().equals(f.getLocale()))) // return false; if ((this.getColor() != null && f.getColor() == null) || (this.getColor() == null && f.getColor() != null)) return false; if ((this.getColor() != null && f.getColor() != null) && (!this.getColor().toString().equals(f.getColor().toString()))) return false; return true; } return false; } }
@Override public boolean equals(Object o) { if (o instanceof Font) { Font f = (Font) o; if (!this.getFamilyName().equals(f.getFamilyName())) return false; if (!(Math.abs(this.getSize() - f.getSize()) < 0.005)) return false; if (!(this.getFontStyle() == f.getFontStyle())) return false; // if ((this.getLocale() != null && f.getLocale() == null) // || (this.getLocale() == null && f.getLocale() != null)) // return false; // if ((this.getLocale() != null && f.getLocale() != null) // && (!this.getLocale().equals(f.getLocale()))) // return false; if ((this.getColor() != null && f.getColor() == null) || (this.getColor() == null && f.getColor() != null)) return false; if ((this.getColor() != null && f.getColor() != null) && (!this.getColor().toString().equals(f.getColor().toString()))) return false; return true; } return false; } }
@Override public boolean equals(Object o) { if (o instanceof Font) { Font f = (Font) o; if (!this.getFamilyName().equals(f.getFamilyName())) return false; if (!(Math.abs(this.getSize() - f.getSize()) < 0.005)) return false; if (!(this.getFontStyle() == f.getFontStyle())) return false; // if ((this.getLocale() != null && f.getLocale() == null) // || (this.getLocale() == null && f.getLocale() != null)) // return false; // if ((this.getLocale() != null && f.getLocale() != null) // && (!this.getLocale().equals(f.getLocale()))) // return false; if ((this.getColor() != null && f.getColor() == null) || (this.getColor() == null && f.getColor() != null)) return false; if ((this.getColor() != null && f.getColor() != null) && (!this.getColor().toString().equals(f.getColor().toString()))) return false; return true; } return false; } }