Newer
Older
CactusServer / src / main / java / framework / RWT / RWTButton.java
y-ota on 10 May 2018 838 bytes 初うp
package framework.RWT;
import java.awt.Component;
import java.awt.Dimension;
import java.awt.Graphics;
import java.awt.Point;

/**
 * ボタンです。
 * @author Wataru
 * 
 */
public abstract class RWTButton extends RWTLabel implements RWTSelectableWidget {
	private float relativeX = 0.0f;
	private float relativeY = 0.0f;
	private float relativeWidth = 0.0f;
	private float relativeHeight = 0.0f;
	private int x = 0;
	private int y = 0;
	private int width = 0;
	private int height = 0;	

	@Override
	public void adjust(Component parent) {
		int sx = parent.getWidth();
		int sy = parent.getHeight();
		x = (int) (sx * relativeX);
		y = (int) (sy * relativeY);
		width = (int) (sx * relativeWidth);
		height = (int) (sy * relativeHeight);
	}

	@Override
	public void paint(Graphics g) {
		// 未実装
	}
}