1 package de.lathanda.eos.gui.objectchart;
3 import de.lathanda.eos.gui.diagram.Unit;
4 import de.lathanda.eos.gui.diagram.Drawing;
14 private float xEquals;
44 public static float align(
Drawing d, Iterable<Property> properties) {
45 float alignedValueWidth = 0;
46 float alignedXEquals = 0;
47 for (
Property property : properties) {
48 if (alignedValueWidth < property.value.getWidth()) {
49 alignedValueWidth =
property.value.getWidth();
51 if (alignedXEquals < property.xEquals) {
52 alignedXEquals =
property.xEquals;
56 float alignedWidth = alignedXValues + alignedValueWidth;
57 for (
Property property : properties) {
58 property.xEquals = alignedXEquals;
59 property.value.setOffsetX(alignedXValues);
60 property.width = alignedWidth;
float stringWidth(String text)
void drawString(String text, float x, float y)
static Font STANDARD_FONT
static final float INDENT
Property(String name, Object data)
static float align(Drawing d, Iterable< Property > properties)
void layoutUnit(Drawing d)