private short getIndexedColor(XSSFColor color) { return color == null ? 0 : color.getIndexed(); }
public short getFillBackgroundColor() { XSSFColor color = getFillBackgroundColorColor(); if (color == null) return 0; return color.getIndexed(); } public short getFillForegroundColor() {
public short getFillForegroundColor() { XSSFColor color = getFillForegroundColorColor(); if (color == null) return 0; return color.getIndexed(); }
private boolean sameIndexed(XSSFColor other) { if (isIndexed() == other.isIndexed()) { return !isIndexed() || getIndexed() == other.getIndexed(); } return false; } private boolean sameARGB(XSSFColor other) {
/** * Get the color to use for the bottom border * <br> * Color is optional. When missing, IndexedColors.AUTOMATIC is implied. * @return the index of the color definition, default value is {@link org.apache.poi.ss.usermodel.IndexedColors#AUTOMATIC} * @see org.apache.poi.ss.usermodel.IndexedColors */ @Override public short getBottomBorderColor() { XSSFColor clr = getBottomBorderXSSFColor(); return clr == null ? IndexedColors.BLACK.getIndex() : clr.getIndexed(); }
/** * Get the color to use for the top border * * @return the index of the color definition, default value is {@link org.apache.poi.ss.usermodel.IndexedColors#BLACK} * @see org.apache.poi.ss.usermodel.IndexedColors */ @Override public short getTopBorderColor() { XSSFColor clr = getTopBorderXSSFColor(); return clr == null ? IndexedColors.BLACK.getIndex() : clr.getIndexed(); }
/** * Get the color to use for the left border * * @return the index of the color definition, default value is {@link org.apache.poi.ss.usermodel.IndexedColors#BLACK} * @see org.apache.poi.ss.usermodel.IndexedColors */ @Override public short getLeftBorderColor() { XSSFColor clr = getLeftBorderXSSFColor(); return clr == null ? IndexedColors.BLACK.getIndex() : clr.getIndexed(); }
/** * Get the color to use for the right border * * @return the index of the color definition, default value is {@link org.apache.poi.ss.usermodel.IndexedColors#BLACK} * @see org.apache.poi.ss.usermodel.IndexedColors */ @Override public short getRightBorderColor() { XSSFColor clr = getRightBorderXSSFColor(); return clr == null ? IndexedColors.BLACK.getIndex() : clr.getIndexed(); } /**
/** * Get the background fill color. * <p> * Note - many cells are actually filled with a foreground * fill, not a background fill - see {@link #getFillForegroundColor()} * </p> * @return fill color, default value is {@link org.apache.poi.ss.usermodel.IndexedColors#AUTOMATIC} * @see org.apache.poi.ss.usermodel.IndexedColors */ @Override public short getFillBackgroundColor() { XSSFColor clr = getFillBackgroundXSSFColor(); return clr == null ? IndexedColors.AUTOMATIC.getIndex() : clr.getIndexed(); }
/** * Get the foreground fill color. * <p> * Many cells are filled with this, instead of a * background color ({@link #getFillBackgroundColor()}) * </p> * @see IndexedColors * @return fill color, default value is {@link org.apache.poi.ss.usermodel.IndexedColors#AUTOMATIC} */ @Override public short getFillForegroundColor() { XSSFColor clr = getFillForegroundXSSFColor(); return clr == null ? IndexedColors.AUTOMATIC.getIndex() : clr.getIndexed(); }
public short getFillForegroundColor() { XSSFColor color = getFillForegroundColorColor(); if (color == null) return 0; return color.getIndexed(); }
public short getFillBackgroundColor() { XSSFColor color = getFillBackgroundColorColor(); if (color == null) return 0; return color.getIndexed(); } public short getFillForegroundColor() {
public short getNearestColor( final Color awtColor ) { XSSFColor color = new XSSFColor( awtColor ); return color.getIndexed(); } }
private boolean sameIndexed(XSSFColor other) { if (isIndexed() == other.isIndexed()) { return !isIndexed() || getIndexed() == other.getIndexed(); } return false; } private boolean sameARGB(XSSFColor other) {
/** * Get the color to use for the bottom border * <br> * Color is optional. When missing, IndexedColors.AUTOMATIC is implied. * @return the index of the color definition, default value is {@link org.apache.poi.ss.usermodel.IndexedColors#AUTOMATIC} * @see org.apache.poi.ss.usermodel.IndexedColors */ @Override public short getBottomBorderColor() { XSSFColor clr = getBottomBorderXSSFColor(); return clr == null ? IndexedColors.BLACK.getIndex() : clr.getIndexed(); }
/** * Get the color to use for the bottom border * <br/> * Color is optional. When missing, IndexedColors.AUTOMATIC is implied. * @return the index of the color definition, default value is {@link org.apache.poi.ss.usermodel.IndexedColors#AUTOMATIC} * @see org.apache.poi.ss.usermodel.IndexedColors */ public short getBottomBorderColor() { XSSFColor clr = getBottomBorderXSSFColor(); return clr == null ? IndexedColors.BLACK.getIndex() : clr.getIndexed(); }
/** * Get the color to use for the left border * * @return the index of the color definition, default value is {@link org.apache.poi.ss.usermodel.IndexedColors#BLACK} * @see org.apache.poi.ss.usermodel.IndexedColors */ public short getLeftBorderColor() { XSSFColor clr = getLeftBorderXSSFColor(); return clr == null ? IndexedColors.BLACK.getIndex() : clr.getIndexed(); }
/** * Get the color to use for the right border * * @return the index of the color definition, default value is {@link org.apache.poi.ss.usermodel.IndexedColors#BLACK} * @see org.apache.poi.ss.usermodel.IndexedColors */ public short getRightBorderColor() { XSSFColor clr = getRightBorderXSSFColor(); return clr == null ? IndexedColors.BLACK.getIndex() : clr.getIndexed(); } /**
/** * Get the color to use for the left border * * @return the index of the color definition, default value is {@link org.apache.poi.ss.usermodel.IndexedColors#BLACK} * @see org.apache.poi.ss.usermodel.IndexedColors */ @Override public short getLeftBorderColor() { XSSFColor clr = getLeftBorderXSSFColor(); return clr == null ? IndexedColors.BLACK.getIndex() : clr.getIndexed(); }
/** * Get the color to use for the top border * * @return the index of the color definition, default value is {@link org.apache.poi.ss.usermodel.IndexedColors#BLACK} * @see org.apache.poi.ss.usermodel.IndexedColors */ @Override public short getTopBorderColor() { XSSFColor clr = getTopBorderXSSFColor(); return clr == null ? IndexedColors.BLACK.getIndex() : clr.getIndexed(); }