/** * Returns the start value of a sub-interval for a given item. * * @param rowKey the row key. * @param columnKey the column key. * @param subinterval the subinterval. * * @return The start value (possibly <code>null</code>). */ public Number getStartValue(Comparable rowKey, Comparable columnKey, int subinterval) { Number result = null; int row = getRowIndex(rowKey); TaskSeries series = (TaskSeries) this.data.get(row); Task task = series.get(columnKey.toString()); if (task != null) { Task sub = task.getSubtask(subinterval); if (sub != null) { TimePeriod duration = sub.getDuration(); result = new Long(duration.getStart().getTime()); } } return result; }
/** * Returns the end value of a sub-interval for a given item. * * @param rowKey the row key. * @param columnKey the column key. * @param subinterval the subinterval. * * @return The end value (possibly <code>null</code>). */ public Number getEndValue(Comparable rowKey, Comparable columnKey, int subinterval) { Number result = null; int row = getRowIndex(rowKey); TaskSeries series = (TaskSeries) this.data.get(row); Task task = series.get(columnKey.toString()); if (task != null) { Task sub = task.getSubtask(subinterval); if (sub != null) { TimePeriod duration = sub.getDuration(); result = new Long(duration.getEnd().getTime()); } } return result; }
/** * Returns the start value of a sub-interval for a given item. * * @param rowKey the row key. * @param columnKey the column key. * @param subinterval the subinterval. * * @return The start value (possibly <code>null</code>). */ @Override public Number getStartValue(Comparable rowKey, Comparable columnKey, int subinterval) { Number result = null; int row = getRowIndex(rowKey); TaskSeries series = (TaskSeries) this.data.get(row); Task task = series.get(columnKey.toString()); if (task != null) { Task sub = task.getSubtask(subinterval); if (sub != null) { TimePeriod duration = sub.getDuration(); result = new Long(duration.getStart().getTime()); } } return result; }
/** * Returns the end value of a sub-interval for a given item. * * @param rowKey the row key. * @param columnKey the column key. * @param subinterval the subinterval. * * @return The end value (possibly <code>null</code>). */ @Override public Number getEndValue(Comparable rowKey, Comparable columnKey, int subinterval) { Number result = null; int row = getRowIndex(rowKey); TaskSeries series = (TaskSeries) this.data.get(row); Task task = series.get(columnKey.toString()); if (task != null) { Task sub = task.getSubtask(subinterval); if (sub != null) { TimePeriod duration = sub.getDuration(); result = new Long(duration.getEnd().getTime()); } } return result; }
/** * Returns the start value of a sub-interval for a given item. * * @param rowKey the row key. * @param columnKey the column key. * @param subinterval the subinterval. * * @return The start value (possibly {@code null}). */ @Override public Number getStartValue(Comparable rowKey, Comparable columnKey, int subinterval) { Number result = null; int row = getRowIndex(rowKey); TaskSeries series = (TaskSeries) this.data.get(row); Task task = series.get(columnKey.toString()); if (task != null) { Task sub = task.getSubtask(subinterval); if (sub != null) { TimePeriod duration = sub.getDuration(); result = new Long(duration.getStart().getTime()); } } return result; }
/** * Returns the end value of a sub-interval for a given item. * * @param rowKey the row key. * @param columnKey the column key. * @param subinterval the subinterval. * * @return The end value (possibly {@code null}). */ @Override public Number getEndValue(Comparable rowKey, Comparable columnKey, int subinterval) { Number result = null; int row = getRowIndex(rowKey); TaskSeries series = (TaskSeries) this.data.get(row); Task task = series.get(columnKey.toString()); if (task != null) { Task sub = task.getSubtask(subinterval); if (sub != null) { TimePeriod duration = sub.getDuration(); result = new Long(duration.getEnd().getTime()); } } return result; }
@Override public JRPrintHyperlink getEntityHyperlink(ChartEntity entity) { JRPrintHyperlink printHyperlink = null; if (hasHyperlinks() && entity instanceof XYItemEntity) { XYItemEntity itemEntity = (XYItemEntity) entity; TimePeriodValuesCollection dataset = (TimePeriodValuesCollection) itemEntity.getDataset(); TimePeriodValues series = dataset.getSeries(itemEntity.getSeriesIndex()); Map<TimePeriod, JRPrintHyperlink> serieHyperlinks = itemHyperlinks.get(series.getKey()); if (serieHyperlinks != null) { TimePeriod timePeriod = series.getTimePeriod(itemEntity.getItem()); printHyperlink = serieHyperlinks.get(timePeriod); } } return printHyperlink; }
/** * Returns the start value for a task. * * @param rowKey the series. * @param columnKey the category. * * @return The start value. */ public Number getStartValue(Comparable rowKey, Comparable columnKey) { Number result = null; int row = getRowIndex(rowKey); TaskSeries series = (TaskSeries) this.data.get(row); Task task = series.get(columnKey.toString()); if (task != null) { TimePeriod duration = task.getDuration(); result = new Long(duration.getStart().getTime()); } return result; }
/** * Returns the end value for a task. * * @param rowKey the series. * @param columnKey the category. * * @return The end value. */ public Number getEndValue(Comparable rowKey, Comparable columnKey) { Number result = null; int row = getRowIndex(rowKey); TaskSeries series = (TaskSeries) this.data.get(row); Task task = series.get(columnKey.toString()); if (task != null) { TimePeriod duration = task.getDuration(); result = new Long(duration.getEnd().getTime()); } return result; }
/** * Creates a new task. * * @param description the task description (<code>null</code> not permitted). * @param duration the task duration (<code>null</code> permitted). */ public Task(String description, TimePeriod duration) { if (description == null) { throw new IllegalArgumentException("Null 'description' argument."); } this.description = description; this.duration = duration; this.percentComplete = null; this.subtasks = new java.util.ArrayList(); }