// Path: src/main/java/org/chesmapper/view/gui/swing/ComponentFactory.java
// public static class ClickableLabel extends JLabel
// {
// 	public ClickableLabel(String text, ImageIcon icon, int horizontalAlignment)
// 	{
// 		super(text, icon, horizontalAlignment);
// 	}
// 
// 	Boolean myEnabled = null;
// 
// 	public void setEnabled(boolean enabled)
// 	{
// 		myEnabled = enabled;
// 		updateUI();
// 	}
// 
// 	public void addActionListener(final ActionListener l)
// 	{
// 		addMouseListener(new MouseAdapter()
// 		{
// 			@Override
// 			public void mousePressed(MouseEvent e)
// 			{
// 				if (myEnabled == null || myEnabled)
// 					l.actionPerformed(new ActionEvent(ClickableLabel.this, 0, "button clicked"));
// 			}
// 		});
// 	}
// }


import java.awt.Component;
import java.awt.Container;
import java.awt.Frame;
import java.awt.Point;
import java.awt.Robot;
import java.awt.Window;
import java.awt.event.InputEvent;
import java.awt.event.KeyEvent;
import java.util.ArrayList;
import java.util.Collections;
import java.util.Comparator;
import java.util.List;
import javax.swing.AbstractButton;
import javax.swing.JButton;
import javax.swing.JCheckBox;
import javax.swing.JComboBox;
import javax.swing.JComponent;
import javax.swing.JDialog;
import javax.swing.JFileChooser;
import javax.swing.JFrame;
import javax.swing.JLabel;
import javax.swing.JList;
import javax.swing.JMenu;
import javax.swing.JMenuBar;
import javax.swing.JMenuItem;
import javax.swing.JPopupMenu;
import javax.swing.JRadioButton;
import javax.swing.JScrollPane;
import javax.swing.JSpinner;
import javax.swing.JTextField;
import javax.swing.SwingConstants;
import javax.swing.text.JTextComponent;
import org.chesmapper.view.gui.swing.ComponentFactory.ClickableLabel;
import org.junit.Assert;
import org.mg.javalib.gui.BlockableFrame;
import org.mg.javalib.gui.Selector;
import org.mg.javalib.util.ScreenUtil;
import org.mg.javalib.util.SwingUtil;
import org.mg.javalib.util.ThreadUtil;
	public static JPopupMenu getOnlyPopupMenu(Container owner)
	{
		return (JPopupMenu) getOnlyComponent(owner, JPopupMenu.class);
	}

	public static Selector<?, ?> getOnlySelector(Container owner)
	{
		return (Selector<?, ?>) getOnlyComponent(owner, Selector.class);
	}

	public static JSpinner getOnlySpinner(Container owner)
	{
		return (JSpinner) getOnlyComponent(owner, JSpinner.class);
	}

	public static JCheckBox getOnlyCheckBox(Container owner)
	{
		return (JCheckBox) getOnlyComponent(owner, JCheckBox.class);
	}

	public static JComboBox<?> getOnlyComboBox(Container owner)
	{
		return getOnlyComboBox(owner, false);
	}

	public static JComboBox<?> getOnlyComboBox(Container owner, boolean onlyVisible)
	{
		return (JComboBox<?>) getOnlyComponent(owner, JComboBox.class, onlyVisible);
	}

// Path: src/main/java/org/chesmapper/view/gui/swing/ComponentFactory.java
// public static class ClickableLabel extends JLabel
// {
// 	public ClickableLabel(String text, ImageIcon icon, int horizontalAlignment)
// 	{
// 		super(text, icon, horizontalAlignment);
// 	}
// 
// 	Boolean myEnabled = null;
// 
// 	public void setEnabled(boolean enabled)
// 	{
// 		myEnabled = enabled;
// 		updateUI();
// 	}
// 
// 	public void addActionListener(final ActionListener l)
// 	{
// 		addMouseListener(new MouseAdapter()
// 		{
// 			@Override
// 			public void mousePressed(MouseEvent e)
// 			{
// 				if (myEnabled == null || myEnabled)
// 					l.actionPerformed(new ActionEvent(ClickableLabel.this, 0, "button clicked"));
// 			}
// 		});
// 	}
// }


// Path: src/test/java/org/chesmapper/test/util/SwingTestUtil.java
import java.awt.Component;
import java.awt.Container;
import java.awt.Frame;
import java.awt.Point;
import java.awt.Robot;
import java.awt.Window;
import java.awt.event.InputEvent;
import java.awt.event.KeyEvent;
import java.util.ArrayList;
import java.util.Collections;
import java.util.Comparator;
import java.util.List;
import javax.swing.AbstractButton;
import javax.swing.JButton;
import javax.swing.JCheckBox;
import javax.swing.JComboBox;
import javax.swing.JComponent;
import javax.swing.JDialog;
import javax.swing.JFileChooser;
import javax.swing.JFrame;
import javax.swing.JLabel;
import javax.swing.JList;
import javax.swing.JMenu;
import javax.swing.JMenuBar;
import javax.swing.JMenuItem;
import javax.swing.JPopupMenu;
import javax.swing.JRadioButton;
import javax.swing.JScrollPane;
import javax.swing.JSpinner;
import javax.swing.JTextField;
import javax.swing.SwingConstants;
import javax.swing.text.JTextComponent;
import org.chesmapper.view.gui.swing.ComponentFactory.ClickableLabel;
import org.junit.Assert;
import org.mg.javalib.gui.BlockableFrame;
import org.mg.javalib.gui.Selector;
import org.mg.javalib.util.ScreenUtil;
import org.mg.javalib.util.SwingUtil;
import org.mg.javalib.util.ThreadUtil;

	public static JPopupMenu getOnlyPopupMenu(Container owner)
	{
		return (JPopupMenu) getOnlyComponent(owner, JPopupMenu.class);
	}

	public static Selector<?, ?> getOnlySelector(Container owner)
	{
		return (Selector<?, ?>) getOnlyComponent(owner, Selector.class);
	}

	public static JSpinner getOnlySpinner(Container owner)
	{
		return (JSpinner) getOnlyComponent(owner, JSpinner.class);
	}

	public static JCheckBox getOnlyCheckBox(Container owner)
	{
		return (JCheckBox) getOnlyComponent(owner, JCheckBox.class);
	}

	public static JComboBox<?> getOnlyComboBox(Container owner)
	{
		return getOnlyComboBox(owner, false);
	}

	public static JComboBox<?> getOnlyComboBox(Container owner, boolean onlyVisible)
	{
		return (JComboBox<?>) getOnlyComponent(owner, JComboBox.class, onlyVisible);
	}

	public static ClickableLabel getVisibleClickableLabel(Container owner, final int swingConstantOrientation)