package tainavi;

import javax.swing.JLabel;

public class JRTLabel extends JLabel {

	private static final long serialVersionUID = 1L;

	// 予約枠の仮想座標
	private int vrow;
	private int vheight;

	private int vcol;
	private int vwidth;

	private static float heightMultiplier = 0;

	// データ操作メソッド
	public int getVRow() { return vrow; }
	public int getVHeight() { return vheight; }

	public static void setHeightMultiplier(float f) { heightMultiplier = f; }

	public void setVBounds(int x, int y, int width, int height) {
		vcol = x;
		vrow = y;
		vwidth = width;
		vheight = height;
		super.setBounds(
				vcol,
				(int) Math.ceil(((float)vrow)*heightMultiplier),
				vwidth,
				(int) Math.ceil(((float)vheight)*heightMultiplier));
	}

	public void reVBounds() {
		super.setBounds(
				vcol,
				(int) Math.ceil(((float)vrow)*heightMultiplier),
				vwidth,
				(int) Math.ceil(((float)vheight)*heightMultiplier));
	}
}
