Newer
Older
SproutServerMicro / src / main / java / framework / RWT / RWTButton.java
s-bekki on 30 Nov 2017 728 bytes initial commit
package framework.RWT;

import java.awt.*;

/**
 * ボタンです。
 * @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) {
		// 未実装
	}
}