⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 centeredlabellayout.java

📁 这是个国外JAVA爱好者写的条形码生成器
💻 JAVA
字号:
package net.sourceforge.barbecue.output;

public class CenteredLabelLayout extends LabelLayout {
	/** Pixel gap between the barcode bars and the top of the data text underneath */
    public static final int BARS_TEXT_VGAP = 5;

	public CenteredLabelLayout(int x, int y, int width) {
		super(x, y, width, BARS_TEXT_VGAP);
	}

	protected void calculate() {
		textX = (float) ((((width - x) - textLayout.getBounds().getWidth()) / 2) + x);
		textY = (float) (y + textLayout.getBounds().getHeight() + BARS_TEXT_VGAP);
		int height = (int) (textLayout.getBounds().getHeight() + BARS_TEXT_VGAP + 1);
		bgX = x;
		bgY = y;
		bgWidth = width - x;
		bgHeight = height;
	}
}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -