oldLabels.remove(oldLabel);
return oldLabel;
}
}
AxisLabel label = new AxisLabel(value, format.format(value));
if (format.getClass().equals(DateNumberFormat.class)) {
GregorianCalendar gc = new GregorianCalendar();
gc.setTimeInMillis((long) value);
label.setToolTipText(format.format(value) +" " + gc.get(Calendar.YEAR) );
}
Rotation labelRotation = getLabelRotation();
if(labelRotation != null) {
label.putClientProperty(Rotation.class.getName(), labelRotation);
}
label.setUI(MultiLineLabelUI.labelUI);
label.setForeground(getForeground());
label.setFont(getFont());
add(label);
label.setSize(label.getPreferredSize());
return label;
}