From: <nic...@us...> - 2003-09-02 11:32:40
|
Update of /cvsroot/jcharts/krysalis-jcharts/src/scratchpad/org/krysalis/jcharts/gantt In directory sc8-pr-cvs1:/tmp/cvs-serv2600/src/scratchpad/org/krysalis/jcharts/gantt Modified Files: PlanRenderer.java Log Message: Cosmetic changes. Index: PlanRenderer.java =================================================================== RCS file: /cvsroot/jcharts/krysalis-jcharts/src/scratchpad/org/krysalis/jcharts/gantt/PlanRenderer.java,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** PlanRenderer.java 2 Sep 2003 11:12:03 -0000 1.6 --- PlanRenderer.java 2 Sep 2003 11:32:36 -0000 1.7 *************** *** 155,159 **** int offset = 0; ! long singleDayWidth = (width - leftWidth) / dh.getTotalDays() ; Calendar cal = Calendar.getInstance(); cal.setTime(dh.getLastWeek()); --- 155,159 ---- int offset = 0; ! long singleDayWidth = (width - leftWidth) / dh.getTotalDays(); Calendar cal = Calendar.getInstance(); cal.setTime(dh.getLastWeek()); *************** *** 162,175 **** count++, offset++, cal.roll(Calendar.DAY_OF_YEAR, true)) { ! float currentDateLocation = ! leftWidth + offset * singleDayWidth; - Shape currentDay = - new Rectangle2D.Float( - currentDateLocation, - (float) currentTopEdge, - (float) singleDayWidth, - (height - currentTopEdge)); - if (count % 7 == 0 || count % 7 == 1) { //Saturday and sunday --- 162,174 ---- count++, offset++, cal.roll(Calendar.DAY_OF_YEAR, true)) { ! float currentDateLocation = leftWidth + offset * singleDayWidth; ! ! Shape currentDay = ! new Rectangle2D.Float( ! currentDateLocation, ! (float) currentTopEdge, ! (float) singleDayWidth, ! (height - currentTopEdge)); if (count % 7 == 0 || count % 7 == 1) { //Saturday and sunday *************** *** 185,200 **** } g2.fill(currentDay); ! g2.setPaint(new Color(200, 200, 200)); g2.draw(currentDay); ! ! // //@debug ! // g2.setPaint(Color.RED); ! // //@debug ! // g2.drawString( ! // dh.shortFormat(cal.getTime()), ! // currentDateLocation + 1, ! // currentTopEdge + offset*15); ! //@todo add date number eventually --- 184,199 ---- } g2.fill(currentDay); ! g2.setPaint(new Color(200, 200, 200)); g2.draw(currentDay); ! ! // //@debug ! // g2.setPaint(Color.RED); ! // //@debug ! // g2.drawString( ! // dh.shortFormat(cal.getTime()), ! // currentDateLocation + 1, ! // currentTopEdge + offset*15); ! //@todo add date number eventually *************** *** 214,220 **** currentDateLocation, (height - currentTopEdge))); ! } ! } --- 213,219 ---- currentDateLocation, (height - currentTopEdge))); ! } ! } *************** *** 258,262 **** leftWidth + daysToStart * singleDayWidth, currentTopEdge + barHeightMargin, ! (days+1) * singleDayWidth, barHeigth); --- 257,261 ---- leftWidth + daysToStart * singleDayWidth, currentTopEdge + barHeightMargin, ! (days + 1) * singleDayWidth, barHeigth); *************** *** 274,284 **** g2.drawString( dh.shortFormat(start), ! leftWidth + daysToStart * singleDayWidth - 25, ! currentTopEdge + 9); g2.drawString( dh.shortFormat(end), ! leftWidth + daysToStart * singleDayWidth + ! (days+1) * singleDayWidth + 5, currentTopEdge + 9); --- 273,284 ---- g2.drawString( dh.shortFormat(start), ! leftWidth + daysToStart * singleDayWidth - 25, ! currentTopEdge + 9); g2.drawString( dh.shortFormat(end), ! leftWidth ! + daysToStart * singleDayWidth ! + (days + 1) * singleDayWidth + 5, currentTopEdge + 9); *************** *** 304,308 **** leftWidth + fragmentdaysToStart * singleDayWidth, currentTopEdge + barHeightMargin, ! (fragmentDays+1) * singleDayWidth, barHeigth); --- 304,308 ---- leftWidth + fragmentdaysToStart * singleDayWidth, currentTopEdge + barHeightMargin, ! (fragmentDays + 1) * singleDayWidth, barHeigth); *************** *** 339,352 **** milestoneMinHeight); Shape milestoneShape = new Rectangle2D.Float( ! (float) leftWidth ! + daysToStartMilestone ! * singleDayWidth, (float) currentTopEdge + barspaceHeight - barHeightMargin - mul, - //@todo not using milestonewidth (float) singleDayWidth, mul); --- 339,350 ---- milestoneMinHeight); + //@todo not using milestonewidth Shape milestoneShape = new Rectangle2D.Float( ! (float) leftWidth + daysToStartMilestone * singleDayWidth, (float) currentTopEdge + barspaceHeight - barHeightMargin - mul, (float) singleDayWidth, mul); *************** *** 375,379 **** taskGraphic = new Rectangle2D.Float( ! leftWidth + daysToStart * singleDayWidth , currentTopEdge + barHeightMargin, (days + 1) * singleDayWidth, --- 373,377 ---- taskGraphic = new Rectangle2D.Float( ! leftWidth + daysToStart * singleDayWidth, currentTopEdge + barHeightMargin, (days + 1) * singleDayWidth, *************** *** 396,400 **** } ! } --- 394,398 ---- } ! } |