private String getAdjustInfoSelectionString(String key, AdjustSelectionInfo asi) throws StarBiochemException { String aisStr = ""; // $NON-NLS-1$ if ((null != key) && (null != asi) && (null != asi.getSelections())) { if (key.equals(CenterHeteroSelectionRaiser.class.getName())) { aisStr = ViewerRenderHetero.getAdjustHeteroFilteredSelectionScript(asi, viewer); } else if (key.equals(CenterNucleicRaiser.class.getName())) { aisStr = ViewerRenderNucleic.getAdjustNucleicFilteredSelectionsScript(asi, viewer); } else if (key.equals(CenterProteinPrimaryRaiser.class.getName())) { aisStr = ViewerRenderProteinPrimaryStructure.getAdjustProteinPrimaryFilteredSelectionScript( asi, viewer); } else if (key.equals(CenterProteinSecondaryRaiser.class.getName())) { aisStr = ViewerRenderProteinSecondaryStructure.getAdjustProteinSecondaryFilteredSelectionScript( asi); } else if (key.equals(CenterProteinTertiaryRaiser.class.getName())) { aisStr = ViewerRenderProteinTertiaryStructure.getAdjustProteinTertiarySelection(asi, viewer); } else if (key.equals(CenterProteinQuaternaryRaiser.class.getName())) { aisStr = ViewerRenderProteinQuaternaryStructure.getAdjustProteinQuatenaryFilteredSelectionScript( asi); } else if (key.equals(CenterWaterSelectionRaiser.class.getName())) { aisStr = ViewerRenderWater.getAdjustWaterFilteredSelectionScript(asi, viewer); } } return aisStr; }
@Handles(raises = {}) protected void handleRenderingInfoRaiser(final RenderingInfoRaiser raiser) { final RenderingInfo ri = raiser.getRenderingInfo(); final MoleculeJmolContainer self = this; if (null != ri) { StarBiochemMain.setGlassPaneVisible(true); try { if (RenderingInfoRaiser.PROTEIN_PRIMARY_STRUCTURE.equals(ri.getSource())) { ViewerRenderProteinPrimaryStructure.renderProteinPrimaryStructure(viewer, ri); } if (RenderingInfoRaiser.PROTEIN_PRIMARY_COVALENT_BONDS.equals(ri.getSource())) { ViewerRenderProteinPrimaryStructure.renderProteinPrimaryCovalentBonds(viewer, ri); } else if (RenderingInfoRaiser.PROTEIN_SECONDARY_STRUCTURE.equals(ri.getSource())) { ViewerRenderProteinSecondaryStructure.renderProteinSecondaryStructure(viewer, ri); } else if (RenderingInfoRaiser.PROTEIN_SECONDARY_HBOND_STRUCTURE.equals(ri.getSource())) { ViewerRenderProteinSecondaryStructure.renderProteinSecondaryHBondStructure(viewer, ri); } else if (RenderingInfoRaiser.PROTEIN_TERTIARY_STRUCTURE.equals(ri.getSource())) { ViewerRenderProteinTertiaryStructure.renderProteinTertiaryStructure(viewer, ri); } else if (RenderingInfoRaiser.PROTEIN_TERTIARY_COVALENT_BONDS.equals(ri.getSource())) { ViewerRenderProteinTertiaryStructure.renderProteinTertiaryCovalentBonds(viewer, ri); } else if (RenderingInfoRaiser.PROTEIN_TERTIARY_HBOND_STRUCTURE.equals(ri.getSource())) { ViewerRenderProteinTertiaryStructure.renderProteinTertiaryHbonds(viewer, ri); } else if (RenderingInfoRaiser.PROTEIN_QUATERNARY_STRUCTURE.equals(ri.getSource())) { SwingUtilities.invokeLater( new Runnable() { public void run() { try { ViewerRenderProteinQuaternaryStructure.renderProteinQuaternaryStructure( viewer, ri); } catch (StarBiochemException e1) { closeException = e1; self.raise_CloseMoleculeEvent(); } } }); } else if (RenderingInfoRaiser.PROTEIN_QUATERNARY_SSBOND_STRUCTURE.equals(ri.getSource())) { ViewerRenderProteinQuaternaryStructure.renderProteinQuaternarySSBonds(viewer, ri); } else if (RenderingInfoRaiser.PROTEIN_QUATERNARY_HBOND_STRUCTURE.equals(ri.getSource())) { ViewerRenderProteinQuaternaryStructure.renderProteinQuaternaryHbonds(viewer, ri); } else if (RenderingInfoRaiser.PROTEIN_QUATERNARY_STRUCTURE_TRANSLUCENCY.equals( ri.getSource())) { ViewerRenderProteinQuaternaryStructure.renderProteinQuaternaryStructureTranslucency( viewer, ri); } else if (RenderingInfoRaiser.NUCLEIC.equals(ri.getSource())) { ViewerRenderNucleic.renderNucleicAtoms(viewer, ri); } else if (RenderingInfoRaiser.NUCLEIC_COVALENT_BONDS.equals(ri.getSource())) { ViewerRenderNucleic.renderNucleicBonds(viewer, ri); } else if (RenderingInfoRaiser.NUCLEIC_HBOND_STRUCTURE.equals(ri.getSource())) { ViewerRenderNucleic.renderNucleicHBond(viewer, ri); } else if (RenderingInfoRaiser.HETERO.equals(ri.getSource())) { ViewerRenderHetero.renderHeteroAtoms(viewer, ri); } else if (RenderingInfoRaiser.HETERO_COVALENT_BONDS.equals(ri.getSource())) { ViewerRenderHetero.renderHeteroBonds(viewer, ri); } else if (RenderingInfoRaiser.HETERO_HBOND_STRUCTURE.equals(ri.getSource())) { ViewerRenderHetero.renderHeteroHBond(viewer, ri); } else if (RenderingInfoRaiser.WATER.equals(ri.getSource())) { ViewerRenderWater.renderWater(viewer, ri); } else if (RenderingInfoRaiser.WATER_COVALENT_BONDS.equals(ri.getSource())) { ViewerRenderWater.renderWaterBonds(viewer, ri); } else if (RenderingInfoRaiser.WATER_HBOND_STRUCTURE.equals(ri.getSource())) { ViewerRenderWater.renderWaterHBonds(viewer, ri); } else if (RenderingInfoRaiser.JMOLPROPERTIES.equals(ri.getSource())) { renderJmolProperties(ri); } StarBiochemMain.setGlassPaneVisible(false); } catch (StarBiochemException e1) { this.closeException = e1; this.raise_CloseMoleculeEvent(); } } }