// Path: src/main/java/edu/utah/ece/async/sboldesigner/sbol/editor/dialog/MessageDialog.java
// public class MessageDialog {
// 
// 	public static void showMessage(Component parentComponent, String title, List<String> messages) {
// 		StringBuilder sb = new StringBuilder();
// 		for (String message : messages) {
// 			sb.append(message);
// 			sb.append("\n");
// 		}
// 		showMessage(parentComponent, title, sb.toString());
// 	}
// 
// 	public static void showMessage(Component parentComponent, String title, String message) {
// 		JTextArea jta = new JTextArea(message);
// 		jta.setLineWrap(true);
// 		jta.setWrapStyleWord(true);
// 		jta.setEditable(false);
// 		JScrollPane jsp = new JScrollPane(jta) {
// 			@Override
// 			public Dimension getPreferredSize() {
// 				return new Dimension(580, 320);
// 			}
// 		};
// 		JOptionPane.showMessageDialog(parentComponent, jsp, title, JOptionPane.ERROR_MESSAGE);
// 	}
// }
// 
// Path: src/main/java/edu/utah/ece/async/sboldesigner/sbol/editor/event/DesignLoadedEvent.java
// public class DesignLoadedEvent {
// 	private final SBOLDesign design;
// 
// 	public DesignLoadedEvent(SBOLDesign design) {
// 		this.design = design;
// 	}
// 
// 	public SBOLDesign getDesign() {
// 		return design;
// 	}
// }
// 
// Path: src/main/java/edu/utah/ece/async/sboldesigner/sbol/editor/event/FocusInEvent.java
// public class FocusInEvent {
// 	private final SBOLDesign design;
// 	private final ComponentDefinition component;
// 	private final BufferedImage snapshot;
// 
// 	public FocusInEvent(SBOLDesign design, ComponentDefinition component, BufferedImage snapshot) {
// 		this.design = design;
// 		this.component = component;
// 		this.snapshot = snapshot;
// 	}
// 
// 	public SBOLDesign getDesign() {
// 		return design;
// 	}
// 	
// 	public ComponentDefinition getComponent() {
// 		return component;
// 	}
// 
// 	public BufferedImage getSnapshot() {
// 		return snapshot;
// 	}
// }
// 
// Path: src/main/java/edu/utah/ece/async/sboldesigner/sbol/editor/event/FocusOutEvent.java
// public class FocusOutEvent {
// 	private final SBOLDesign design;
// 	private final ComponentDefinition component;
// 
// 	public FocusOutEvent(SBOLDesign design, ComponentDefinition component) {
// 		this.design = design;
// 		this.component = component;
// 	}
// 
// 	public SBOLDesign getDesign() {
// 		return design;
// 	}
// 	
// 	public ComponentDefinition getComponent() {
// 		return component;
// 	}
// }


import edu.utah.ece.async.sboldesigner.sbol.editor.dialog.MessageDialog;
import edu.utah.ece.async.sboldesigner.sbol.editor.event.DesignLoadedEvent;
import edu.utah.ece.async.sboldesigner.sbol.editor.event.FocusInEvent;
import edu.utah.ece.async.sboldesigner.sbol.editor.event.FocusOutEvent;
import java.awt.Dimension;
import java.awt.Graphics;
import java.awt.Image;
import java.awt.event.MouseAdapter;
import java.awt.event.MouseEvent;
import javax.swing.Box;
import javax.swing.BoxLayout;
import javax.swing.JComponent;
import javax.swing.JPanel;
import org.sbolstandard.core2.ComponentDefinition;
import org.sbolstandard.core2.SBOLValidationException;
import com.google.common.eventbus.Subscribe;


		final ComponentDefinition parentComponent = editor.getDesign().getParentCD();
		button.addMouseListener(new MouseAdapter() {
			@Override
			public void mouseClicked(MouseEvent e) {
				try {
					editor.getDesign().focusOut(parentComponent);
				} catch (SBOLValidationException e1) {
					MessageDialog.showMessage(null, "There was an error: ", e1.getMessage());
					e1.printStackTrace();
				}
			}
		});

		return button;
	}

	private void addButton(final ComponentDefinition comp, final Image image) {
		add(createButton(comp, image), count++);
	}

	@Subscribe
	public void designLoaded(DesignLoadedEvent event) {
		while (count > 0) {
			remove(--count);
		}
		repaint();
	}

	@Subscribe

