From 303e2fff7dd24d9e17a603512702a087a9cc3337 Mon Sep 17 00:00:00 2001 From: gmungoc Date: Wed, 4 May 2016 09:11:13 +0100 Subject: [PATCH] JAL-2090 removed test for Java > 1.1 to enable transparency --- src/jalview/api/FeatureRenderer.java | 6 ------ src/jalview/appletgui/FeatureRenderer.java | 3 --- src/jalview/appletgui/FeatureSettings.java | 22 +++----------------- .../renderer/seqfeatures/FeatureRenderer.java | 15 +------------ 4 files changed, 4 insertions(+), 42 deletions(-) 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. -- 1.7.10.2