Calendar cal=DateTime.calendarInstance();
PredefinedPaint paint=(PredefinedPaint)calFormat.getMiddle().getPaint();//new PredefinedPaint(PredefinedPaint.DOT_LINE,Colors.VERY_LIGHT_GRAY,Color.WHITE);
paint.applyPaint(g2, useTextures());
while (i.hasNext()){
TimeInterval interval=i.next();
long s=interval.getStart();
if (CalendarService.getInstance().getDay(wc, s).isWorking()){
if (startNonworking!=-1L){
drawNonWorking(g2, startNonworking, endNonWorking, cal, coord, bounds,useScale2);
startNonworking=endNonWorking=-1L;
}
}else{
if (startNonworking==-1L) startNonworking=s;
endNonWorking=s;
}
}
if (startNonworking!=-1L){
drawNonWorking(g2, startNonworking, endNonWorking, cal, coord, bounds,useScale2);
startNonworking=endNonWorking=-1L;
}
}
if (container!=null){
//scale2 separation lines
TimeIterator i=coord.getTimeIterator(bounds.getX(), bounds.getMaxX(),true);
g2.setPaint(new PredefinedPaint(PredefinedPaint.DOT_LINE2,Color.GRAY,g2.getBackground()));
while (i.hasNext()){
TimeInterval interval=i.next();
int startX=(int)Math.round(coord.toX(interval.getStart()));
g2.drawLine(startX,bounds.y,startX,bounds.y+bounds.height);
}
//project start
int projectStartX=(int)Math.round(coord.toX(project.getStart()));