RegularTimePeriod p2 = this.labelInfo[band].createInstance( new Date(axisMax), this.timeZone, this.locale); String label1 = this.labelInfo[band].getDateFormat().format( new Date(p1.getMiddleMillisecond())); String label2 = this.labelInfo[band].getDateFormat().format( new Date(p2.getMiddleMillisecond())); Rectangle2D b1 = TextUtilities.getTextBounds(label1, g2, float x = (float) valueToJava2D(p.getMiddleMillisecond(), dataArea, edge); DateFormat df = this.labelInfo[band].getDateFormat(); String label = df.format(new Date(p.getMiddleMillisecond())); long first = p.getFirstMillisecond();
RegularTimePeriod p2 = this.labelInfo[band].createInstance( new Date(axisMax), this.timeZone, this.locale); DateFormat df = this.labelInfo[band].getDateFormat(); df.setTimeZone(this.timeZone); String label1 = df.format(new Date(p1.getMiddleMillisecond()));
/** * Applies the attributes for this theme to a {@link PeriodAxis}. * * @param axis the axis ({@code null} not permitted). */ protected void applyToPeriodAxis(PeriodAxis axis) { PeriodAxisLabelInfo[] info = axis.getLabelInfo(); for (int i = 0; i < info.length; i++) { PeriodAxisLabelInfo e = info[i]; PeriodAxisLabelInfo n = new PeriodAxisLabelInfo(e.getPeriodClass(), e.getDateFormat(), e.getPadding(), this.regularFont, this.tickLabelPaint, e.getDrawDividers(), e.getDividerStroke(), e.getDividerPaint()); info[i] = n; } axis.setLabelInfo(info); }
/** * Applies the attributes for this theme to a {@link PeriodAxis}. * * @param axis the axis (<code>null</code> not permitted). */ protected void applyToPeriodAxis(PeriodAxis axis) { PeriodAxisLabelInfo[] info = axis.getLabelInfo(); for (int i = 0; i < info.length; i++) { PeriodAxisLabelInfo e = info[i]; PeriodAxisLabelInfo n = new PeriodAxisLabelInfo(e.getPeriodClass(), e.getDateFormat(), e.getPadding(), this.regularFont, this.tickLabelPaint, e.getDrawDividers(), e.getDividerStroke(), e.getDividerPaint()); info[i] = n; } axis.setLabelInfo(info); }