/** * Set the color to use for the right border * * @param color the index of the color definition * @see org.apache.poi.ss.usermodel.IndexedColors */ @Override public void setRightBorderColor(short color) { XSSFColor clr = XSSFColor.from(CTColor.Factory.newInstance(), _stylesSource.getIndexedColors()); clr.setIndexed(color); setRightBorderColor(clr); }
/** * Set the foreground fill color as a indexed color value * <br> * <i>Note: Ensure Foreground color is set prior to background color.</i> * @param fg the color to use * @see org.apache.poi.ss.usermodel.IndexedColors */ @Override public void setFillForegroundColor(short fg) { XSSFColor clr = XSSFColor.from(CTColor.Factory.newInstance(), _stylesSource.getIndexedColors()); clr.setIndexed(fg); setFillForegroundColor(clr); }
/** * Set the color to use for the bottom border * @param color the index of the color definition * @see org.apache.poi.ss.usermodel.IndexedColors */ @Override public void setBottomBorderColor(short color) { XSSFColor clr = XSSFColor.from(CTColor.Factory.newInstance(), _stylesSource.getIndexedColors()); clr.setIndexed(color); setBottomBorderColor(clr); }
/** * Set the color to use for the left border as a indexed color value * * @param color the index of the color definition * @see org.apache.poi.ss.usermodel.IndexedColors */ @Override public void setLeftBorderColor(short color) { XSSFColor clr = XSSFColor.from(CTColor.Factory.newInstance(), _stylesSource.getIndexedColors()); clr.setIndexed(color); setLeftBorderColor(clr); }
/** * Set the color to use for the top border * * @param color the index of the color definition * @see org.apache.poi.ss.usermodel.IndexedColors */ @Override public void setTopBorderColor(short color) { XSSFColor clr = XSSFColor.from(CTColor.Factory.newInstance(), _stylesSource.getIndexedColors()); clr.setIndexed(color); setTopBorderColor(clr); }
public void setFillBackgroundColor(short bg) { XSSFColor clr = XSSFColor.from(CTColor.Factory.newInstance(), _stylesSource.getIndexedColors()); clr.setIndexed(bg); setFillBackgroundColor(clr);
/** * Set the color to use for the bottom border * @param color the index of the color definition * @see org.apache.poi.ss.usermodel.IndexedColors */ public void setBottomBorderColor(short color) { XSSFColor clr = new XSSFColor(); clr.setIndexed(color); setBottomBorderColor(clr); }
/** * Set the foreground fill color as a indexed color value * <br/> * <i>Note: Ensure Foreground color is set prior to background color.</i> * @param fg the color to use * @see org.apache.poi.ss.usermodel.IndexedColors */ public void setFillForegroundColor(short fg) { XSSFColor clr = new XSSFColor(); clr.setIndexed(fg); setFillForegroundColor(clr); }
/** * Set the color to use for the left border as a indexed color value * * @param color the index of the color definition * @see org.apache.poi.ss.usermodel.IndexedColors */ public void setLeftBorderColor(short color) { XSSFColor clr = new XSSFColor(); clr.setIndexed(color); setLeftBorderColor(clr); }
/** * Set the color to use for the top border * * @param color the index of the color definition * @see org.apache.poi.ss.usermodel.IndexedColors */ public void setTopBorderColor(short color) { XSSFColor clr = new XSSFColor(); clr.setIndexed(color); setTopBorderColor(clr); }
/** * Set the color to use for the right border * * @param color the index of the color definition * @see org.apache.poi.ss.usermodel.IndexedColors */ public void setRightBorderColor(short color) { XSSFColor clr = new XSSFColor(); clr.setIndexed(color); setRightBorderColor(clr); }
clr.setIndexed(bg); setFillBackgroundColor(clr);
/** * Set the color to use for the left border as a indexed color value * * @param color the index of the color definition * @see org.apache.poi.ss.usermodel.IndexedColors */ @Override public void setLeftBorderColor(short color) { XSSFColor clr = XSSFColor.from(CTColor.Factory.newInstance(), _stylesSource.getIndexedColors()); clr.setIndexed(color); setLeftBorderColor(clr); }
/** * Set the color to use for the top border * * @param color the index of the color definition * @see org.apache.poi.ss.usermodel.IndexedColors */ @Override public void setTopBorderColor(short color) { XSSFColor clr = XSSFColor.from(CTColor.Factory.newInstance(), _stylesSource.getIndexedColors()); clr.setIndexed(color); setTopBorderColor(clr); }
/** * Set the color to use for the bottom border * @param color the index of the color definition * @see org.apache.poi.ss.usermodel.IndexedColors */ @Override public void setBottomBorderColor(short color) { XSSFColor clr = XSSFColor.from(CTColor.Factory.newInstance(), _stylesSource.getIndexedColors()); clr.setIndexed(color); setBottomBorderColor(clr); }
/** * Set the color to use for the right border * * @param color the index of the color definition * @see org.apache.poi.ss.usermodel.IndexedColors */ @Override public void setRightBorderColor(short color) { XSSFColor clr = XSSFColor.from(CTColor.Factory.newInstance(), _stylesSource.getIndexedColors()); clr.setIndexed(color); setRightBorderColor(clr); }
/** * Set the foreground fill color as a indexed color value * <br> * <i>Note: Ensure Foreground color is set prior to background color.</i> * @param fg the color to use * @see org.apache.poi.ss.usermodel.IndexedColors */ @Override public void setFillForegroundColor(short fg) { XSSFColor clr = XSSFColor.from(CTColor.Factory.newInstance(), _stylesSource.getIndexedColors()); clr.setIndexed(fg); setFillForegroundColor(clr); }
public static int getBorderRBG(Workbook wb , short index){ int result = 0; if(wb instanceof HSSFWorkbook){ HSSFWorkbook hwb = (HSSFWorkbook)wb; HSSFColor color = hwb.getCustomPalette().getColor(index); if(color != null){ result = getRGB(color); } } if(wb instanceof XSSFWorkbook){ XSSFColor color = new XSSFColor(); color.setIndexed(index); result = getRGB(color); } return result; }
public void setFillBackgroundColor(short bg) { XSSFColor clr = XSSFColor.from(CTColor.Factory.newInstance(), _stylesSource.getIndexedColors()); clr.setIndexed(bg); setFillBackgroundColor(clr);