package plots;

import java.awt.*;

public class RadioButton extends StickyButton {
	RadioButtonGroup rbg = null;

	public RadioButton(String text, int w, int h) {
		super(text, w, h);
	}
	
	public RadioButton(String text, int w, int h, Color p, Color up) {
		super(text, w, h, p, up);
	}
	
	public RadioButton(int w, int h, Image img0, Image img1) {
		super(w, h, img0, img1);
	}

	public void setGroup(RadioButtonGroup rbg) {
		this.rbg = rbg;
	}

	public void set(int p) {
		cbg = p;
	}
	
	public void press() {
		super.press();
		if (rbg != null) rbg.update(this);
	}

	public boolean mouseUp(Event e, int x, int y) {
		return(true);
	}
}
