JAL-2090 removed test for Java > 1.1 to enable transparency
authorgmungoc <g.m.carstairs@dundee.ac.uk>
Wed, 4 May 2016 08:11:13 +0000 (09:11 +0100)
committergmungoc <g.m.carstairs@dundee.ac.uk>
Wed, 4 May 2016 08:11:13 +0000 (09:11 +0100)
src/jalview/api/FeatureRenderer.java
src/jalview/appletgui/FeatureRenderer.java
src/jalview/appletgui/FeatureSettings.java
src/jalview/renderer/seqfeatures/FeatureRenderer.java

index 5b15cad..d9795a6 100644 (file)
@@ -143,12 +143,6 @@ public interface FeatureRenderer
   List<SequenceFeature> 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
index 4391fa2..03d4ce6 100644 (file)
@@ -63,9 +63,6 @@ public class FeatureRenderer extends
   {
     super();
     this.av = av;
-
-    setTransparencyAvailable(!System.getProperty("java.version")
-            .startsWith("1.1"));
   }
 
   static String lastFeatureAdded;
index 40a2ce5..bef6437 100755 (executable)
@@ -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);
 
index 2276913..0d14cd9 100644 (file)
@@ -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.