コード例 #1
0
 private void renderJmolProperties(RenderingInfo ri) {
   try {
     if (null != ri) {
       String propertiesScript = viewer.getJmolPropertiesScript(ri);
       if ((null != propertiesScript) && (0 != propertiesScript.length())) {
         String filteredSelectionScript = viewer.getJmolFilteredSelectionScript(ri);
         if ((null != filteredSelectionScript) && (0 != filteredSelectionScript.length())) {
           String script = filteredSelectionScript + propertiesScript;
           viewer.script(script);
         }
       }
     }
   } catch (StarBiochemException e) {
     JOptionPane.showMessageDialog(
         this,
         e.getMessage()
             + "\n"
             + Messages.getString("MoleculeJmolContainer.15")); // $NON-NLS-1$ //$NON-NLS-2$
     try {
       if (null != viewer) {
         viewer.script("restore STATE \"scriptState\";"); // $NON-NLS-1$
       }
     } catch (StarBiochemException e1) {
       this.closeException = e;
       this.raise_CloseMoleculeEvent();
     }
   }
 }
コード例 #2
0
 private void renderAdjust(AdjustInfo ai) {
   try {
     if (null != ai) {
       String script = getAdjustScript(ai);
       if ((null != script) && !EMPTY_STRING.equals(script)) {
         viewer.script(script);
       }
     }
   } catch (StarBiochemException e) {
     JOptionPane.showMessageDialog(
         this,
         e.getMessage()
             + "\n"
             + Messages.getString("MoleculeJmolContainer.3")); // $NON-NLS-1$ //$NON-NLS-2$
     try {
       if (null != viewer) {
         viewer.script("restore STATE \"scriptState\";"); // $NON-NLS-1$
       }
     } catch (StarBiochemException e1) {
       this.closeException = e;
       this.raise_CloseMoleculeEvent();
     }
   }
 }