mirror of
https://github.com/bancika/diy-layout-creator
synced 2026-11-10 17:22:09 +10:00
better board coordinate placement
This commit is contained in:
Binary file not shown.
@@ -93,17 +93,19 @@ public abstract class AbstractBoard extends AbstractTransparentComponent<String>
|
|||||||
|
|
||||||
int t = 1;
|
int t = 1;
|
||||||
while (p.y < secondPoint.y - spacing) {
|
while (p.y < secondPoint.y - spacing) {
|
||||||
p.y += spacing;
|
p.y += spacing;
|
||||||
super.drawCenteredText(g2d, ct == CoordinateType.XY ? getCoordinateLabel(t++) : Integer.toString(t++), p.x + 2, p.y, HorizontalAlignment.LEFT,
|
super.drawCenteredText(g2d, ct == CoordinateType.XY ? getCoordinateLabel(t) : Integer.toString(t), p.x + (ct == CoordinateType.YX && t >= 10 ? 0 : 2), p.y, HorizontalAlignment.LEFT,
|
||||||
VerticalAlignment.CENTER);
|
VerticalAlignment.CENTER);
|
||||||
|
t++;
|
||||||
}
|
}
|
||||||
|
|
||||||
p = new Point(firstPoint);
|
p = new Point(firstPoint);
|
||||||
t = 1;
|
t = 1;
|
||||||
while (p.x < secondPoint.x - spacing) {
|
while (p.x < secondPoint.x - spacing) {
|
||||||
p.x += spacing;
|
p.x += spacing;
|
||||||
super.drawCenteredText(g2d, ct == CoordinateType.XY ? Integer.toString(t++) : getCoordinateLabel(t++), p.x, p.y - 2, HorizontalAlignment.CENTER,
|
super.drawCenteredText(g2d, ct == CoordinateType.XY ? Integer.toString(t) : getCoordinateLabel(t), p.x, p.y - 2, HorizontalAlignment.CENTER,
|
||||||
VerticalAlignment.TOP);
|
VerticalAlignment.TOP);
|
||||||
|
t++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Binary file not shown.
Binary file not shown.
Reference in New Issue
Block a user