From: Mark G. <mg...@us...> - 2002-02-28 22:08:04
|
Update of /cvsroot/gmod/apollo/src/java/apollo/gui/schemes In directory usw-pr-cvs1:/tmp/cvs-serv18795/schemes Modified Files: Tag: sanger_branch PropertyScheme.java Log Message: Basically I added the ability for a gene that was queried from a dataadapter as input to be selected when the data came up. Data adapters have new functionality where input type and input can be queried for and that is used. If input type is GENE then the gene is selected. Sometimes the gene was vertically scrolled off screen, so I added functionality to make sure the selection was scrolled into view, which ended up in SelectViewI. The find functionality in FindPanel was moved to StrandedZoomableApolloPanel so it could be used for this new purpose as well. It was also changed to deal with the slightly different find functions in FeatureSet, that now return all features with a name, not just the first one found. I also changed the SelectionEvent. Before it would get the genes subparts and send those in the event. Now it sends the gene itself. EvidencePanel and SetDetailPanel had to be modified to be able to deal with this. Previously they would get a feature's ref feature(parent) and display that. This won't work for Gene as its ref feature is not what you want to display(its a holder of all the genes and has no "type"), you just want to display the Gene itself. So I added a hasType() method to SeqFeatureI, and if the ref feature has no type then it uses the feature itself. I was hoping that would make it more general than just checking for instanceof Gene. Index: PropertyScheme.java =================================================================== RCS file: /cvsroot/gmod/apollo/src/java/apollo/gui/schemes/PropertyScheme.java,v retrieving revision 1.1.2.13 retrieving revision 1.1.2.14 diff -C2 -d -r1.1.2.13 -r1.1.2.14 *** PropertyScheme.java 22 Aug 2001 19:34:12 -0000 1.1.2.13 --- PropertyScheme.java 28 Feb 2002 22:00:41 -0000 1.1.2.14 *************** *** 10,13 **** --- 10,15 ---- implements Observer, Serializable { + private static final boolean DEBUG = true; + private static Vector tiersVect = new Vector(); private static Hashtable tiersHash = new Hashtable(); *************** *** 101,110 **** if (fp == null) { ! if (analysis_type.equals (SeqFeatureI.NO_TYPE)) { try { throw new Exception ("Can't create featureProperty for " + analysis_type); } catch (Exception e) { ! e.printStackTrace(); } // SMJS TEMP System.exit (1); --- 103,114 ---- if (fp == null) { ! // Isnt this stack trace only interesting to developers? ! // I dont think users need to see it ! if (DEBUG && analysis_type.equals (SeqFeatureI.NO_TYPE)) { try { throw new Exception ("Can't create featureProperty for " + analysis_type); } catch (Exception e) { ! e.printStackTrace(); // could just do: new Throwable().printStackTrace() } // SMJS TEMP System.exit (1); |