/** * Sets the position of the end of the progress indicator, as a percentage * of the bar width, and sends a {@link RendererChangeEvent} to all * registered listeners. * * @param percent the percent. * * @see #getEndPercent() */ public void setEndPercent(double percent) { this.endPercent = percent; fireChangeEvent(); }
double rectStart = calculateBarW0(plot, orientation, dataArea, domainAxis, state, row, column); double rectBreadth = state.getBarWidth(); Rectangle2D incompleteBar = null; Number percent = dataset.getPercentComplete(row, column); double start = getStartPercent(); double end = getEndPercent(); if (percent != null) { double p = percent.doubleValue(); if (getShadowsVisible()) { getBarPainter().paintBarShadow(g2, this, row, column, bar, barBase, true); getBarPainter().paintBar(g2, this, row, column, bar, barBase); g2.setPaint(getCompletePaint()); g2.fill(completeBar); g2.setPaint(getIncompletePaint()); g2.fill(incompleteBar); if (isDrawBarOutline() && state.getBarWidth() > BAR_OUTLINE_WIDTH_THRESHOLD) { Stroke stroke = getItemOutlineStroke(row, column); Paint paint = getItemOutlinePaint(row, column); if (stroke != null && paint != null) { g2.setStroke(stroke);
drawTask(g2, state, dataArea, plot, domainAxis, rangeAxis, dataset, row, column); double rectStart = calculateBarW0(plot, plot.getOrientation(), dataArea, domainAxis, state, row, column); double rectLength = Math.abs(translatedValue1 - translatedValue0); Number percent = dataset.getPercentComplete(row, column, subinterval); double start = getStartPercent(); double end = getEndPercent(); if (percent != null) { double p = percent.doubleValue(); if (getShadowsVisible()) { getBarPainter().paintBarShadow(g2, this, row, column, bar, barBase, true); getBarPainter().paintBar(g2, this, row, column, bar, barBase); g2.setPaint(getCompletePaint()); g2.fill(completeBar); g2.setPaint(getIncompletePaint()); g2.fill(incompleteBar); if (isDrawBarOutline() && state.getBarWidth() > BAR_OUTLINE_WIDTH_THRESHOLD) { g2.setStroke(getItemStroke(row, column));
/** * Draws the bar for a single (series, category) data item. * * @param g2 the graphics device. * @param state the renderer state. * @param dataArea the data area. * @param plot the plot. * @param domainAxis the domain axis. * @param rangeAxis the range axis. * @param dataset the dataset. * @param row the row index (zero-based). * @param column the column index (zero-based). * @param pass the pass index. */ @Override public void drawItem(Graphics2D g2, CategoryItemRendererState state, Rectangle2D dataArea, CategoryPlot plot, CategoryAxis domainAxis, ValueAxis rangeAxis, CategoryDataset dataset, int row, int column, int pass) { if (dataset instanceof GanttCategoryDataset) { GanttCategoryDataset gcd = (GanttCategoryDataset) dataset; drawTasks(g2, state, dataArea, plot, domainAxis, rangeAxis, gcd, row, column); } else { // let the superclass handle it... super.drawItem(g2, state, dataArea, plot, domainAxis, rangeAxis, dataset, row, column, pass); } }
DateAxis dateAxis = new DateAxis(dateAxisLabel); CategoryItemRenderer renderer = new GanttRenderer(); if (tooltips) { renderer.setDefaultToolTipGenerator(
double rectStart = calculateBarW0(plot, orientation, dataArea, domainAxis, state, row, column); double rectBreadth = state.getBarWidth(); Rectangle2D incompleteBar = null; Number percent = dataset.getPercentComplete(row, column); double start = getStartPercent(); double end = getEndPercent(); if (percent != null) { double p = percent.doubleValue(); if (getShadowsVisible()) { getBarPainter().paintBarShadow(g2, this, row, column, bar, barBase, true); getBarPainter().paintBar(g2, this, row, column, bar, barBase); g2.setPaint(getCompletePaint()); g2.fill(completeBar); g2.setPaint(getIncompletePaint()); g2.fill(incompleteBar); if (isDrawBarOutline() && state.getBarWidth() > BAR_OUTLINE_WIDTH_THRESHOLD) { Stroke stroke = getItemOutlineStroke(row, column); Paint paint = getItemOutlinePaint(row, column); if (stroke != null && paint != null) { g2.setStroke(stroke);
drawTask(g2, state, dataArea, plot, domainAxis, rangeAxis, dataset, row, column); double rectStart = calculateBarW0(plot, plot.getOrientation(), dataArea, domainAxis, state, row, column); double rectLength = Math.abs(translatedValue1 - translatedValue0); Number percent = dataset.getPercentComplete(row, column, subinterval); double start = getStartPercent(); double end = getEndPercent(); if (percent != null) { double p = percent.doubleValue(); if (getShadowsVisible()) { getBarPainter().paintBarShadow(g2, this, row, column, bar, barBase, true); getBarPainter().paintBar(g2, this, row, column, bar, barBase); g2.setPaint(getCompletePaint()); g2.fill(completeBar); g2.setPaint(getIncompletePaint()); g2.fill(incompleteBar); if (isDrawBarOutline() && state.getBarWidth() > BAR_OUTLINE_WIDTH_THRESHOLD) { g2.setStroke(getItemStroke(row, column));
drawTasks(g2, state, dataArea, plot, domainAxis, rangeAxis, gcd, row, column);
DateAxis dateAxis = new DateAxis(dateAxisLabel); CategoryItemRenderer renderer = new GanttRenderer(); if (tooltips) { renderer.setBaseToolTipGenerator(
/** * Sets the position of the start of the progress indicator, as a * percentage of the bar width, and sends a {@link RendererChangeEvent} to * all registered listeners. * * @param percent the percent. * * @see #getStartPercent() */ public void setStartPercent(double percent) { this.startPercent = percent; fireChangeEvent(); }
/** * Sets the position of the start of the progress indicator, as a * percentage of the bar width, and sends a {@link RendererChangeEvent} to * all registered listeners. * * @param percent the percent. * * @see #getStartPercent() */ public void setStartPercent(double percent) { this.startPercent = percent; fireChangeEvent(); }
/** * Sets the position of the end of the progress indicator, as a percentage * of the bar width, and sends a {@link RendererChangeEvent} to all * registered listeners. * * @param percent the percent. * * @see #getEndPercent() */ public void setEndPercent(double percent) { this.endPercent = percent; fireChangeEvent(); }
/** * Sets the paint used to show the percentage complete and sends a * {@link RendererChangeEvent} to all registered listeners. * * @param paint the paint (<code>null</code> not permitted). * * @see #getCompletePaint() */ public void setCompletePaint(Paint paint) { if (paint == null) { throw new IllegalArgumentException("Null 'paint' argument."); } this.completePaint = paint; fireChangeEvent(); }
/** * Sets the paint used to show the percentage incomplete and sends a * {@link RendererChangeEvent} to all registered listeners. * * @param paint the paint (<code>null</code> not permitted). * * @see #getIncompletePaint() */ public void setIncompletePaint(Paint paint) { if (paint == null) { throw new IllegalArgumentException("Null 'paint' argument."); } this.incompletePaint = paint; fireChangeEvent(); }
/** * Sets the paint used to show the percentage incomplete and sends a * {@link RendererChangeEvent} to all registered listeners. * * @param paint the paint ({@code null} not permitted). * * @see #getIncompletePaint() */ public void setIncompletePaint(Paint paint) { Args.nullNotPermitted(paint, "paint"); this.incompletePaint = paint; fireChangeEvent(); }
/** * Sets the paint used to show the percentage complete and sends a * {@link RendererChangeEvent} to all registered listeners. * * @param paint the paint ({@code null} not permitted). * * @see #getCompletePaint() */ public void setCompletePaint(Paint paint) { Args.nullNotPermitted(paint, "paint"); this.completePaint = paint; fireChangeEvent(); }