| version 1.51 | version 1.52 |
|---|
| |
| // Copyright (c) 2001-2002 Board of Trustees of the University of Illinois | // Copyright (c) 2001-2002 Board of Trustees of the University of Illinois |
| // Theoretical Biophysics Group http://www.ks.uiuc.edu/ | // Theoretical Biophysics Group http://www.ks.uiuc.edu/ |
| // | // |
| // $Id: MainBean.java,v 1.51 2002/08/30 15:37:47 johns Exp $ | // $Id: MainBean.java,v 1.52 2002/10/18 16:03:10 mbach Exp $ |
| // | // |
| | |
| import java.io.*; | import java.io.*; |
| |
| try { | try { |
| String tmp = (String)evt.getNewValue(); | String tmp = (String)evt.getNewValue(); |
| | |
| if(tmp.endsWith(".wrl")) { | /*if(tmp.endsWith(".wrl")) { |
| m_Molecule = null; | m_Molecule = null; |
| m_mgMolecGraphics.loadVRMLFile(tmp); | m_mgMolecGraphics.loadVRMLFile(tmp); |
| m_iRep = MolecGraphics.VRML; | m_iRep = MolecGraphics.VRML; |
| |
| if(m_strFile.endsWith(".wrl") && !(tmp.endsWith(".wrl"))) { | if(m_strFile.endsWith(".wrl") && !(tmp.endsWith(".wrl"))) { |
| // change rep from VRML to default TUBE | // change rep from VRML to default TUBE |
| m_iRep = MolecGraphics.TUBE; | m_iRep = MolecGraphics.TUBE; |
| } | }*/ |
| | |
| if((tmp.startsWith("ftp")) || (tmp.startsWith("http"))) { | if((tmp.startsWith("ftp")) || (tmp.startsWith("http"))) { |
| URL u = new URL(tmp); | URL u = new URL(tmp); |
| |
| | |
| // new representation | // new representation |
| else if(evt.getPropertyName().equals("rep")) { | else if(evt.getPropertyName().equals("rep")) { |
| if(m_strFile.endsWith("wrl")) { | /*if(m_strFile.endsWith("wrl")) { |
| // this is a VRML file, so don't redraw rep | // this is a VRML file, so don't redraw rep |
| return; | return; |
| } | }*/ |
| int newRep = ((Integer)evt.getNewValue()).intValue(); | int newRep = ((Integer)evt.getNewValue()).intValue(); |
| if((m_iRep == MolecGraphics.MIX) && | if((m_iRep == MolecGraphics.MIX) && |
| (newRep != MolecGraphics.MIX)) { | (newRep != MolecGraphics.MIX)) { |
| |
| case(MolecGraphics.TUBE): | case(MolecGraphics.TUBE): |
| case(MolecGraphics.TRACE): | case(MolecGraphics.TRACE): |
| case(MolecGraphics.MIX): | case(MolecGraphics.MIX): |
| case(MolecGraphics.VRML): | //case(MolecGraphics.VRML): |
| return; // skip redraw if rep doesn't contain spheres. | return; // skip redraw if rep doesn't contain spheres. |
| | |
| } | } |