Ignore:
Timestamp:
04/12/07 14:33:15 (13 years ago)
Author:
curtis
Message:

Avoid exception when setting transparency type for Java2D displays.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/loci/visbio/view/DisplayWindow.java

    r2097 r2614  
    210210      int nicest = ((Integer) r.getVar("DisplayImplJ3D.NICEST")).intValue(); 
    211211      int fastest = ((Integer) r.getVar("DisplayImplJ3D.FASTEST")).intValue(); 
    212       display.getGraphicsModeControl().setTransparencyMode( 
    213         nice ? nicest : fastest); 
     212      GraphicsModeControl gmc = display.getGraphicsModeControl(); 
     213      if (gmc.getClass().getName().equals( 
     214        "visad.java3d.GraphicsModeControlJ3D")) 
     215      { 
     216        gmc.setTransparencyMode(nice ? nicest : fastest); 
     217      } 
    214218    } 
    215219    catch (ReflectException exc) { 
Note: See TracChangeset for help on using the changeset viewer.