From: gmungoc Date: Wed, 4 May 2016 08:11:13 +0000 (+0100) Subject: JAL-2090 removed test for Java > 1.1 to enable transparency X-Git-Tag: Release_2_10_0~230^2 X-Git-Url: http://source.jalview.org/gitweb/?a=commitdiff_plain;h=303e2fff7dd24d9e17a603512702a087a9cc3337;p=jalview.git JAL-2090 removed test for Java > 1.1 to enable transparency --- diff --git a/src/jalview/api/FeatureRenderer.java b/src/jalview/api/FeatureRenderer.java index 5b15cad..d9795a6 100644 --- a/src/jalview/api/FeatureRenderer.java +++ b/src/jalview/api/FeatureRenderer.java @@ -143,12 +143,6 @@ public interface FeatureRenderer List findFeaturesAtRes(SequenceI sequence, int res); /** - * - * @return true if the rendering platform supports transparency - */ - boolean isTransparencyAvailable(); - - /** * get current displayed types, in ordering of rendering (on top last) * * @return a (possibly empty) list of feature types diff --git a/src/jalview/appletgui/FeatureRenderer.java b/src/jalview/appletgui/FeatureRenderer.java index 4391fa2..03d4ce6 100644 --- a/src/jalview/appletgui/FeatureRenderer.java +++ b/src/jalview/appletgui/FeatureRenderer.java @@ -63,9 +63,6 @@ public class FeatureRenderer extends { super(); this.av = av; - - setTransparencyAvailable(!System.getProperty("java.version") - .startsWith("1.1")); } static String lastFeatureAdded; diff --git a/src/jalview/appletgui/FeatureSettings.java b/src/jalview/appletgui/FeatureSettings.java index 40a2ce5..bef6437 100755 --- a/src/jalview/appletgui/FeatureSettings.java +++ b/src/jalview/appletgui/FeatureSettings.java @@ -95,14 +95,7 @@ public class FeatureSettings extends Panel implements ItemListener, transparency = new Scrollbar(Scrollbar.HORIZONTAL, 100 - (int) (fr.getTransparency() * 100), 1, 1, 100); - if (fr.isTransparencyAvailable()) - { - transparency.addAdjustmentListener(this); - } - else - { - transparency.setEnabled(false); - } + transparency.addAdjustmentListener(this); java.net.URL url = getClass().getResource("/images/link.gif"); if (url != null) @@ -134,17 +127,8 @@ public class FeatureSettings extends Panel implements ItemListener, Panel tPanel = new Panel(new BorderLayout()); - if (fr.isTransparencyAvailable()) - { - tPanel.add(transparency, BorderLayout.CENTER); - tPanel.add(new Label("Transparency"), BorderLayout.EAST); - } - else - { - tPanel.add( - new Label("Transparency not available in this web browser"), - BorderLayout.CENTER); - } + tPanel.add(transparency, BorderLayout.CENTER); + tPanel.add(new Label("Transparency"), BorderLayout.EAST); lowerPanel.add(tPanel, BorderLayout.SOUTH); diff --git a/src/jalview/renderer/seqfeatures/FeatureRenderer.java b/src/jalview/renderer/seqfeatures/FeatureRenderer.java index 2276913..0d14cd9 100644 --- a/src/jalview/renderer/seqfeatures/FeatureRenderer.java +++ b/src/jalview/renderer/seqfeatures/FeatureRenderer.java @@ -390,7 +390,7 @@ public class FeatureRenderer extends FeatureRendererModel } - if (transparency != 1.0f && g != null && transparencyAvailable) + if (transparency != 1.0f && g != null) { Graphics2D g2 = (Graphics2D) g; g2.setComposite(AlphaComposite.getInstance(AlphaComposite.SRC_OVER, @@ -398,19 +398,6 @@ public class FeatureRenderer extends FeatureRendererModel } } - boolean transparencyAvailable = true; - - protected void setTransparencyAvailable(boolean isTransparencyAvailable) - { - transparencyAvailable = isTransparencyAvailable; - } - - @Override - public boolean isTransparencyAvailable() - { - return transparencyAvailable; - } - /** * Called when alignment in associated view has new/modified features to * discover and display.