X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;f=src%2Fjalview%2Fgui%2FAnnotationColourChooser.java;h=477fd6a5db6d5b9f153a4966b91e657360b2b477;hb=d043ce47fc710d3eb2629ba926a8a7417bd67d8c;hp=4e9a26d4e2b35078b550f20443d71eae53a590c1;hpb=04c8f7bff663aa469127e9eed4164e02933782f1;p=jalview.git diff --git a/src/jalview/gui/AnnotationColourChooser.java b/src/jalview/gui/AnnotationColourChooser.java index 4e9a26d..477fd6a 100644 --- a/src/jalview/gui/AnnotationColourChooser.java +++ b/src/jalview/gui/AnnotationColourChooser.java @@ -66,6 +66,7 @@ public class AnnotationColourChooser extends AnnotationRowFilter JPanel maxColour = new JPanel(); private JCheckBox thresholdIsMin = new JCheckBox(); + private JCheckBox transparency = new JCheckBox(); protected static final int MIN_WIDTH = 500; @@ -245,6 +246,19 @@ public class AnnotationColourChooser extends AnnotationRowFilter } }); + transparency.setBackground(Color.white); + transparency.setFont(JvSwingUtils.getLabelFont()); + transparency + .setText(MessageManager.getString("Use Transparency")); + transparency.addActionListener(new ActionListener() + { + + @Override + public void actionPerformed(ActionEvent arg0) + { + transparency_actionPerformed(); + } + }); this.setLayout(new BorderLayout()); JPanel jPanel1 = new JPanel(); JPanel jPanel2 = new JPanel(); @@ -257,6 +271,7 @@ public class AnnotationColourChooser extends AnnotationRowFilter jPanel2.add(annotations, "grow, wrap"); jPanel2.add(seqAssociated); jPanel2.add(useOriginalColours); + jPanel2.add(transparency); JPanel colpanel = new JPanel(new FlowLayout()); colpanel.setBackground(Color.white); colpanel.add(minColour); @@ -272,6 +287,10 @@ public class AnnotationColourChooser extends AnnotationRowFilter this.validate(); } + protected void transparency_actionPerformed() + { + updateView(); + } protected void resetColours_actionPerformed() { setDefaultMinMax(); @@ -299,7 +318,7 @@ public class AnnotationColourChooser extends AnnotationRowFilter updateView(); } }; - JalviewColourChooser.showColourChooser(Desktop.getDesktop(), ttl, + JalviewColourChooser.showColourChooser(Desktop.getDesktopPane(), ttl, colourPanel.getBackground(), listener); } @@ -425,6 +444,8 @@ public class AnnotationColourChooser extends AnnotationRowFilter acg.setThresholdIsMinMax(thresholdIsMin.isSelected()); + acg.setPositionToTransparency(transparency.isSelected()); + this.ap.alignFrame.changeColour(acg); if (av.getAlignment().getGroups() != null)