1 package net.sourceforge.barbecue.output; 2 3 public class MarginLabelLayout extends LabelLayout { 4 public MarginLabelLayout(int x, int y, int width, int height) { 5 super(x, y, width, height); 6 } 7 8 protected void calculate() { 9 textX = x + (width / 2) - ((int)textLayout.getBounds().getWidth() / 2); 10 textY = y + (height / 2) + ((int)textLayout.getBounds().getHeight() / 2); 11 bgX = x; 12 bgY = y; 13 bgHeight = height; 14 bgWidth = width; 15 } 16 }