/** 
 * This script is being run when a skin is selected
 * The script produces a simple custom user interface.
 */
 
import se.datadosen.component.*;
import se.datadosen.util.*;

// Controls that are to be imported into JAlbum as variables
ControlPanel ui = new ControlPanel() {

	JCheckBox closeupFrames = new JCheckBox("Frames");
	JCheckBox closeupShadows = new JCheckBox("Shadows");

	JCheckBox thumbnailFrames = new JCheckBox("Frames");
	JCheckBox thumbnailShadows = new JCheckBox("Shadows");

	// Ornament
	JCheckBox flowerOrnament = new JCheckBox("Flower ornament");

	JColorSelector frameColor = new JColorSelector("Frame color");
};

ui.frameColor.setColor("white");

// Layout controls easily similar to how text is added in a word processor
ui.flowerOrnament.setSelected(true);
ui.thumbnailFrames.setSelected(true);
ui.thumbnailShadows.setSelected(true);
ui.closeupFrames.setSelected(true);
ui.closeupShadows.setSelected(true);

ui.add("p", new JLabel("Note: Album must be rebuilt for changes to take effect"));

ControlPanel thumbnails = new ControlPanel("Thumbnails");
thumbnails.add(ui.thumbnailFrames);
thumbnails.add(ui.thumbnailShadows);
thumbnails.add(ui.flowerOrnament);
ui.add("br hfill", thumbnails);

ControlPanel closeups = new ControlPanel("Closeups");
closeups.add(ui.closeupFrames);
closeups.add(ui.closeupShadows);

ui.add("br hfill", closeups);

ui.add("br", new JLabel("Frame color"));
ui.add(ui.frameColor);

// Finally install components into JAlbum
window.setSkinUI(ui);
