package ckelling.baukasten;

import java.awt.*;

// Versionsgeschichte
// 0.1.0, 28.11.96
// 1.0.0, 03.07.97 Mit Komponenten von VCafe und GridBagLayout aufgebaut

/**
 *	ColorControl.java
 *
 *	Stellt das Bild "Legende_Farben" dar.
 *	Spaeter einmal Einstellen der Farben moeglich?
 *
 *	@author		Carsten Kelling
 *	@version	1.0.0, 03.07.97
 */
public class ColorControl extends Frame {

	private Rechner	parent;

	public ColorControl(Rechner parent) {

		this.parent = parent;

		//{{INIT_CONTROLS
		GridBagLayout gridBagLayout;
		gridBagLayout = new GridBagLayout();
		setLayout(gridBagLayout);
		addNotify();
		resize(insets().left + insets().right + 357,insets().top + insets().bottom + 346);
		setBackground(new Color(12632256));
		imageViewer1 = new symantec.itools.multimedia.ImageViewer();
		imageViewer1.reshape(insets().left + 10,insets().top + 10,10,10);
		GridBagConstraints gbc;
		gbc = new GridBagConstraints();
		gbc.gridx = 0;
		gbc.gridy = 0;
		gbc.weightx = 1.0;
		gbc.weighty = 1.0;
		gbc.fill = GridBagConstraints.NONE;
		gbc.insets = new Insets(0,0,0,0);
		gridBagLayout.setConstraints(imageViewer1, gbc);
		add(imageViewer1);
		setTitle("Farblegende");
		//}}

		try {
			imageViewer1.setURL(new java.net.URL(parent.getDocumentBase(), "Bilder/Legende_Farben.gif"));
		} catch (java.net.MalformedURLException error) {
		}

		move(50, 50);

		//{{INIT_MENUS
		//}}
	}

	public ColorControl(String title, Rechner parent) {
	    this(parent);
	    setTitle(title);
	}

	public boolean handleEvent(Event event) {
    	if (event.id == Event.WINDOW_DESTROY) {
            return true;
    	}
		return super.handleEvent(event);
	}

	//{{DECLARE_CONTROLS
	symantec.itools.multimedia.ImageViewer imageViewer1;
	//}}

	//{{DECLARE_MENUS
	//}}
}
