nmrshiftdb-devel Mailing List for NMRShiftDB (Page 13)
Brought to you by:
steinbeck
You can subscribe to this list here.
| 2002 |
Jan
|
Feb
(170) |
Mar
(120) |
Apr
(191) |
May
(231) |
Jun
(147) |
Jul
(202) |
Aug
(132) |
Sep
(91) |
Oct
(43) |
Nov
(87) |
Dec
(75) |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 2003 |
Jan
(111) |
Feb
(194) |
Mar
(102) |
Apr
(107) |
May
(88) |
Jun
(121) |
Jul
(166) |
Aug
(75) |
Sep
(89) |
Oct
(116) |
Nov
(117) |
Dec
(52) |
| 2004 |
Jan
(138) |
Feb
(150) |
Mar
(144) |
Apr
(144) |
May
(54) |
Jun
(116) |
Jul
(73) |
Aug
(29) |
Sep
(135) |
Oct
(96) |
Nov
(72) |
Dec
(28) |
| 2005 |
Jan
(32) |
Feb
(9) |
Mar
(69) |
Apr
(108) |
May
(130) |
Jun
(195) |
Jul
(104) |
Aug
(116) |
Sep
(106) |
Oct
(58) |
Nov
(74) |
Dec
(64) |
| 2006 |
Jan
(110) |
Feb
(63) |
Mar
(45) |
Apr
(11) |
May
(122) |
Jun
(106) |
Jul
(26) |
Aug
(48) |
Sep
(67) |
Oct
(105) |
Nov
(81) |
Dec
(6) |
| 2007 |
Jan
|
Feb
|
Mar
|
Apr
(9) |
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
| 2009 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
(11) |
| 2010 |
Jan
(1) |
Feb
|
Mar
|
Apr
(3) |
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
|
From: Stefan K. <sh...@us...> - 2006-08-25 19:33:03
|
Update of /cvsroot/nmrshiftdb/nmrshiftdb/src/java/org/openscience/nmrshiftdb/webservices In directory sc8-pr-cvs7.sourceforge.net:/tmp/cvs-serv22029/src/java/org/openscience/nmrshiftdb/webservices Modified Files: NMRShiftDBServiceBindingImpl.java Log Message: web service handles conditions and literature Index: NMRShiftDBServiceBindingImpl.java =================================================================== RCS file: /cvsroot/nmrshiftdb/nmrshiftdb/src/java/org/openscience/nmrshiftdb/webservices/NMRShiftDBServiceBindingImpl.java,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -r1.10 -r1.11 *** NMRShiftDBServiceBindingImpl.java 3 Aug 2006 17:31:26 -0000 1.10 --- NMRShiftDBServiceBindingImpl.java 25 Aug 2006 19:32:54 -0000 1.11 *************** *** 8,13 **** import java.util.Date; import java.util.HashMap; - import java.util.List; import java.util.Properties; import java.util.Vector; --- 8,13 ---- import java.util.Date; import java.util.HashMap; import java.util.Properties; + import java.util.StringTokenizer; import java.util.Vector; *************** *** 31,34 **** --- 31,36 ---- import org.openscience.cdk.tools.manipulator.AtomContainerManipulator; import org.openscience.nmrshiftdb.PredictionTool; + import org.openscience.nmrshiftdb.om.DBConditionType; + import org.openscience.nmrshiftdb.om.DBLiterature; import org.openscience.nmrshiftdb.om.DBSpectrumType; import org.openscience.nmrshiftdb.om.DBSpectrumTypePeer; *************** *** 36,39 **** --- 38,42 ---- import org.openscience.nmrshiftdb.om.NmrshiftdbUserPeer; import org.openscience.nmrshiftdb.util.GeneralUtils; + import org.openscience.nmrshiftdb.util.NmrshiftdbConstants; import org.openscience.nmrshiftdb.util.SubmittingData; import org.openscience.nmrshiftdb.util.ValueTriple; *************** *** 46,49 **** --- 49,53 ---- import org.xmlcml.cml.element.CMLPeak; import org.xmlcml.cml.element.CMLPeakList; + import org.xmlcml.cml.element.CMLScalar; import org.xmlcml.cml.element.CMLSpectrum; import org.xmlcml.cml.legacy.molecule.MDLConverter; *************** *** 181,184 **** --- 185,237 ---- subData.getSignalstable().add(vt); } + for (int l = 0; l < subData.getConditions().size(); l++) { + Elements els=spectrum.getConditionListElements().get(0).getChildCMLElements("scalar"); + if(((DBConditionType) subData.getConditions().get(l)).getConditionName().equals("Solvent")){ + for(int k=0;k<els.size();k++){ + if(els.get(k).getAttribute("dictRef")!=null && els.get(k).getAttribute("dictRef").equals(".SOLVENTNAME")){ + ((DBConditionType) subData.getConditions().get(l)).setCurrentValue(((CMLScalar)els.get(k)).getValue()); + break; + } + } + } + if(((DBConditionType) subData.getConditions().get(l)).getConditionName().equals("Temperature [K]")){ + for(int k=0;k<els.size();k++){ + if(els.get(k).getAttribute("dictRef")!=null && els.get(k).getAttribute("dictRef").equals("TEMPERATURE")){ + ((DBConditionType) subData.getConditions().get(l)).setCurrentValue(((CMLScalar)els.get(k)).getValue()); + break; + } + } + } + if(((DBConditionType) subData.getConditions().get(l)).getConditionName().equals("Field Strength [MHz]")){ + for(int k=0;k<els.size();k++){ + if(els.get(k).getAttribute("dictRef")!=null && els.get(k).getAttribute("dictRef").equals(".OBSERVE FREQUENCY")){ + ((DBConditionType) subData.getConditions().get(l)).setCurrentValue(((CMLScalar)els.get(k)).getValue()); + break; + } + } + } + if(((DBConditionType) subData.getConditions().get(l)).getConditionName().equals("Assignment Method")){ + ((DBConditionType) subData.getConditions().get(l)).setCurrentValue(spectrum.getMetadataListElements().get(0).getMetadataDescendantsByName("nmr:assignmentMethod").get(0).getContent()); + } + } + Elements els=spectrum.getChildElements("entry","http://bibtexml.sf.net/"); + for(int k=0;k<els.size();k++){ + Element el=els.get(k).getChildElements().get(0); + DBLiterature lit=null; + if(el.getValue().equals("article")){ + lit=new DBLiterature(NmrshiftdbConstants.JOURNAL_ARTICLE); + lit.setAuthor(el.getChildElements("author","http://bibtexml.sf.net/").get(0).getValue()); + lit.setTitle(el.getChildElements("title","http://bibtexml.sf.net/").get(0).getValue()); + lit.journaltitle=el.getChildElements("journal","http://bibtexml.sf.net/").get(0).getValue(); + lit.year=Integer.parseInt(el.getChildElements("year","http://bibtexml.sf.net/").get(0).getValue()); + lit.volume=Integer.parseInt(el.getChildElements("volume","http://bibtexml.sf.net/").get(0).getValue()); + String pages=el.getChildElements("author","http://bibtexml.sf.net/").get(0).getValue(); + StringTokenizer pagestokenizer=new StringTokenizer(pages,"-"); + lit.from=Integer.parseInt(pagestokenizer.nextToken()); + lit.to=Integer.parseInt(pagestokenizer.nextToken()); + //TODO consistrency checks? + } + //TODO other types + } subData.save(user.getUserId(),"false","bioclipse", new Date(),null,Integer.parseInt(GeneralUtils.getNmrshiftdbProperty("hosecode.spheres")), false); sb.append(subData.spectrumid+" "); |
|
From: Stefan K. <sh...@us...> - 2006-08-24 15:15:49
|
Update of /cvsroot/nmrshiftdb/nmrshiftdb/src/java/org/openscience/nmrshiftdb/modules/actions/portlets In directory sc8-pr-cvs7.sourceforge.net:/tmp/cvs-serv17174/src/java/org/openscience/nmrshiftdb/modules/actions/portlets Modified Files: ChooseSpectrumTypeAction.java Log Message: ui stuff Index: ChooseSpectrumTypeAction.java =================================================================== RCS file: /cvsroot/nmrshiftdb/nmrshiftdb/src/java/org/openscience/nmrshiftdb/modules/actions/portlets/ChooseSpectrumTypeAction.java,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -r1.4 -r1.5 *** ChooseSpectrumTypeAction.java 19 Oct 2005 13:45:19 -0000 1.4 --- ChooseSpectrumTypeAction.java 24 Aug 2006 15:15:04 -0000 1.5 *************** *** 45,48 **** --- 45,49 ---- context.put("spectra",types); context.put("trueonly",data.getSession().getAttribute("trueonly")); + context.put("mode",data.getSession().getAttribute("mode")); } |
|
From: Stefan K. <sh...@us...> - 2006-08-24 15:15:26
|
Update of /cvsroot/nmrshiftdb/nmrshiftdb/src/vmtemplates/portlets/html In directory sc8-pr-cvs7.sourceforge.net:/tmp/cvs-serv17174/src/vmtemplates/portlets/html Modified Files: choose-types.vm Log Message: ui stuff Index: choose-types.vm =================================================================== RCS file: /cvsroot/nmrshiftdb/nmrshiftdb/src/vmtemplates/portlets/html/choose-types.vm,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -r1.8 -r1.9 *** choose-types.vm 27 Jun 2006 14:29:18 -0000 1.8 --- choose-types.vm 24 Aug 2006 15:15:04 -0000 1.9 *************** *** 1,9 **** ! <form name="orderform" method="post" action="$jlink.setPanel("Order handling")"> ! #foreach($spectrum in $spectra) ! <input type="checkbox" name="$spectrum.getName()" value="true" #if($spectrum.getChoosen()) checked #end >$spectrum.getName()<br> ! #end ! <br> ! <input type="checkbox" name="trueonly" value="trueonly" #if($trueonly.booleanValue()) checked #end >Use only reviewed spetra for prediction<br> ! <input type="submit" style="background-color:#0000AA; color:white" name="eventSubmit_doSubmittypes" value="Restrict to choice" onClick="exportMol()"/> <a href="portal/pane0/Help;jsessionid=$data.getSession().getId()?URL=using.html#typeselection" title="Help for spectrum type selection" style="color:white"><img src="images/help.png"></a> ! </form> --- 1,13 ---- ! #if($mode=="expert") ! <form name="orderform" method="post" action="$jlink.setPanel("Order handling")"> ! #foreach($spectrum in $spectra) ! <input type="checkbox" name="$spectrum.getName()" value="true" #if($spectrum.getChoosen()) checked #end >$spectrum.getName()<br> ! #end ! <br> ! <input type="checkbox" name="trueonly" value="trueonly" #if($trueonly.booleanValue()) checked #end >Use only reviewed spetra for prediction<br> ! <input type="submit" style="background-color:#0000AA; color:white" name="eventSubmit_doSubmittypes" value="Restrict to choice" onClick="exportMol()"/> <a href="portal/pane0/Help;jsessionid=$data.getSession().getId()?URL=using.html#typeselection" title="Help for spectrum type selection" style="color:white"><img src="images/help.png"></a> ! </form> ! #else ! Only visible in <a href="portal/pane0/Search;jsessionid=$data.getSession().getId()?nmrshiftdbaction=switchmode">expert mode</a> ! #end |
|
From: Stefan K. <sh...@us...> - 2006-08-24 13:50:33
|
Update of /cvsroot/nmrshiftdb/nmrshiftdb/src/vmtemplates/portlets/html In directory sc8-pr-cvs7.sourceforge.net:/tmp/cvs-serv32220/src/vmtemplates/portlets/html Modified Files: search-conditions.vm Log Message: more ui stuff Index: search-conditions.vm =================================================================== RCS file: /cvsroot/nmrshiftdb/nmrshiftdb/src/vmtemplates/portlets/html/search-conditions.vm,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -r1.10 -r1.11 *** search-conditions.vm 16 May 2006 10:58:42 -0000 1.10 --- search-conditions.vm 24 Aug 2006 13:50:30 -0000 1.11 *************** *** 1,33 **** ! <form action="portal/pane0/Results;jsessionid=$data.getSession().getId()" name="searchconditions" method="post"> ! <input type="hidden" name="nmrshiftdbaction" value="searchByCondition"> ! <h3>Measurement conditions:</h3> ! #foreach($condition in $conditionsmeasured) ! <input type="checkbox" name="$condition.getConditionName()" value="$condition.getConditionName()" ! #if($lastaction.contains($condition.getConditionName())) ! checked ! #end ! > ! $condition.getConditionName() ! <select name="existing${condition.getConditionName()}conditions" size="1" style="width:200px"> ! #foreach($existingcondition in $condition.getExistingConditions()) ! <option value="$existingcondition.getValue()">$existingcondition.getValue()</option> ! #end ! </select><br> ! #end ! <h3>Calculation conditions:</h3> ! #foreach($condition in $conditionscalculated) ! <input type="checkbox" name="$condition.getConditionName()" value="$condition.getConditionName()" ! #if($lastaction.contains($condition.getConditionName())) ! checked ! #end ! > ! $condition.getConditionName() ! <select name="existing${condition.getConditionName()}conditions" size="1" style="width:200px"> ! #foreach($existingcondition in $condition.getExistingConditions()) ! <option value="$existingcondition.getValue()">$existingcondition.getValue()</option> ! #end ! </select><br> ! #end ! <br><input type="submit" style="background-color:#0000AA; color:white" value="Search by condition" /> <a href="portal/pane0/Help;jsessionid=$data.getSession().getId()?URL=using.html#scondition" title="Help for conditions search" style="color:white"><img src="images/help.png"></a> ! </form> ! --- 1,36 ---- ! #if($mode=="expert") ! <form action="portal/pane0/Results;jsessionid=$data.getSession().getId()" name="searchconditions" method="post"> ! <input type="hidden" name="nmrshiftdbaction" value="searchByCondition"> ! <h3>Measurement conditions:</h3> ! #foreach($condition in $conditionsmeasured) ! <input type="checkbox" name="$condition.getConditionName()" value="$condition.getConditionName()" ! #if($lastaction.contains($condition.getConditionName())) ! checked ! #end ! > ! $condition.getConditionName() ! <select name="existing${condition.getConditionName()}conditions" size="1" style="width:200px"> ! #foreach($existingcondition in $condition.getExistingConditions()) ! <option value="$existingcondition.getValue()">$existingcondition.getValue()</option> ! #end ! </select><br> ! #end ! <h3>Calculation conditions:</h3> ! #foreach($condition in $conditionscalculated) ! <input type="checkbox" name="$condition.getConditionName()" value="$condition.getConditionName()" ! #if($lastaction.contains($condition.getConditionName())) ! checked ! #end ! > ! $condition.getConditionName() ! <select name="existing${condition.getConditionName()}conditions" size="1" style="width:200px"> ! #foreach($existingcondition in $condition.getExistingConditions()) ! <option value="$existingcondition.getValue()">$existingcondition.getValue()</option> ! #end ! </select><br> ! #end ! <br><input type="submit" style="background-color:#0000AA; color:white" value="Search by condition" /> <a href="portal/pane0/Help;jsessionid=$data.getSession().getId()?URL=using.html#scondition" title="Help for conditions search" style="color:white"><img src="images/help.png"></a> ! </form> ! #else ! Only visible in <a href="portal/pane0/Search;jsessionid=$data.getSession().getId()?nmrshiftdbaction=switchmode">expert mode</a> ! #end \ No newline at end of file |
|
From: Stefan K. <sh...@us...> - 2006-08-24 13:50:33
|
Update of /cvsroot/nmrshiftdb/nmrshiftdb/src/java/org/openscience/nmrshiftdb/portlets In directory sc8-pr-cvs7.sourceforge.net:/tmp/cvs-serv32220/src/java/org/openscience/nmrshiftdb/portlets Modified Files: KeywordPortlet.java MeasuredOrNotPortlet.java Log Message: more ui stuff Index: KeywordPortlet.java =================================================================== RCS file: /cvsroot/nmrshiftdb/nmrshiftdb/src/java/org/openscience/nmrshiftdb/portlets/KeywordPortlet.java,v retrieving revision 1.13 retrieving revision 1.14 diff -C2 -r1.13 -r1.14 *** KeywordPortlet.java 7 Jun 2006 19:13:50 -0000 1.13 --- KeywordPortlet.java 24 Aug 2006 13:50:29 -0000 1.14 *************** *** 42,45 **** --- 42,46 ---- context.put("frag",session.getAttribute("frag")); context.put("data",runData); + context.put("mode",session.getAttribute("mode")); // lets render the template StringWriter w = new StringWriter(); Index: MeasuredOrNotPortlet.java =================================================================== RCS file: /cvsroot/nmrshiftdb/nmrshiftdb/src/java/org/openscience/nmrshiftdb/portlets/MeasuredOrNotPortlet.java,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -r1.4 -r1.5 *** MeasuredOrNotPortlet.java 16 Jan 2006 14:20:05 -0000 1.4 --- MeasuredOrNotPortlet.java 24 Aug 2006 13:50:29 -0000 1.5 *************** *** 54,57 **** --- 54,58 ---- context.put("calculated",(session.getAttribute(NmrshiftdbConstants.CALCULATEDONLY)!=null)+""); context.put("data",runData); + context.put("mode",session.getAttribute("mode")); /* * lets render the template |
|
From: Stefan K. <sh...@us...> - 2006-08-24 13:50:33
|
Update of /cvsroot/nmrshiftdb/nmrshiftdb/src/java/org/openscience/nmrshiftdb/modules/actions/portlets In directory sc8-pr-cvs7.sourceforge.net:/tmp/cvs-serv32220/src/java/org/openscience/nmrshiftdb/modules/actions/portlets Modified Files: SearchConditionAction.java Log Message: more ui stuff Index: SearchConditionAction.java =================================================================== RCS file: /cvsroot/nmrshiftdb/nmrshiftdb/src/java/org/openscience/nmrshiftdb/modules/actions/portlets/SearchConditionAction.java,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -r1.6 -r1.7 *** SearchConditionAction.java 9 Jan 2006 15:03:04 -0000 1.6 --- SearchConditionAction.java 24 Aug 2006 13:50:22 -0000 1.7 *************** *** 46,49 **** --- 46,50 ---- } context.put(LASTACTION_KEY,data.getSession().getAttribute(LASTACTION_KEY)); + context.put("mode",data.getSession().getAttribute("mode")); } catch(Exception ex){ |
|
From: Stefan K. <sh...@us...> - 2006-08-24 13:50:33
|
Update of /cvsroot/nmrshiftdb/nmrshiftdb/src/java/org/openscience/nmrshiftdb/util In directory sc8-pr-cvs7.sourceforge.net:/tmp/cvs-serv32220/src/java/org/openscience/nmrshiftdb/util Modified Files: GeneralUtils.java Log Message: more ui stuff Index: GeneralUtils.java =================================================================== RCS file: /cvsroot/nmrshiftdb/nmrshiftdb/src/java/org/openscience/nmrshiftdb/util/GeneralUtils.java,v retrieving revision 1.183 retrieving revision 1.184 diff -C2 -r1.183 -r1.184 *** GeneralUtils.java 24 Aug 2006 12:00:25 -0000 1.183 --- GeneralUtils.java 24 Aug 2006 13:50:29 -0000 1.184 *************** *** 1447,1453 **** } Log.info(query.toString()); - - System.err.println(query.toString()); - if (runData != null) { GeneralUtils.logToSql("Search - " + query, runData); --- 1447,1450 ---- |
|
From: Stefan K. <sh...@us...> - 2006-08-24 13:50:33
|
Update of /cvsroot/nmrshiftdb/nmrshiftdb/src/vmtemplates In directory sc8-pr-cvs7.sourceforge.net:/tmp/cvs-serv32220/src/vmtemplates Modified Files: keyword.vm measuredornot.vm Log Message: more ui stuff Index: keyword.vm =================================================================== RCS file: /cvsroot/nmrshiftdb/nmrshiftdb/src/vmtemplates/keyword.vm,v retrieving revision 1.20 retrieving revision 1.21 diff -C2 -r1.20 -r1.21 *** keyword.vm 27 Jun 2006 14:29:17 -0000 1.20 --- keyword.vm 24 Aug 2006 13:50:30 -0000 1.21 *************** *** 1,41 **** ! <form name="exactnameform" action="portal/pane0/Results;jsessionid=$data.getSession().getId()" method="post"> ! <input type="hidden" name="nmrshiftdbaction" value="keywordselection"> ! <table> ! <tr> ! <td width="20"></td> ! <th>Spectrum categories:</th> ! <td width="20"></td> ! <th>Molecule keywords:</th> ! <td width="20"></td> ! </tr> ! <tr> ! <td width="20"></td> ! <td> ! <select style="width:200px" name="spectrumkeywords" size="6" multiple> ! #include("spectrumkeywords.vm") ! </select> ! </td> ! <td width="20"></td> ! <td> ! <select style="width:200px" name="moleculekeywords" size="6" multiple> ! #include("moleculekeywords.vm") ! </select> ! </td> ! <td width="20"></td> ! </tr> ! </table> ! <br> ! <input type="radio" value="fragment" name="fragmentortotal" ! #if($frag=="fragment") ! checked ! #end ! > Keyword fragment search<br> ! <input type="radio" value="total" name="fragmentortotal" ! #if($frag=="total") ! checked ! #end ! > Total keyword search<br> ! <br> ! <input type="submit" style="background-color:#0000AA; color:white" value="Search"> <a href="portal/pane0/Help;jsessionid=$data.getSession().getId()?URL=using.html#skeyw" title="Help for keyword search" style="color:white"><img src="images/help.png"></a> ! </form> --- 1,45 ---- ! #if($mode=="expert") ! <form name="exactnameform" action="portal/pane0/Results;jsessionid=$data.getSession().getId()" method="post"> ! <input type="hidden" name="nmrshiftdbaction" value="keywordselection"> ! <table> ! <tr> ! <td width="20"></td> ! <th>Spectrum categories:</th> ! <td width="20"></td> ! <th>Molecule keywords:</th> ! <td width="20"></td> ! </tr> ! <tr> ! <td width="20"></td> ! <td> ! <select style="width:200px" name="spectrumkeywords" size="6" multiple> ! #include("spectrumkeywords.vm") ! </select> ! </td> ! <td width="20"></td> ! <td> ! <select style="width:200px" name="moleculekeywords" size="6" multiple> ! #include("moleculekeywords.vm") ! </select> ! </td> ! <td width="20"></td> ! </tr> ! </table> ! <br> ! <input type="radio" value="fragment" name="fragmentortotal" ! #if($frag=="fragment") ! checked ! #end ! > Keyword fragment search<br> ! <input type="radio" value="total" name="fragmentortotal" ! #if($frag=="total") ! checked ! #end ! > Total keyword search<br> ! <br> ! <input type="submit" style="background-color:#0000AA; color:white" value="Search"> <a href="portal/pane0/Help;jsessionid=$data.getSession().getId()?URL=using.html#skeyw" title="Help for keyword search" style="color:white"><img src="images/help.png"></a> ! </form> ! #else ! Only visible in <a href="portal/pane0/Search;jsessionid=$data.getSession().getId()?nmrshiftdbaction=switchmode">expert mode</a> ! #end Index: measuredornot.vm =================================================================== RCS file: /cvsroot/nmrshiftdb/nmrshiftdb/src/vmtemplates/measuredornot.vm,v retrieving revision 1.12 retrieving revision 1.13 diff -C2 -r1.12 -r1.13 *** measuredornot.vm 27 Jun 2006 14:29:17 -0000 1.12 --- measuredornot.vm 24 Aug 2006 13:50:30 -0000 1.13 *************** *** 1,15 **** ! <form name="exactnameform" action="portal/pane0/Search;jsessionid=$data.getSession().getId()" method="post"> ! <input type="hidden" name="nmrshiftdbaction" value="measuredornot"> ! <input type="checkbox" name="measured" value="measured" ! #if($measured=="true") ! checked ! #end ! >Measured spectra ! <input type="checkbox" name="calculated" value="calculated" ! #if($calculated=="true") ! checked ! #end ! >Calculated spectra ! <br><br> ! <input type="submit" style="background-color:#0000AA; color:white" value="Submit"> <a href="portal/pane0/Help;jsessionid=$data.getSession().getId()?URL=using.html#smeasorcalc" title="Help for restriction to measured or calculated" style="color:white"><img src="images/help.png"></a> ! </form> --- 1,19 ---- ! #if($mode=="expert") ! <form name="exactnameform" action="portal/pane0/Search;jsessionid=$data.getSession().getId()" method="post"> ! <input type="hidden" name="nmrshiftdbaction" value="measuredornot"> ! <input type="checkbox" name="measured" value="measured" ! #if($measured=="true") ! checked ! #end ! >Measured spectra ! <input type="checkbox" name="calculated" value="calculated" ! #if($calculated=="true") ! checked ! #end ! >Calculated spectra ! <br><br> ! <input type="submit" style="background-color:#0000AA; color:white" value="Submit"> <a href="portal/pane0/Help;jsessionid=$data.getSession().getId()?URL=using.html#smeasorcalc" title="Help for restriction to measured or calculated" style="color:white"><img src="images/help.png"></a> ! </form> ! #else ! Only visible in <a href="portal/pane0/Search;jsessionid=$data.getSession().getId()?nmrshiftdbaction=switchmode">expert mode</a> ! #end \ No newline at end of file |
|
From: Stefan K. <sh...@us...> - 2006-08-24 12:00:34
|
Update of /cvsroot/nmrshiftdb/nmrshiftdb/src/java/org/openscience/nmrshiftdb/util In directory sc8-pr-cvs7.sourceforge.net:/tmp/cvs-serv4857/src/java/org/openscience/nmrshiftdb/util Modified Files: GeneralUtils.java NmrshiftdbConstants.java Log Message: * Expert/normal mode makes search interface clearer * Weight search/formula with(out) other elements integrated into general search Index: GeneralUtils.java =================================================================== RCS file: /cvsroot/nmrshiftdb/nmrshiftdb/src/java/org/openscience/nmrshiftdb/util/GeneralUtils.java,v retrieving revision 1.182 retrieving revision 1.183 diff -C2 -r1.182 -r1.183 *** GeneralUtils.java 29 Jun 2006 14:06:30 -0000 1.182 --- GeneralUtils.java 24 Aug 2006 12:00:25 -0000 1.183 *************** *** 1386,1390 **** query.append(" MOLECULE.SMILES_STRING" + (chiral ? "_CHIRAL" : "") + " = '" + (chiral ? new SmilesGenerator(DefaultChemObjectBuilder.getInstance()).createSMILES(molWithH, true, new boolean[molWithH.getAtomCount()]) : new SmilesGenerator(DefaultChemObjectBuilder.getInstance()).createSMILES(molWithoutH)) + "' " + concatenator); } ! if (!((ValuesForVelocityBean) searchHistory.get(searches[i])).getDisplayText().equals(NmrshiftdbConstants.FORMULA) && !((ValuesForVelocityBean) searchHistory.get(searches[i])).getDisplayText().equals(NmrshiftdbConstants.MULTIPLICITY) && !((ValuesForVelocityBean) searchHistory.get(searches[i])).getDisplayText().equals(NmrshiftdbConstants.HOSECODE) && !((ValuesForVelocityBean) searchHistory.get(searches[i])).getDisplayText().equals(NmrshiftdbConstants.POTMULTIPLICITY)) { if (((ValuesForVelocityBean) searchHistory.get(searches[i])).getNameForElements().equals(NmrshiftdbConstants.EXACT)) { query.append(fields.get(((ValuesForVelocityBean) searchHistory.get(searches[i])).getDisplayText()) + "='" + GeneralUtils.escape(((ValuesForVelocityBean) searchHistory.get(searches[i])).getRange()) + "' " + concatenator); --- 1386,1390 ---- query.append(" MOLECULE.SMILES_STRING" + (chiral ? "_CHIRAL" : "") + " = '" + (chiral ? new SmilesGenerator(DefaultChemObjectBuilder.getInstance()).createSMILES(molWithH, true, new boolean[molWithH.getAtomCount()]) : new SmilesGenerator(DefaultChemObjectBuilder.getInstance()).createSMILES(molWithoutH)) + "' " + concatenator); } ! if (!((ValuesForVelocityBean) searchHistory.get(searches[i])).getDisplayText().equals(NmrshiftdbConstants.WEIGHT) && !((ValuesForVelocityBean) searchHistory.get(searches[i])).getDisplayText().equals(NmrshiftdbConstants.FORMULA) && !((ValuesForVelocityBean) searchHistory.get(searches[i])).getDisplayText().equals(NmrshiftdbConstants.MULTIPLICITY) && !((ValuesForVelocityBean) searchHistory.get(searches[i])).getDisplayText().equals(NmrshiftdbConstants.HOSECODE) && !((ValuesForVelocityBean) searchHistory.get(searches[i])).getDisplayText().equals(NmrshiftdbConstants.POTMULTIPLICITY)) { if (((ValuesForVelocityBean) searchHistory.get(searches[i])).getNameForElements().equals(NmrshiftdbConstants.EXACT)) { query.append(fields.get(((ValuesForVelocityBean) searchHistory.get(searches[i])).getDisplayText()) + "='" + GeneralUtils.escape(((ValuesForVelocityBean) searchHistory.get(searches[i])).getRange()) + "' " + concatenator); *************** *** 1447,1450 **** --- 1447,1453 ---- } Log.info(query.toString()); + + System.err.println(query.toString()); + if (runData != null) { GeneralUtils.logToSql("Search - " + query, runData); Index: NmrshiftdbConstants.java =================================================================== RCS file: /cvsroot/nmrshiftdb/nmrshiftdb/src/java/org/openscience/nmrshiftdb/util/NmrshiftdbConstants.java,v retrieving revision 1.33 retrieving revision 1.34 diff -C2 -r1.33 -r1.34 *** NmrshiftdbConstants.java 4 Jul 2006 13:38:55 -0000 1.33 --- NmrshiftdbConstants.java 24 Aug 2006 12:00:25 -0000 1.34 *************** *** 36,39 **** --- 36,40 ---- public static String CHEMNAME="chemical name"; public static String FORMULA="chemical formula"; + public static String FORMULA_WITH_OTHER="chemical formula (with other elements)"; public static String MULTIPLICITY="multiplicities"; public static String POTMULTIPLICITY="potential multiplicities"; *************** *** 118,121 **** --- 119,125 ---- return(FORMULA); } + public String getFORMULA_WITH_OTHER(){ + return(FORMULA_WITH_OTHER); + } public String getDELETE_SEARCH_HISTORY(){ return(DELETE_SEARCH_HISTORY); *************** *** 154,156 **** --- 158,163 ---- return DBE_RINGS; } + public String getWEIGHT(){ + return WEIGHT; + } } |
|
From: Stefan K. <sh...@us...> - 2006-08-24 12:00:34
|
Update of /cvsroot/nmrshiftdb/nmrshiftdb/src/java/org/openscience/nmrshiftdb In directory sc8-pr-cvs7.sourceforge.net:/tmp/cvs-serv4857/src/java/org/openscience/nmrshiftdb Modified Files: NmrshiftdbServlet.java Log Message: * Expert/normal mode makes search interface clearer * Weight search/formula with(out) other elements integrated into general search Index: NmrshiftdbServlet.java =================================================================== RCS file: /cvsroot/nmrshiftdb/nmrshiftdb/src/java/org/openscience/nmrshiftdb/NmrshiftdbServlet.java,v retrieving revision 1.90 retrieving revision 1.91 diff -C2 -r1.90 -r1.91 *** NmrshiftdbServlet.java 14 Jul 2006 08:09:58 -0000 1.90 --- NmrshiftdbServlet.java 24 Aug 2006 12:00:24 -0000 1.91 *************** *** 234,238 **** zipout.write(new String(((DBChemicalName)chemnames.get(k)).getName()+" ").getBytes()); } ! zipout.write(new String("</a></p>").getBytes()); } zipout.write(new String("</body></html>").getBytes()); --- 234,246 ---- zipout.write(new String(((DBChemicalName)chemnames.get(k)).getName()+" ").getBytes()); } ! zipout.write(new String("</a>. Information we have got: NMR spectra").getBytes()); ! Vector spectra=mol.selectSpectra(); ! for(int k=0;k<spectra.size();k++){ ! zipout.write(new String(((DBSpectrum)spectra.get(k)).getDBSpectrumType().getName()+", ").getBytes()); ! } ! if(mol.hasAny3d()) ! zipout.write(new String("3D coordinates, ").getBytes()); ! zipout.write(new String("File formats: CML, mol, png, jpeg").getBytes()); ! zipout.write(new String("</p>").getBytes()); } zipout.write(new String("</body></html>").getBytes()); |
|
From: Stefan K. <sh...@us...> - 2006-08-24 12:00:33
|
Update of /cvsroot/nmrshiftdb/nmrshiftdb In directory sc8-pr-cvs7.sourceforge.net:/tmp/cvs-serv4857 Modified Files: CHANGELOG Log Message: * Expert/normal mode makes search interface clearer * Weight search/formula with(out) other elements integrated into general search Index: CHANGELOG =================================================================== RCS file: /cvsroot/nmrshiftdb/nmrshiftdb/CHANGELOG,v retrieving revision 1.113 retrieving revision 1.114 diff -C2 -r1.113 -r1.114 *** CHANGELOG 14 Jul 2006 08:09:58 -0000 1.113 --- CHANGELOG 24 Aug 2006 12:00:20 -0000 1.114 *************** *** 2,5 **** --- 2,11 ---- ---------------- + New: + * Spectrum applet detachable (good for arranging structure and spectrum arount a table) + * Static name list contains informations about what we have got + * Expert/normal mode makes search interface clearer + * Weight search/formula with(out) other elements integrated into general search + Fixes: * The CML export now contains Hs if exported with a proton spectrum |
|
From: Stefan K. <sh...@us...> - 2006-08-24 12:00:32
|
Update of /cvsroot/nmrshiftdb/nmrshiftdb/src/conf/jetspeed/WEB-INF/conf In directory sc8-pr-cvs7.sourceforge.net:/tmp/cvs-serv4857/src/conf/jetspeed/WEB-INF/conf Modified Files: local-portlets.xreg Log Message: * Expert/normal mode makes search interface clearer * Weight search/formula with(out) other elements integrated into general search Index: local-portlets.xreg =================================================================== RCS file: /cvsroot/nmrshiftdb/nmrshiftdb/src/conf/jetspeed/WEB-INF/conf/local-portlets.xreg,v retrieving revision 1.40 retrieving revision 1.41 diff -C2 -r1.40 -r1.41 *** local-portlets.xreg 6 Feb 2006 11:59:17 -0000 1.40 --- local-portlets.xreg 24 Aug 2006 12:00:23 -0000 1.41 *************** *** 33,44 **** <media-type ref="html"/> </portlet-entry> - <portlet-entry name="Weight" hidden="false" type="instance" application="false"> - <meta-info> - <title>Search by Molecular Weight</title> - <description>Search by molecular weight</description> - </meta-info> - <classname>org.openscience.nmrshiftdb.portlets.SearchByWeightPortlet</classname> - <media-type ref="html"/> - </portlet-entry> <portlet-entry name="SearchHistory" hidden="false" type="instance" application="false"> <meta-info> --- 33,36 ---- |
|
From: Stefan K. <sh...@us...> - 2006-08-24 12:00:29
|
Update of /cvsroot/nmrshiftdb/nmrshiftdb/src/vmtemplates In directory sc8-pr-cvs7.sourceforge.net:/tmp/cvs-serv4857/src/vmtemplates Modified Files: searchByChemicalName.vm searchBySpectrum.vm Log Message: * Expert/normal mode makes search interface clearer * Weight search/formula with(out) other elements integrated into general search Index: searchByChemicalName.vm =================================================================== RCS file: /cvsroot/nmrshiftdb/nmrshiftdb/src/vmtemplates/searchByChemicalName.vm,v retrieving revision 1.25 retrieving revision 1.26 diff -C2 -r1.25 -r1.26 *** searchByChemicalName.vm 16 May 2006 10:58:42 -0000 1.25 --- searchByChemicalName.vm 24 Aug 2006 12:00:25 -0000 1.26 *************** *** 1,5 **** <form name="exactnameform" action="portal/pane0/Results;jsessionid=$data.getSession().getId()" method="post"> <input type="hidden" name="nmrshiftdbaction" value="generalsearch"> ! Search expression: <input type="text" name="searchstring" value="$!searchName"> For chemical formula search:<input type="checkbox" name="otherspecified" value="otherspecified" #if($data.getSession().getAttribute("otherspecified")) checked #end >additional elements allowed<br> <select name="searchaction" size="1"> <option value="$constants.getEXACT()" #if($searchaction=="$constants.getEXACT()") --- 1,6 ---- <form name="exactnameform" action="portal/pane0/Results;jsessionid=$data.getSession().getId()" method="post"> <input type="hidden" name="nmrshiftdbaction" value="generalsearch"> ! Search expression: <input type="text" name="searchstring" value="$!searchName"> ! <select name="searchaction" size="1"> <option value="$constants.getEXACT()" #if($searchaction=="$constants.getEXACT()") *************** *** 29,37 **** #end >Chemical Name</option> - <option value="$constants.getLITERATURE_TITLE()" - #if($searchfield=="$constants.getLITERATURE_TITLE()") - selected - #end - >Literature/Title</option> <option value="$constants.getLITERATURE_AUTHOR()" #if($searchfield=="$constants.getLITERATURE_AUTHOR()") --- 30,33 ---- *************** *** 39,72 **** #end >Literature/Author</option> - <option value="$constants.getCOMMENT()" - #if($searchfield=="$constants.getCOMMENT()") - selected - #end - >Comment</option> - <option value="$constants.getCANNAME()" - #if($searchfield=="$constants.getCANNAME()") - selected - #end - >Canonical Name</option> - <option value="$constants.getMOLLINK()" - #if($searchfield=="$constants.getMOLLINK()") - selected - #end - >Molecule Hyperlink Description</option> - <option value="$constants.getSPECLINK()" - #if($searchfield=="$constants.getSPECLINK()") - selected - #end - >Spectrum Hyperlink Description</option> - <option value="$constants.getMOLKEY()" - #if($searchfield=="$constants.getMOLKEY()") - selected - #end - >Molecule Keyword</option> - <option value="$constants.getSPECKEY()" - #if($searchfield=="$constants.getSPECKEY()") - selected - #end - >Spectrum Category</option> <option value="$constants.getCASNUMBER()" #if($searchfield=="$constants.getCASNUMBER()") --- 35,38 ---- *************** *** 79,112 **** #end >Chemical Formula</option> ! <option value="$constants.getMULTIPLICITY()" ! #if($searchfield=="$constants.getMULTIPLICITY()") ! selected ! #end ! >Multiplicities</option> ! <option value="$constants.getPOTMULTIPLICITY()" ! #if($searchfield=="$constants.getPOTMULTIPLICITY()") ! selected ! #end ! >Potential C13-Multiplicities</option> ! <option value="$constants.getSPECTRUM_NR()" ! #if($searchfield=="$constants.getSPECTRUM_NR()") ! selected ! #end ! >Spectrum NMRShiftDB-Number</option> ! <option value="$constants.getMOLECULE_NR()" ! #if($searchfield=="$constants.getMOLECULE_NR()") ! selected ! #end ! >Molecule NMRShiftDB-Number</option> ! <option value="$constants.getHOSECODE()" ! #if($searchfield=="$constants.getHOSECODE()") ! selected ! #end ! >HOSE code</option> ! <option value="$constants.getDBE_RINGS()" ! #if($searchfield=="$constants.getDBE_RINGS()") ! selected #end - >$constants.getDBE_RINGS()</option> </select> <input type="submit" style="background-color:#0000AA; color:white" value="Search"> <a href="portal/pane0/Help;jsessionid=$data.getSession().getId()?URL=using.html#sprop" title="Help for properties search" style="color:white"><img src="images/help.png"></a> --- 45,125 ---- #end >Chemical Formula</option> ! #if($mode=="expert") ! <option value="$constants.getFORMULA_WITH_OTHER()" ! #if($searchfield=="$constants.getFORMULA_WITH_OTHER()") ! selected ! #end ! >Chemical Formula (with other elements allowed)</option> ! <option value="$constants.getLITERATURE_TITLE()" ! #if($searchfield=="$constants.getLITERATURE_TITLE()") ! selected ! #end ! >Literature/Title</option> ! <option value="$constants.getCOMMENT()" ! #if($searchfield=="$constants.getCOMMENT()") ! selected ! #end ! >Comment</option> ! <option value="$constants.getCANNAME()" ! #if($searchfield=="$constants.getCANNAME()") ! selected ! #end ! >Canonical Name</option> ! <option value="$constants.getMOLLINK()" ! #if($searchfield=="$constants.getMOLLINK()") ! selected ! #end ! >Molecule Hyperlink Description</option> ! <option value="$constants.getSPECLINK()" ! #if($searchfield=="$constants.getSPECLINK()") ! selected ! #end ! >Spectrum Hyperlink Description</option> ! <option value="$constants.getMOLKEY()" ! #if($searchfield=="$constants.getMOLKEY()") ! selected ! #end ! >Molecule Keyword</option> ! <option value="$constants.getSPECKEY()" ! #if($searchfield=="$constants.getSPECKEY()") ! selected ! #end ! >Spectrum Category</option> ! <option value="$constants.getMULTIPLICITY()" ! #if($searchfield=="$constants.getMULTIPLICITY()") ! selected ! #end ! >Multiplicities</option> ! <option value="$constants.getPOTMULTIPLICITY()" ! #if($searchfield=="$constants.getPOTMULTIPLICITY()") ! selected ! #end ! >Potential C13-Multiplicities</option> ! <option value="$constants.getSPECTRUM_NR()" ! #if($searchfield=="$constants.getSPECTRUM_NR()") ! selected ! #end ! >Spectrum NMRShiftDB-Number</option> ! <option value="$constants.getMOLECULE_NR()" ! #if($searchfield=="$constants.getMOLECULE_NR()") ! selected ! #end ! >Molecule NMRShiftDB-Number</option> ! <option value="$constants.getHOSECODE()" ! #if($searchfield=="$constants.getHOSECODE()") ! selected ! #end ! >HOSE code</option> ! <option value="$constants.getDBE_RINGS()" ! #if($searchfield=="$constants.getDBE_RINGS()") ! selected ! #end ! >$constants.getDBE_RINGS()</option> ! <option value="$constants.getWEIGHT()" ! #if($searchfield=="$constants.getWEIGHT()") ! selected ! #end ! >Molecular weight (format: from-to)</option> #end </select> <input type="submit" style="background-color:#0000AA; color:white" value="Search"> <a href="portal/pane0/Help;jsessionid=$data.getSession().getId()?URL=using.html#sprop" title="Help for properties search" style="color:white"><img src="images/help.png"></a> Index: searchBySpectrum.vm =================================================================== RCS file: /cvsroot/nmrshiftdb/nmrshiftdb/src/vmtemplates/searchBySpectrum.vm,v retrieving revision 1.41 retrieving revision 1.42 diff -C2 -r1.41 -r1.42 *** searchBySpectrum.vm 27 Jun 2006 14:29:17 -0000 1.41 --- searchBySpectrum.vm 24 Aug 2006 12:00:25 -0000 1.42 *************** *** 1,3 **** ! <script LANGUAGE="JavaScript1.1"> <!-- function openImportJcamp(){ --- 1,3 ---- ! <script LANGUAGE="JavaScript1.1"> <!-- function openImportJcamp(){ *************** *** 9,12 **** --- 9,17 ---- <p style="color:red">$!message</p> <br> + <form name="spectrumform" action="portal/pane0/Search;jsessionid=$data.getSession().getId()" method="post"> + <input type="hidden" name="nmrshiftdbaction" value="switchmode"> + <input type="submit" value="#if($mode=="expert")Switch to normal search mode #else Switch to expert search mode #end"> + </form> + <br> #if ($data.User.hasLoggedIn()) <a href="portal/pane0/Results;jsessionid=$data.getSession().getId()?nmrshiftdbaction=$constants.getMYSPECTRA()">Show all my contributions</a><br> |
|
From: Stefan K. <sh...@us...> - 2006-08-24 12:00:29
|
Update of /cvsroot/nmrshiftdb/nmrshiftdb/src/java/org/openscience/nmrshiftdb/portlets In directory sc8-pr-cvs7.sourceforge.net:/tmp/cvs-serv4857/src/java/org/openscience/nmrshiftdb/portlets Modified Files: ResultPortlet.java SearchByNamePortlet.java SearchBySpectrumPortlet.java Log Message: * Expert/normal mode makes search interface clearer * Weight search/formula with(out) other elements integrated into general search Index: ResultPortlet.java =================================================================== RCS file: /cvsroot/nmrshiftdb/nmrshiftdb/src/java/org/openscience/nmrshiftdb/portlets/ResultPortlet.java,v retrieving revision 1.282 retrieving revision 1.283 diff -C2 -r1.282 -r1.283 *** ResultPortlet.java 26 May 2006 15:24:11 -0000 1.282 --- ResultPortlet.java 24 Aug 2006 12:00:24 -0000 1.283 *************** *** 365,368 **** --- 365,396 ---- message="Fuzzy NMRShiftDB number search is not possible"; } + if(searchfield.equals(NmrshiftdbConstants.WEIGHT) && !searchaction.equals(NmrshiftdbConstants.EXACT)){ + message="Weight search is only possible in exact mode"; + } + if(searchfield.equals(NmrshiftdbConstants.WEIGHT) && searchstring.indexOf("-")==searchstring.length()-1){ + searchstring=searchstring+""+Integer.MAX_VALUE; + } + if(searchfield.equals(NmrshiftdbConstants.WEIGHT) && searchstring.indexOf("-")==0){ + searchstring=Integer.MIN_VALUE+""+searchstring; + } + if(searchfield.equals(NmrshiftdbConstants.WEIGHT)){ + StringTokenizer st=new StringTokenizer(searchstring,"-"); + if(!st.hasMoreTokens()){ + message="Invalid format for weight. Must be like 4.5-12.6"; + }else{ + String first=st.nextToken(); + if(!st.hasMoreTokens()){ + message="Invalid format for weight. Must be like 4.5-12.6"; + }else{ + String second=st.nextToken(); + try{ + Double.parseDouble(first); + Double.parseDouble(second); + }catch(NumberFormatException ex){ + message="Invalid format for weight. Must be like 4.5-12.6"; + } + } + } + } if (searchaction.equals(NmrshiftdbConstants.EXACT) && searchfield.equals(NmrshiftdbConstants.FORMULA)) { for (int i = 0; i < searchstring.length(); i++) { *************** *** 384,395 **** return(new StringElement(message)); } ! session.setAttribute("searchaction", searchaction); ! session.setAttribute("searchfield", searchfield); ! session.setAttribute("searchstring", searchstring); ! if(runData.getParameters().get("otherspecified")!=null){ ! session.removeAttribute("otherspecified"); }else{ session.setAttribute("otherspecified","otherspecified"); } if(req.getParameter("spectype")!=null) searchaction=req.getParameter("spectype"); --- 412,424 ---- return(new StringElement(message)); } ! if(searchfield.equals(NmrshiftdbConstants.FORMULA_WITH_OTHER)){ ! searchfield=NmrshiftdbConstants.FORMULA; ! session.removeAttribute("otherspecified"); }else{ session.setAttribute("otherspecified","otherspecified"); } + session.setAttribute("searchaction", searchaction); + session.setAttribute("searchfield", searchfield); + session.setAttribute("searchstring", searchstring); if(req.getParameter("spectype")!=null) searchaction=req.getParameter("spectype"); *************** *** 467,494 **** } - if (action.equals("weightsearch")) { - try { - session.removeAttribute("weightmin"); - session.removeAttribute("weightmax"); - session.setAttribute("weightmin", req.getParameter("weightmin")); - session.setAttribute("weightmax", req.getParameter("weightmax")); - double weightmin=0; - double weightmax=0; - try{ - weightmin = Double.parseDouble(req.getParameter("weightmin")); - weightmax = Double.parseDouble(req.getParameter("weightmax")); - } - catch(NumberFormatException ex){ - return (new StringElement("You must enter decimal figures for minimum and maximum weight!")); - } - GeneralUtils.getVectorWithSessionBindingAttributeFromSession(session,NmrshiftdbConstants.SEARCHHISTORY).add(new ValuesForVelocityBean(NmrshiftdbConstants.WEIGHT, "--", weightmin+" - "+weightmax)); - //And we do the search - results = executeLastSearch(session, chiralMessage, runData); - ((ValuesForVelocityBean)GeneralUtils.getVectorWithSessionBindingAttributeFromSession(session,NmrshiftdbConstants.SEARCHHISTORY).get(GeneralUtils.getVectorWithSessionBindingAttributeFromSession(session,NmrshiftdbConstants.SEARCHHISTORY).size()-1)).setLower(results.size()); - } catch (Exception ex) { - return new StringElement(GeneralUtils.logError(ex, "ResultPortlet/searchBySpectrum", runData,true)); - } - } - if (action.equals("keywordselection")) { try { --- 496,499 ---- Index: SearchByNamePortlet.java =================================================================== RCS file: /cvsroot/nmrshiftdb/nmrshiftdb/src/java/org/openscience/nmrshiftdb/portlets/SearchByNamePortlet.java,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -r1.10 -r1.11 *** SearchByNamePortlet.java 16 Jan 2006 14:20:05 -0000 1.10 --- SearchByNamePortlet.java 24 Aug 2006 12:00:24 -0000 1.11 *************** *** 40,46 **** context.put("searchName", session.getAttribute("searchstring")); context.put("searchaction",session.getAttribute("searchaction")); ! context.put("searchfield",session.getAttribute("searchfield")); ! context.put("constants",new NmrshiftdbConstants()); ! context.put("data",runData); /* * lets render the template --- 40,47 ---- context.put("searchName", session.getAttribute("searchstring")); context.put("searchaction",session.getAttribute("searchaction")); ! context.put("searchfield",session.getAttribute("searchfield")); ! context.put("constants",new NmrshiftdbConstants()); ! context.put("data",runData); ! context.put("mode",session.getAttribute("mode")); /* * lets render the template Index: SearchBySpectrumPortlet.java =================================================================== RCS file: /cvsroot/nmrshiftdb/nmrshiftdb/src/java/org/openscience/nmrshiftdb/portlets/SearchBySpectrumPortlet.java,v retrieving revision 1.30 retrieving revision 1.31 diff -C2 -r1.30 -r1.31 *** SearchBySpectrumPortlet.java 30 May 2006 10:51:12 -0000 1.30 --- SearchBySpectrumPortlet.java 24 Aug 2006 12:00:25 -0000 1.31 *************** *** 70,73 **** --- 70,82 ---- } } + if(req.getParameter("nmrshiftdbaction")!=null && req.getParameter("nmrshiftdbaction").equals("switchmode")){ + if(session.getAttribute("mode")==null){ + session.setAttribute("mode","expert"); + }else if(session.getAttribute("mode").equals("expert")){ + session.setAttribute("mode","normal"); + }else{ + session.setAttribute("mode","expert"); + } + } // lets make a Context and put thedata into it String sql="select min(MOLECULE_ID) from MOLECULE"; *************** *** 77,80 **** --- 86,90 ---- session.setAttribute("spectrum","Format:\r\nShift(;Intensity)\r\nShift(;Intensity)"); } + context.put("mode",session.getAttribute("mode")); context.put("searchSpectrum", session.getAttribute("spectrum")); context.put("numberOfHits",session.getAttribute("numberOfHits")); |
|
From: Stefan K. <sh...@us...> - 2006-08-23 15:09:17
|
Update of /cvsroot/nmrshiftdb/nmrshiftdb/src/java/org/openscience/nmrshiftdb/om In directory sc8-pr-cvs7.sourceforge.net:/tmp/cvs-serv5590/src/java/org/openscience/nmrshiftdb/om Modified Files: DBSpectrum.java Log Message: fixes bug #1544375 Index: DBSpectrum.java =================================================================== RCS file: /cvsroot/nmrshiftdb/nmrshiftdb/src/java/org/openscience/nmrshiftdb/om/DBSpectrum.java,v retrieving revision 1.184 retrieving revision 1.185 diff -C2 -r1.184 -r1.185 *** DBSpectrum.java 22 Aug 2006 12:58:17 -0000 1.184 --- DBSpectrum.java 23 Aug 2006 15:09:11 -0000 1.185 *************** *** 1397,1401 **** } } ! return(appletstring.substring(0,appletstring.length()-2)); } --- 1397,1401 ---- } } ! return(appletstring.substring(0,appletstring.length()-1)); } |
|
From: Stefan K. <sh...@us...> - 2006-08-23 14:05:03
|
Update of /cvsroot/nmrshiftdb/nmrshiftdb/src/vmtemplates In directory sc8-pr-cvs7.sourceforge.net:/tmp/cvs-serv11326/src/vmtemplates Modified Files: homeportlet.vm Log Message: fixes bug #1519798 Index: homeportlet.vm =================================================================== RCS file: /cvsroot/nmrshiftdb/nmrshiftdb/src/vmtemplates/homeportlet.vm,v retrieving revision 1.40 retrieving revision 1.41 diff -C2 -r1.40 -r1.41 *** homeportlet.vm 23 Jun 2006 12:53:42 -0000 1.40 --- homeportlet.vm 23 Aug 2006 14:04:55 -0000 1.41 *************** *** 16,20 **** </td> <td> ! <h2 style="color:#0000AA">About NMRShiftDB</h2><p>NMRShiftDB is a web database for organic structures and their nuclear magnetic resonance (nmr) spectra. It allows for spectrum prediction (currently only for carbon) as well as for searching spectra, structures and other properties. Last not least, it features peer-reviewed submission of datasets by its users. The NMRShiftDB software is open source, the data is published under an open content license. Please consult the <a href="portal/pane0/Help">documentation</a> for more detailed information.</p> <h2 style="color:#0000AA">News about NMRShiftDB</h2> #include("news.html") --- 16,20 ---- </td> <td> ! <h2 style="color:#0000AA">About NMRShiftDB</h2><p>NMRShiftDB is a web database for organic structures and their nuclear magnetic resonance (nmr) spectra. It allows for spectrum prediction ($predictablenuclei) as well as for searching spectra, structures and other properties. Last not least, it features peer-reviewed submission of datasets by its users. The NMRShiftDB software is open source, the data is published under an open content license. Please consult the <a href="portal/pane0/Help">documentation</a> for more detailed information.</p> <h2 style="color:#0000AA">News about NMRShiftDB</h2> #include("news.html") |
|
From: Stefan K. <sh...@us...> - 2006-08-23 14:05:03
|
Update of /cvsroot/nmrshiftdb/nmrshiftdb/src/java/org/openscience/nmrshiftdb/daemons In directory sc8-pr-cvs7.sourceforge.net:/tmp/cvs-serv11326/src/java/org/openscience/nmrshiftdb/daemons Modified Files: BuildHomeDaemon.java Log Message: fixes bug #1519798 Index: BuildHomeDaemon.java =================================================================== RCS file: /cvsroot/nmrshiftdb/nmrshiftdb/src/java/org/openscience/nmrshiftdb/daemons/BuildHomeDaemon.java,v retrieving revision 1.50 retrieving revision 1.51 diff -C2 -r1.50 -r1.51 *** BuildHomeDaemon.java 23 Jun 2006 12:16:43 -0000 1.50 --- BuildHomeDaemon.java 23 Aug 2006 14:04:55 -0000 1.51 *************** *** 41,44 **** --- 41,46 ---- import org.openscience.nmrshiftdb.om.DBSpectrumDBKeywordPeer; import org.openscience.nmrshiftdb.om.DBSpectrumPeer; + import org.openscience.nmrshiftdb.om.DBSpectrumType; + import org.openscience.nmrshiftdb.om.DBSpectrumTypePeer; import org.openscience.nmrshiftdb.om.NmrshiftdbUserPeer; import org.openscience.nmrshiftdb.util.Export; *************** *** 102,105 **** --- 104,113 ---- context.put("mode","all"); context.put("urltool",urltool); + Vector v=DBSpectrumTypePeer.doSelect(new Criteria()); + StringBuffer nuclei=new StringBuffer(); + for(int i=0;i<v.size();i++){ + nuclei.append(((DBSpectrumType)v.get(i)).getName()+", "); + } + context.put("predictablenuclei",GeneralUtils.removeLastComma(nuclei).toString()); // lets render the template try{ |
|
From: Stefan K. <sh...@us...> - 2006-08-22 12:58:20
|
Update of /cvsroot/nmrshiftdb/nmrshiftdb/src/html In directory sc8-pr-cvs7.sourceforge.net:/tmp/cvs-serv3555/src/html Modified Files: spectrumapplet.jar Log Message: made the spectrum detachable (sab suggestion) Index: spectrumapplet.jar =================================================================== RCS file: /cvsroot/nmrshiftdb/nmrshiftdb/src/html/spectrumapplet.jar,v retrieving revision 1.44 retrieving revision 1.45 diff -C2 -r1.44 -r1.45 Binary files /tmp/cvs6NcdnI and /tmp/cvsqK3eeP differ |
|
From: Stefan K. <sh...@us...> - 2006-08-22 12:58:20
|
Update of /cvsroot/nmrshiftdb/nmrshiftdb/src/vmtemplates In directory sc8-pr-cvs7.sourceforge.net:/tmp/cvs-serv3555/src/vmtemplates Modified Files: details.vm predict.vm Log Message: made the spectrum detachable (sab suggestion) Index: details.vm =================================================================== RCS file: /cvsroot/nmrshiftdb/nmrshiftdb/src/vmtemplates/details.vm,v retrieving revision 1.158 retrieving revision 1.159 diff -C2 -r1.158 -r1.159 *** details.vm 14 Aug 2006 09:42:32 -0000 1.158 --- details.vm 22 Aug 2006 12:58:17 -0000 1.159 *************** *** 224,227 **** --- 224,228 ---- <td> #if($data.getSession().getAttribute("applet")=="applet") + <span style="color:#0000AA">Double click to get resizeable window!</span><br> <script LANGUAGE="JavaScript1.1"> spectrumapplet_name = "Spectrum$velocityCount"; Index: predict.vm =================================================================== RCS file: /cvsroot/nmrshiftdb/nmrshiftdb/src/vmtemplates/predict.vm,v retrieving revision 1.81 retrieving revision 1.82 diff -C2 -r1.81 -r1.82 *** predict.vm 27 Jun 2006 14:29:17 -0000 1.81 --- predict.vm 22 Aug 2006 12:58:17 -0000 1.82 *************** *** 17,20 **** --- 17,23 ---- <td> #if($session.getAttribute("applet")=="applet") + #if($input=="0") + <span style="color:#0000AA">Double click to get resizeable window!</span><br> + #end <script src="./nmrshiftdbhtml/Jmol.js"></script> <script LANGUAGE="JavaScript1.1" SRC="nmrshiftdbhtml/marvin.js"></script> *************** *** 128,131 **** --- 131,135 ---- <br> #if($session.getAttribute("applet")=="applet") + <span style="color:#0000AA">Double click to get resizeable window!</span><br> <script LANGUAGE="JavaScript1.1"> spectrumapplet_name = "Spectrum"; |
|
From: Stefan K. <sh...@us...> - 2006-08-22 12:58:19
|
Update of /cvsroot/nmrshiftdb/nmrshiftdb/src/java/org/openscience/nmrshiftdb/om In directory sc8-pr-cvs7.sourceforge.net:/tmp/cvs-serv3555/src/java/org/openscience/nmrshiftdb/om Modified Files: DBSpectrum.java Log Message: made the spectrum detachable (sab suggestion) Index: DBSpectrum.java =================================================================== RCS file: /cvsroot/nmrshiftdb/nmrshiftdb/src/java/org/openscience/nmrshiftdb/om/DBSpectrum.java,v retrieving revision 1.183 retrieving revision 1.184 diff -C2 -r1.183 -r1.184 *** DBSpectrum.java 18 Aug 2006 10:45:24 -0000 1.183 --- DBSpectrum.java 22 Aug 2006 12:58:17 -0000 1.184 *************** *** 248,251 **** --- 248,252 ---- StringBuffer delta = new StringBuffer(); StringBuffer multis = new StringBuffer(); + double[] prediction=null; for (int l = 0; l < neighbouringAtoms.size(); l++) { if (((DBAtom) neighbouringAtoms.get(l)).getSymbol().equals("H")) { *************** *** 266,270 **** }else{ StringBuffer comment=new StringBuffer(); ! double[] prediction = AtomUtils.predictRange(getDBMolecule().getAsCDKMolecule(1), getDBMolecule().getAsCDKMolecule(1).getAtomAt(((DBAtom) neighbouringAtoms.get(l)).getMdlNumber()), false, true, null, comment, false, true, runData, null, -1, true,null, ((Boolean)runData.getSession().getAttribute("trueonly")).booleanValue()); searchShift.append(new String(format.format(prediction[0]) + "-<b>" + format.format(prediction[1]) + "</b>-" + format.format(prediction[2])) + "; " + comment); } --- 267,271 ---- }else{ StringBuffer comment=new StringBuffer(); ! prediction = AtomUtils.predictRange(getDBMolecule().getAsCDKMolecule(1), getDBMolecule().getAsCDKMolecule(1).getAtomAt(((DBAtom) neighbouringAtoms.get(l)).getMdlNumber()), false, true, null, comment, false, true, runData, null, -1, true,null, ((Boolean)runData.getSession().getAttribute("trueonly")).booleanValue()); searchShift.append(new String(format.format(prediction[0]) + "-<b>" + format.format(prediction[1]) + "</b>-" + format.format(prediction[2])) + "; " + comment); } *************** *** 297,301 **** v.add(new ValuesForVelocityBean(new Float(atomnumber), searchShift.toString(), 0, 0, displayString.toString(), (atomnumber + 1) + (isHSpectrum ? "-H" : ""), delta.toString(), GeneralUtils.removeLastComma(multis).toString())); } else { ! v.add(new ValuesForVelocityBean(new Float(atomnumber), "No data available", 0, 1000, displayString.toString(), (atomnumber + 1) + (isHSpectrum ? "-H" : ""), delta.toString(), GeneralUtils.removeLastComma(multis).toString())); } ((ValuesForVelocityBean) v.get(v.size() - 1)).setIntensity(GeneralUtils.removeLastComma(intensities).toString()); --- 298,302 ---- v.add(new ValuesForVelocityBean(new Float(atomnumber), searchShift.toString(), 0, 0, displayString.toString(), (atomnumber + 1) + (isHSpectrum ? "-H" : ""), delta.toString(), GeneralUtils.removeLastComma(multis).toString())); } else { ! v.add(new ValuesForVelocityBean(new Float(atomnumber), searchShift.toString(), prediction[0], prediction[2], displayString.toString(), (atomnumber + 1) + (isHSpectrum ? "-H" : ""), delta.toString(), GeneralUtils.removeLastComma(multis).toString())); } ((ValuesForVelocityBean) v.get(v.size() - 1)).setIntensity(GeneralUtils.removeLastComma(intensities).toString()); |
|
From: Stefan K. <sh...@us...> - 2006-08-22 12:41:15
|
Update of /cvsroot/nmrshiftdb/spectrumapplet/src/java/org/openscience/nmrshiftdb/spectrumapplet/renderer In directory sc8-pr-cvs7.sourceforge.net:/tmp/cvs-serv27695/src/java/org/openscience/nmrshiftdb/spectrumapplet/renderer Modified Files: SpectrumNavigation.java Log Message: added a title to the detach window Index: SpectrumNavigation.java =================================================================== RCS file: /cvsroot/nmrshiftdb/spectrumapplet/src/java/org/openscience/nmrshiftdb/spectrumapplet/renderer/SpectrumNavigation.java,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -r1.4 -r1.5 *** SpectrumNavigation.java 22 Aug 2006 12:33:24 -0000 1.4 --- SpectrumNavigation.java 22 Aug 2006 12:41:02 -0000 1.5 *************** *** 659,663 **** SpectrumNavigation panel; Container parent; ! JFrame frame = new JFrame(); --- 659,663 ---- SpectrumNavigation panel; Container parent; ! JFrame frame = new JFrame("SpectrumApplet window"); |
|
From: Stefan K. <sh...@us...> - 2006-08-22 12:33:30
|
Update of /cvsroot/nmrshiftdb/spectrumapplet/src/java/org/openscience/nmrshiftdb/spectrumapplet/renderer In directory sc8-pr-cvs7.sourceforge.net:/tmp/cvs-serv24154/src/java/org/openscience/nmrshiftdb/spectrumapplet/renderer Modified Files: SpectrumNavigation.java Log Message: working undocking Index: SpectrumNavigation.java =================================================================== RCS file: /cvsroot/nmrshiftdb/spectrumapplet/src/java/org/openscience/nmrshiftdb/spectrumapplet/renderer/SpectrumNavigation.java,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -r1.3 -r1.4 *** SpectrumNavigation.java 21 Aug 2006 15:18:41 -0000 1.3 --- SpectrumNavigation.java 22 Aug 2006 12:33:24 -0000 1.4 *************** *** 289,294 **** sprPrediction.getMetrics().getXmaxInitial()); } ! MouseListener popupListener = new PopupListener(this, outerpanel); ((AbstractRenderer)sprPrediction).addMouseListener(popupListener); } --- 289,297 ---- sprPrediction.getMetrics().getXmaxInitial()); } ! MouseListener popupListener = new PopupListener(this); ((AbstractRenderer)sprPrediction).addMouseListener(popupListener); + if (sprExperimental != null) { + ((AbstractRenderer)sprExperimental).addMouseListener(popupListener); + } } *************** *** 659,665 **** ! public PopupListener(SpectrumNavigation panel, Container parent){ this.panel = panel; - this.parent=parent; } --- 662,667 ---- ! public PopupListener(SpectrumNavigation panel){ this.panel = panel; } *************** *** 671,686 **** public void mousePressed(MouseEvent e) { if (e.getButton() == 1 && e.getClickCount() == 2) { ! frame.setSize(parent.getSize()); frame.addWindowListener( new WindowAdapter() { public void windowClosing(WindowEvent e) { ! (panel).getParent().add(panel); ! (panel).getParent().repaint(); ! PopupListener.this.frame.hide(); } }); ! (panel).getParent().remove(panel); frame.add(panel); ! frame.show(); } } --- 673,691 ---- public void mousePressed(MouseEvent e) { if (e.getButton() == 1 && e.getClickCount() == 2) { ! frame.setSize((panel).getParent().getSize()); frame.addWindowListener( new WindowAdapter() { public void windowClosing(WindowEvent e) { ! parent.add(panel); ! parent.repaint(); ! PopupListener.this.frame.setVisible(false); } }); ! this.parent=panel.getParent(); ! (panel).getParent().remove(panel); frame.add(panel); ! frame.pack(); ! frame.setVisible(true); ! frame.toFront(); } } |
|
From: Stefan K. <sh...@us...> - 2006-08-21 15:18:50
|
Update of /cvsroot/nmrshiftdb/spectrumapplet In directory sc8-pr-cvs7.sourceforge.net:/tmp/cvs-serv1853 Modified Files: build.xml Log Message: started making applet detacheable Index: build.xml =================================================================== RCS file: /cvsroot/nmrshiftdb/spectrumapplet/build.xml,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -r1.10 -r1.11 *** build.xml 15 Sep 2005 10:46:55 -0000 1.10 --- build.xml 21 Aug 2006 15:18:41 -0000 1.11 *************** *** 35,39 **** <delete file="${srcTemp}/org/openscience/nmrshiftdb/spectrumapplet/SpectrumView.java"/> <delete file="${srcTemp}/org/openscience/nmrshiftdb/spectrumapplet/util/JChemPaintWrapper.java"/> ! <javac srcdir="${srcTemp}" destdir="${build}" target="1.2" optimize="on" debug="off" deprecation="on"> <classpath refid="project.class.path" /> </javac> --- 35,39 ---- <delete file="${srcTemp}/org/openscience/nmrshiftdb/spectrumapplet/SpectrumView.java"/> <delete file="${srcTemp}/org/openscience/nmrshiftdb/spectrumapplet/util/JChemPaintWrapper.java"/> ! <javac srcdir="${srcTemp}" destdir="${build}" target="1.2" optimize="on" debug="off" deprecation="on" source="1.2"> <classpath refid="project.class.path" /> </javac> *************** *** 44,48 **** <delete file="${srcTemp}/MarvinWrapper.java"/> <delete file="${srcTemp}/SpectrumView.java"/> ! <javac srcdir="${srcTemp}" destdir="${build}" target="1.2" optimize="on" debug="off" deprecation="on"> <classpath refid="project.class.path" /> </javac> --- 44,48 ---- <delete file="${srcTemp}/MarvinWrapper.java"/> <delete file="${srcTemp}/SpectrumView.java"/> ! <javac srcdir="${srcTemp}" destdir="${build}" target="1.2" optimize="on" debug="off" deprecation="on" source="1.2"> <classpath refid="project.class.path" /> </javac> |
|
From: Stefan K. <sh...@us...> - 2006-08-21 15:18:50
|
Update of /cvsroot/nmrshiftdb/spectrumapplet/src/java/org/openscience/nmrshiftdb/spectrumapplet In directory sc8-pr-cvs7.sourceforge.net:/tmp/cvs-serv1853/src/java/org/openscience/nmrshiftdb/spectrumapplet Modified Files: SpectrumViewNoRenderer.java Log Message: started making applet detacheable Index: SpectrumViewNoRenderer.java =================================================================== RCS file: /cvsroot/nmrshiftdb/spectrumapplet/src/java/org/openscience/nmrshiftdb/spectrumapplet/SpectrumViewNoRenderer.java,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -r1.1 -r1.2 *** SpectrumViewNoRenderer.java 28 Jun 2005 14:41:35 -0000 1.1 --- SpectrumViewNoRenderer.java 21 Aug 2006 15:18:41 -0000 1.2 *************** *** 20,28 **** package org.openscience.nmrshiftdb.spectrumapplet; ! import java.awt.*; ! import javax.swing.*; ! import org.openscience.nmrshiftdb.spectrumapplet.renderer.*; ! import org.openscience.nmrshiftdb.spectrumapplet.renderer.nmr.*; ! import org.openscience.nmrshiftdb.spectrumapplet.util.*; /** --- 20,39 ---- package org.openscience.nmrshiftdb.spectrumapplet; ! import java.awt.BorderLayout; ! import java.awt.Component; ! import java.awt.Container; ! import java.awt.event.MouseAdapter; ! import java.awt.event.MouseEvent; ! import java.awt.event.MouseListener; ! import java.awt.event.WindowAdapter; ! import java.awt.event.WindowEvent; ! ! import javax.swing.JApplet; ! import javax.swing.JFrame; ! ! import org.openscience.nmrshiftdb.spectrumapplet.renderer.SpectrumControler; ! import org.openscience.nmrshiftdb.spectrumapplet.renderer.SpectrumNavigation; ! import org.openscience.nmrshiftdb.spectrumapplet.renderer.nmr.NmrSpecRenderer; ! import org.openscience.nmrshiftdb.spectrumapplet.util.SpectrumApplet; /** *************** *** 133,136 **** */ public void removeHighlightingInStructur() { ! } } --- 144,147 ---- */ public void removeHighlightingInStructur() { ! } } |
|
From: Stefan K. <sh...@us...> - 2006-08-21 15:18:49
|
Update of /cvsroot/nmrshiftdb/spectrumapplet/src/java/org/openscience/nmrshiftdb/spectrumapplet/renderer In directory sc8-pr-cvs7.sourceforge.net:/tmp/cvs-serv1853/src/java/org/openscience/nmrshiftdb/spectrumapplet/renderer Modified Files: SpectrumNavigation.java Log Message: started making applet detacheable Index: SpectrumNavigation.java =================================================================== RCS file: /cvsroot/nmrshiftdb/spectrumapplet/src/java/org/openscience/nmrshiftdb/spectrumapplet/renderer/SpectrumNavigation.java,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -r1.2 -r1.3 *** SpectrumNavigation.java 5 Jul 2005 08:01:02 -0000 1.2 --- SpectrumNavigation.java 21 Aug 2006 15:18:41 -0000 1.3 *************** *** 20,36 **** package org.openscience.nmrshiftdb.spectrumapplet.renderer; ! import org.openscience.nmrshiftdb.spectrumapplet.data.*; ! import org.openscience.nmrshiftdb.spectrumapplet.data.ir.*; ! import org.openscience.nmrshiftdb.spectrumapplet.data.nmr.*; ! import org.openscience.nmrshiftdb.spectrumapplet.renderer.dialog.*; ! import org.openscience.nmrshiftdb.spectrumapplet.renderer.ir.*; ! import org.openscience.nmrshiftdb.spectrumapplet.renderer.nmr.*; ! import org.openscience.nmrshiftdb.spectrumapplet.renderer.painter.*; ! import org.openscience.nmrshiftdb.spectrumapplet.util.*; ! ! import javax.swing.*; ! ! import java.awt.*; ! import java.awt.event.*; /** --- 20,64 ---- package org.openscience.nmrshiftdb.spectrumapplet.renderer; ! import java.awt.BorderLayout; ! import java.awt.Color; ! import java.awt.Component; ! import java.awt.Container; ! import java.awt.Dimension; ! import java.awt.FlowLayout; ! import java.awt.Graphics; ! import java.awt.Graphics2D; ! import java.awt.Panel; ! import java.awt.event.KeyAdapter; ! import java.awt.event.KeyEvent; ! import java.awt.event.MouseAdapter; ! import java.awt.event.MouseEvent; ! import java.awt.event.MouseListener; ! import java.awt.event.WindowAdapter; ! import java.awt.event.WindowEvent; ! ! import javax.swing.JApplet; ! import javax.swing.JFrame; ! import javax.swing.JPanel; ! ! import org.openscience.nmrshiftdb.spectrumapplet.data.AbstractDataContainer; ! import org.openscience.nmrshiftdb.spectrumapplet.data.DataContainer; ! import org.openscience.nmrshiftdb.spectrumapplet.data.ir.RawIRdata; ! import org.openscience.nmrshiftdb.spectrumapplet.data.nmr.NmrData; ! import org.openscience.nmrshiftdb.spectrumapplet.data.nmr.NmrPeak; ! import org.openscience.nmrshiftdb.spectrumapplet.data.nmr.Prediction; ! import org.openscience.nmrshiftdb.spectrumapplet.data.nmr.RawNmrData; ! import org.openscience.nmrshiftdb.spectrumapplet.renderer.dialog.OptionDialogExt; ! import org.openscience.nmrshiftdb.spectrumapplet.renderer.ir.IrRawDataDetailSpectrum; ! import org.openscience.nmrshiftdb.spectrumapplet.renderer.ir.IrRawDataNavigationSpectrum; ! import org.openscience.nmrshiftdb.spectrumapplet.renderer.nmr.AbstractRenderer; ! import org.openscience.nmrshiftdb.spectrumapplet.renderer.nmr.NmrDetailSpectrum; ! import org.openscience.nmrshiftdb.spectrumapplet.renderer.nmr.NmrNavigationSpectrum; ! import org.openscience.nmrshiftdb.spectrumapplet.renderer.nmr.NmrRawDataDetailSpectrum; ! import org.openscience.nmrshiftdb.spectrumapplet.renderer.nmr.NmrRawDataNavigationSpectrum; ! import org.openscience.nmrshiftdb.spectrumapplet.renderer.nmr.NmrSpecRenderer; ! import org.openscience.nmrshiftdb.spectrumapplet.renderer.painter.CorrelationControler; ! import org.openscience.nmrshiftdb.spectrumapplet.util.CommonUtils; ! import org.openscience.nmrshiftdb.spectrumapplet.util.ParserUtil; ! import org.openscience.nmrshiftdb.spectrumapplet.util.SpectrumApplet; /** *************** *** 243,261 **** private void initGraphic() { ! setLayout(new BorderLayout()); //setMinimumSize(new Dimension(150, 200)); ! add((Component) nav, BorderLayout.NORTH); activateKeyListener(sprPrediction); if (sprExperimental != null) { ! add((Component) sprExperimental, BorderLayout.CENTER); ! add((Component) sprPrediction, BorderLayout.SOUTH); nav.getZoomMarker().initializeRange(sprExperimental.getMetrics().getXminInitial(), sprExperimental.getMetrics().getXmaxInitial()); } else { ! add((Component) sprPrediction, BorderLayout.CENTER); nav.getZoomMarker().initializeRange(sprPrediction.getMetrics().getXminInitial(), sprPrediction.getMetrics().getXmaxInitial()); } } --- 271,294 ---- private void initGraphic() { ! setLayout(new FlowLayout()); ! Panel outerpanel=new Panel(); ! add(outerpanel); ! outerpanel.setLayout(new BorderLayout()); //setMinimumSize(new Dimension(150, 200)); ! outerpanel.add((Component) nav, BorderLayout.NORTH); activateKeyListener(sprPrediction); if (sprExperimental != null) { ! outerpanel.add((Component) sprExperimental, BorderLayout.CENTER); ! outerpanel.add((Component) sprPrediction, BorderLayout.SOUTH); nav.getZoomMarker().initializeRange(sprExperimental.getMetrics().getXminInitial(), sprExperimental.getMetrics().getXmaxInitial()); } else { ! outerpanel.add((Component) sprPrediction, BorderLayout.CENTER); nav.getZoomMarker().initializeRange(sprPrediction.getMetrics().getXminInitial(), sprPrediction.getMetrics().getXmaxInitial()); } + MouseListener popupListener = new PopupListener(this, outerpanel); + ((AbstractRenderer)sprPrediction).addMouseListener(popupListener); } *************** *** 614,616 **** --- 647,688 ---- } } + + /** + * For detaching + * + */ + public class PopupListener extends MouseAdapter { + + SpectrumNavigation panel; + Container parent; + JFrame frame = new JFrame(); + + + public PopupListener(SpectrumNavigation panel, Container parent){ + this.panel = panel; + this.parent=parent; + } + + /** + * Description of the Method + * + *@param e Description of the Parameter + */ + public void mousePressed(MouseEvent e) { + if (e.getButton() == 1 && e.getClickCount() == 2) { + frame.setSize(parent.getSize()); + frame.addWindowListener( + new WindowAdapter() { + public void windowClosing(WindowEvent e) { + (panel).getParent().add(panel); + (panel).getParent().repaint(); + PopupListener.this.frame.hide(); + } + }); + (panel).getParent().remove(panel); + frame.add(panel); + frame.show(); + } + } + } } |