import jalview.datamodel.Sequence;
import jalview.datamodel.SequenceGroup;
import jalview.datamodel.SequenceI;
+import jalview.gui.ViewSelectionMenu.ViewSetProvider;
import jalview.io.AlignmentProperties;
import jalview.io.AnnotationFile;
import jalview.io.BioJsHTMLOutput;
import java.awt.dnd.DropTargetListener;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
+import java.awt.event.ItemEvent;
+import java.awt.event.ItemListener;
import java.awt.event.KeyAdapter;
import java.awt.event.KeyEvent;
import java.awt.event.MouseAdapter;
addKeyListener();
+ final List<AlignmentPanel> selviews = new ArrayList<AlignmentPanel>();
+ final List<AlignmentPanel> origview = new ArrayList<AlignmentPanel>();
+ ViewSelectionMenu vsel = new ViewSelectionMenu("Transfer colours from",
+ new ViewSetProvider()
+ {
+
+ @Override
+ public AlignmentPanel[] getAllAlignmentPanels()
+ {
+ origview.clear();
+ origview.add(alignPanel);
+ return Desktop.getAlignmentPanels(null);
+ }
+ }, selviews, new ItemListener()
+ {
+
+ @Override
+ public void itemStateChanged(ItemEvent e)
+ {
+ if (origview.size() > 0)
+ {
+ origview.get(0)
+ .getAlignViewport()
+ .setViewStyle(
+ selviews.get(0).getAlignViewport()
+ .getViewStyle());
+ origview.get(0).updateLayout();
+ origview.get(0).setSelected(true);
+ origview.get(0).alignFrame.setMenusForViewport();
+ }
+ }
+ });
+ formatMenu.add(vsel);
+
}
/**