//DateTime dtFrom = new DateTime(1455, 1, 1, 1, 1, 1, 1);
//DateTime dtTo = new DateTime(1960, 2, 10, 1, 1, 1, 1);
if (model.getUnit() == DateTime.class) {
paintUpperRulerForInterval(g2d,
new DateTime(new Date(min)),
new DateTime(new Date(max)));
}
g2d.setColor(settings.defaultStrokeColor);
g2d.drawRect((int) sf, settings.tmMarginTop, sw, height - settings.tmMarginBottom - 1);
double v = model.getValueFromFloat(currentMousePositionX * (1.0 / width));
v += model.getMinValue();
if (v != Double.NEGATIVE_INFINITY && v != Double.POSITIVE_INFINITY) {
String str = "";
int strw = 0;
if (model.getUnit() == DateTime.class) {
DateTime d = new DateTime(new Date((long) v));
if (d != null) {
DateTimeFormatter fmt = DateTimeFormat.forPattern("dd/MM/yyyy HH:mm:ss");
str = fmt.withLocale(LOCALE).print(d);
strw = (int) (settings.tip.fontMetrics.getStringBounds(str, null)).getWidth() + 4;