// Path: src/main/java/edu/utah/ece/async/sboldesigner/sbol/editor/dialog/MessageDialog.java
// public class MessageDialog {
// 
// 	public static void showMessage(Component parentComponent, String title, List<String> messages) {
// 		StringBuilder sb = new StringBuilder();
// 		for (String message : messages) {
// 			sb.append(message);
// 			sb.append("\n");
// 		}
// 		showMessage(parentComponent, title, sb.toString());
// 	}
// 
// 	public static void showMessage(Component parentComponent, String title, String message) {
// 		JTextArea jta = new JTextArea(message);
// 		jta.setLineWrap(true);
// 		jta.setWrapStyleWord(true);
// 		jta.setEditable(false);
// 		JScrollPane jsp = new JScrollPane(jta) {
// 			@Override
// 			public Dimension getPreferredSize() {
// 				return new Dimension(580, 320);
// 			}
// 		};
// 		JOptionPane.showMessageDialog(parentComponent, jsp, title, JOptionPane.ERROR_MESSAGE);
// 	}
// }
// 
// Path: src/main/java/edu/utah/ece/async/sboldesigner/sbol/editor/event/DesignLoadedEvent.java
// public class DesignLoadedEvent {
// 	private final SBOLDesign design;
// 
// 	public DesignLoadedEvent(SBOLDesign design) {
// 		this.design = design;
// 	}
// 
// 	public SBOLDesign getDesign() {
// 		return design;
// 	}
// }
// 
// Path: src/main/java/edu/utah/ece/async/sboldesigner/sbol/editor/event/FocusInEvent.java
// public class FocusInEvent {
// 	private final SBOLDesign design;
// 	private final ComponentDefinition component;
// 	private final BufferedImage snapshot;
// 
// 	public FocusInEvent(SBOLDesign design, ComponentDefinition component, BufferedImage snapshot) {
// 		this.design = design;
// 		this.component = component;
// 		this.snapshot = snapshot;
// 	}
// 
// 	public SBOLDesign getDesign() {
// 		return design;
// 	}
// 	
// 	public ComponentDefinition getComponent() {
// 		return component;
// 	}
// 
// 	public BufferedImage getSnapshot() {
// 		return snapshot;
// 	}
// }
// 
// Path: src/main/java/edu/utah/ece/async/sboldesigner/sbol/editor/event/FocusOutEvent.java
// public class FocusOutEvent {
// 	private final SBOLDesign design;
// 	private final ComponentDefinition component;
// 
// 	public FocusOutEvent(SBOLDesign design, ComponentDefinition component) {
// 		this.design = design;
// 		this.component = component;
// 	}
// 
// 	public SBOLDesign getDesign() {
// 		return design;
// 	}
// 	
// 	public ComponentDefinition getComponent() {
// 		return component;
// 	}
// }


// Path: src/main/java/edu/utah/ece/async/sboldesigner/sbol/editor/OverviewPanel.java
import edu.utah.ece.async.sboldesigner.sbol.editor.dialog.MessageDialog;
import edu.utah.ece.async.sboldesigner.sbol.editor.event.DesignLoadedEvent;
import edu.utah.ece.async.sboldesigner.sbol.editor.event.FocusInEvent;
import edu.utah.ece.async.sboldesigner.sbol.editor.event.FocusOutEvent;
import java.awt.Dimension;
import java.awt.Graphics;
import java.awt.Image;
import java.awt.event.MouseAdapter;
import java.awt.event.MouseEvent;
import javax.swing.Box;
import javax.swing.BoxLayout;
import javax.swing.JComponent;
import javax.swing.JPanel;
import org.sbolstandard.core2.ComponentDefinition;
import org.sbolstandard.core2.SBOLValidationException;
import com.google.common.eventbus.Subscribe;


		final ComponentDefinition parentComponent = editor.getDesign().getParentCD();
		button.addMouseListener(new MouseAdapter() {
			@Override
			public void mouseClicked(MouseEvent e) {
				try {
					editor.getDesign().focusOut(parentComponent);
				} catch (SBOLValidationException e1) {
					MessageDialog.showMessage(null, "There was an error: ", e1.getMessage());
					e1.printStackTrace();
				}
			}
		});

		return button;
	}

	private void addButton(final ComponentDefinition comp, final Image image) {
		add(createButton(comp, image), count++);
	}

	@Subscribe
	public void designLoaded(DesignLoadedEvent event) {
		while (count > 0) {
			remove(--count);
		}
		repaint();
	}

	@Subscribe

	public void focusedIn(FocusInEvent event) {
