/** 
 * This script is being run when a skin is selected
 * Author David Ekholm
 */
 
import se.datadosen.component.*;
engine.processBeanShellFile(new File(programDirectory, "includes/printing.bsh"));

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

	JTextArea info = new JTextArea(3,60);
	
	JTextField menu1 = new JTextField("JAlbum forum");
	JTextField menu2 = new JTextField("JAlbum home");
	JTextField menu3 = new JTextField("Exhibit Engine");

	JTextField link1 = new JTextField("http://jalbum.net/forum");
	JTextField link2 = new JTextField("http://jalbum.net");
	JTextField link3 = new JTextField("http://photography-on-the.net");
	JTextField nThumbs = new JTextField(3);
	JCheckBox thumbsAbove = new JCheckBox("Thumbnails above slide", true);
	JCheckBox thumbsBelow = new JCheckBox("Thumbnails below slide", true);

	JComboBox printing = getPrintingComboBox();
};

JScrollPane sp = new JScrollPane();
sp.getViewport().add(ui.info, null);

// Layout controls easily similar to how text is added in a word processor

ui.add("br", new JLabel("Info"));
ui.add("tab hfill", sp);

ui.add("p", new JLabel("Menu 1"));
ui.add("tab hfill", ui.menu1);
ui.add("br", new JLabel("Link 1"));
ui.add("tab hfill", ui.link1);

ui.add("p", new JLabel("Menu 2"));
ui.add("tab hfill", ui.menu2);
ui.add("br", new JLabel("Link 2"));
ui.add("tab hfill", ui.link2);

ui.add("p", new JLabel("Menu 3"));
ui.add("tab hfill", ui.menu3);
ui.add("br", new JLabel("Link 3"));
ui.add("tab hfill", ui.link3);

ControlPanel slides = new ControlPanel("Slide pages");
slides.add(new JLabel("Thumbnails to show"));
slides.add(ui.nThumbs);
slides.add(ui.thumbsAbove);
slides.add(ui.thumbsBelow);
ui.add("p hfill", slides);

ui.nThumbs.setText("5");
ControlPanel orderPrints = new ControlPanel("On-line print ordering");
orderPrints.add(new JLabel("Printing service linking"));
orderPrints.add(ui.printing);
ui.add("p hfill", orderPrints);

String text = "Each slide may contain a link that puts that image into a shopping cart for printing and delivery";
orderPrints.setToolTipText(text);
ui.printing.setToolTipText(text);

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