private void setupColumn(Graphics2D g2D, Vector<BoxEquation> column, double width, double widest, boolean multiple) {
double sum = 0.0;
for (BoxEquation b : column) {
assert b!=null; // HACK
double step = b.getHeight();
Box box = b.getEquationBox();
Box labelBox = b.getLabel();
if (b.getEquation().isText() ) {
box.setProperties(Box.LEFT_ALIGN, Box.TOP_ALIGN, Box.TOP_ALIGN);
} else if (multiple) { // TODO: Indent rather than centre?
box.setProperties(Box.LEFT_ALIGN, Box.Y_CENTRE_ALIGN, Box.Y_CENTRE_ALIGN);
} else {
box.setProperties(Box.X_CENTRE_ALIGN, Box.Y_CENTRE_ALIGN, Box.Y_CENTRE_ALIGN);
}
labelBox.setProperties(Box.RIGHT_ALIGN, Box.SMALL_FONT, Box.BOLD_FONT);
Offset equationRectangle = new Offset(widest, step);
labelBox.setupOuterRectangle(equationRectangle);
Offset leftRectangle = new Offset(equationRectangle);
leftRectangle.width -= labelBox.getInnerRectangle().width;
box.setupOuterRectangle(leftRectangle);
double left = KetPanel.LEFT_BORDER_SIZE + width;
double top = KetPanel.TOP_BORDER_SIZE + sum;
Position topLeft = new Position(left, top);
b.setTopLeft(topLeft);