MarginLabelLayout.java :  » Development » Barbecue-1.5 » net » sourceforge » barbecue » output » Java Open Source

Java Open Source » Development » Barbecue 1.5 
Barbecue 1.5 » net » sourceforge » barbecue » output » MarginLabelLayout.java
package net.sourceforge.barbecue.output;

public class MarginLabelLayout extends LabelLayout {
  public MarginLabelLayout(int x, int y, int width, int height) {
    super(x, y, width, height);
  }

  protected void calculate() {
    textX = x + (width / 2) - ((int)textLayout.getBounds().getWidth() / 2);
    textY = y + (height / 2) + ((int)textLayout.getBounds().getHeight() / 2);
    bgX = x;
    bgY = y;
    bgHeight = height;
    bgWidth = width;
  }
}
java2s.com  | Contact Us | Privacy Policy
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.