List of usage examples for org.apache.poi.hssf.usermodel HSSFSimpleShape setLineStyleColor
public void setLineStyleColor(int lineStyleColor)
From source file:poi.hssf.usermodel.examples.OfficeDrawing.java
License:Apache License
private static void drawManyLines(HSSFPatriarch patriarch) { // Draw bunch of lines int x1 = 100; int y1 = 100; int x2 = 800; int y2 = 200; int color = 0; for (int i = 0; i < 10; i++) { HSSFClientAnchor a2 = new HSSFClientAnchor(); a2.setAnchor((short) 2, 2, x1, y1, (short) 2, 2, x2, y2); HSSFSimpleShape shape2 = patriarch.createSimpleShape(a2); shape2.setShapeType(HSSFSimpleShape.OBJECT_TYPE_LINE); shape2.setLineStyleColor(color); y1 -= 10;// w ww . j a v a 2 s . c om y2 -= 10; color += 30; } }