| .. | .. |
|---|
| 20 | 20 | |
|---|
| 21 | 21 | public void render(Graphics2D g, Collection<Mouseover> objectLocations) |
|---|
| 22 | 22 | { |
|---|
| 23 | | - TFModel model = visuals.getModel(); |
|---|
| 23 | + TimeflowModel model = visuals.getModel(); |
|---|
| 24 | 24 | g.setColor(model.getDisplay().getColor("chart.background")); |
|---|
| 25 | 25 | Rectangle bounds = visuals.getBounds(); |
|---|
| 26 | 26 | |
|---|
| .. | .. |
|---|
| 41 | 41 | |
|---|
| 42 | 42 | void render(AxisTicMarks t, Graphics2D g, int x, int y, int h, int top, boolean full, Collection<Mouseover> objectLocations) |
|---|
| 43 | 43 | { |
|---|
| 44 | | - TFModel model = visuals.getModel(); |
|---|
| 44 | + TimeflowModel model = visuals.getModel(); |
|---|
| 45 | 45 | |
|---|
| 46 | 46 | int n = t.tics.size(); |
|---|
| 47 | 47 | for (int i = 0; i < n - 1; i++) |
|---|
| 48 | 48 | { |
|---|
| 49 | | - |
|---|
| 50 | 49 | long start = t.tics.get(i); |
|---|
| 51 | 50 | long end = t.tics.get(i + 1); |
|---|
| 52 | 51 | |
|---|
| .. | .. |
|---|
| 58 | 57 | g.setColor(t.unit.isDayOrLess() && (dayOfWeek == 1 || dayOfWeek == 7) |
|---|
| 59 | 58 | ? new Color(245, 245, 245) : new Color(240, 240, 240)); |
|---|
| 60 | 59 | |
|---|
| 61 | | - g.fillRect(x0, y, x1 - x0 - 1, h); |
|---|
| 60 | + g.fillRect(x0, y, x1 - x0, h); |
|---|
| 62 | 61 | g.setColor(Color.white); |
|---|
| 63 | | - g.drawLine(x1 - 1, y, x1 - 1, y + h); |
|---|
| 62 | + g.drawLine(x1, y, x1, y + h); |
|---|
| 64 | 63 | g.drawLine(x0, y + h, x1, y + h); |
|---|
| 65 | | - objectLocations.add(new Mouseover(new Interval(start, end), x0, y, x1 - x0 - 1, h)); |
|---|
| 64 | + objectLocations.add(new Mouseover(new Interval(start, end), x0, y, x1 - x0, h)); |
|---|
| 66 | 65 | |
|---|
| 67 | 66 | g.setFont(model.getDisplay().timeLabel()); |
|---|
| 68 | 67 | String label = full ? t.unit.formatFull(start) : t.unit.format(new Date(start)); |
|---|
| 69 | | - int tx = x0 + 3; |
|---|
| 70 | | - int ty = y + h - 5; |
|---|
| 68 | + |
|---|
| 69 | + if (!full) |
|---|
| 70 | + full = false; |
|---|
| 71 | + |
|---|
| 72 | + int tx = x0; |
|---|
| 73 | + int ty = y + h; |
|---|
| 71 | 74 | g.setColor(full ? Color.darkGray : Color.gray); |
|---|
| 72 | 75 | int sw = model.getDisplay().timeLabelFontMetrics().stringWidth(label); |
|---|
| 73 | | - if (sw < x1 - tx - 3) |
|---|
| 76 | + if (true) // sw < x1 - tx) |
|---|
| 74 | 77 | { |
|---|
| 75 | 78 | g.drawString(label, tx, ty); |
|---|
| 76 | 79 | } else |
|---|
| .. | .. |
|---|
| 80 | 83 | { |
|---|
| 81 | 84 | label = label.substring(0, c); |
|---|
| 82 | 85 | sw = model.getDisplay().timeLabelFontMetrics().stringWidth(label); |
|---|
| 83 | | - if (sw < x1 - tx - 3) |
|---|
| 86 | + //if (sw < x1 - tx) |
|---|
| 84 | 87 | { |
|---|
| 85 | 88 | g.drawString(label, tx, ty); |
|---|
| 86 | 89 | } |
|---|