/*
 * Created on 25.02.2005
 *
 * TODO To change the template for this generated file go to
 * Window - Preferences - Java - Code Style - Code Templates
 */
package de.farafin.snEADy.control.GaphixStuff;


import java.awt.Frame;
import java.awt.event.WindowAdapter;
import java.awt.event.WindowEvent;
import java.awt.image.BufferedImage;

/**
 * @author larsonmars
 *
 * TODO To change the template for this generated type comment go to
 * Window - Preferences - Java - Code Style - Code Templates
 */
public class GrDlgWindow extends GrWindow{
	
	private GrButton sbutt_quit,sbutt_min;

	
	public GrDlgWindow(String titleText,BufferedImage bg){
		super(titleText,bg);
        addWindowListener(new WindowAdapter(){
            public void windowClosing(WindowEvent e){
                sroot.setVisible(false);
            }
        });
        sbutt_quit=new GrButton(292,4,GrButton.NORMALBUTTON,S_BUTTQUIT,true){
        	public void stateChanged(int state){
        		if (state==GrButton.BUTTON_PRESSEDHOVERED)
        			sroot.setVisible(false);
        	}
        };
        sbutt_min=new GrButton(269,4,GrButton.NORMALBUTTON,S_BUTTMIN,true){
        	public void stateChanged(int state){
        		if (state==GrButton.BUTTON_PRESSEDHOVERED)
        			sroot.setState(Frame.ICONIFIED);
        	}
        };
        

        add(sbutt_quit);
        add(sbutt_min);
	}
}
