if(alignPanel.overviewPanel!=null)\r
alignPanel.overviewPanel.updateOverviewImage();\r
\r
- Provenance prov = viewport.alignment.getProvenance();\r
- if(prov == null)\r
- {\r
- prov = new Provenance();\r
- viewport.alignment.setProvenance(prov);\r
- }\r
-\r
- prov.addEntry("Me",\r
- "Edited in Jalview", new java.util.Date(), "myID");\r
-\r
alignPanel.repaint();\r
}\r
\r
int fSize = allFeatures.size();\r
\r
String type;\r
+ boolean originalExists = false;\r
+ if(originalData!=null)\r
+ originalExists = true;\r
+ else\r
+ originalData = new Object[fSize][3];\r
+\r
Object [][] data = new Object[fSize][3];\r
- originalData = new Object[fSize][3];\r
for(int i=0; i<fSize; i++)\r
{\r
type = allFeatures.elementAt(i).toString();\r
else\r
data[i][2] = new Boolean(true);\r
\r
- originalData[i][0]=type;\r
- originalData[i][1]=col;\r
- if(fr.featuresDisplayed!=null)\r
- originalData[i][2] = new Boolean(fr.featuresDisplayed.contains(type));\r
- else\r
- originalData[i][2] = new Boolean(true);\r
+ if(!originalExists)\r
+ {\r
+ originalData[i][0] = type;\r
+ originalData[i][1] = col;\r
+ if (fr.featuresDisplayed != null)\r
+ originalData[i][2] = new Boolean(fr.featuresDisplayed.contains(type));\r
+ else\r
+ originalData[i][2] = new Boolean(true);\r
+ }\r
}\r
////////////////////////////////////\r
//Now build the table\r
view.setShowText(av.getShowText());\r
view.setWrapAlignment(av.getWrapAlignment());\r
\r
+ if(af.alignPanel.seqPanel.seqCanvas.getFeatureRenderer().featuresDisplayed!=null)\r
+ {\r
+ jalview.binding.FeatureSettings fs = new jalview.binding.FeatureSettings();\r
+\r
+ Enumeration e = af.alignPanel.seqPanel.seqCanvas.getFeatureRenderer().featureColours.keys();\r
+ while (e.hasMoreElements())\r
+ {\r
+ String type = e.nextElement().toString();\r
+ Setting setting = new Setting();\r
+ setting.setType(type);\r
+ setting.setColour(\r
+ af.alignPanel.seqPanel.seqCanvas.getFeatureRenderer().getColour(type).getRGB()\r
+ );\r
+ setting.setDisplay(\r
+ af.alignPanel.seqPanel.seqCanvas.getFeatureRenderer().featuresDisplayed.contains(type)\r
+ );\r
+\r
+ fs.addSetting(setting);\r
+\r
+ }\r
+ jms.setFeatureSettings(fs);\r
+\r
+ }\r
+\r
jms.addViewport(view);\r
\r
+\r
object.setJalviewModelSequence(jms);\r
object.getVamsasModel().addSequenceSet(vamsasSet);\r
\r
\r
AlignFrame af = new AlignFrame(al);\r
\r
+\r
// af.changeColour() );\r
/////////////////////////\r
//LOAD GROUPS\r
af.sequenceFeatures.setSelected(true);\r
}\r
\r
+ if(jms.getFeatureSettings()!=null)\r
+ {\r
+ af.alignPanel.seqPanel.seqCanvas.getFeatureRenderer().featuresDisplayed = new Vector();\r
+ // af.alignPanel.seqPanel.seqCanvas.getFeatureRenderer().featuresDisplayed!=null)\r
+ // jalview.binding.FeatureSettings fs = new jalview.binding.FeatureSettings();\r
+ for(int fs=0; fs<jms.getFeatureSettings().getSettingCount(); fs++)\r
+ {\r
+ Setting setting = jms.getFeatureSettings().getSetting(fs);\r
+\r
+ af.alignPanel.seqPanel.seqCanvas.getFeatureRenderer().setColour(setting.getType(),\r
+ new java.awt.Color(setting.getColour()));\r
+ if(setting.getDisplay())\r
+ af.alignPanel.seqPanel.seqCanvas.getFeatureRenderer().featuresDisplayed.addElement(setting.getType());\r
+ }\r
+ }\r
+\r
Desktop.addInternalFrame(af, view.getTitle(),\r
view.getWidth(), view.getHeight());\r
\r
throws Exception\r
{\r
this.setLayout(gridBagLayout1);\r
+ DefaultListCellRenderer dlcr = new DefaultListCellRenderer();\r
+ dlcr.setHorizontalAlignment(DefaultListCellRenderer.CENTER);\r
+ database.setRenderer(dlcr);\r
+\r
database.setFont(new java.awt.Font("Verdana", Font.PLAIN, 11));\r
+ database.setMinimumSize(new Dimension(160, 21));\r
+ database.setPreferredSize(new Dimension(160, 21));\r
jLabel1.setFont(new java.awt.Font("Verdana", Font.ITALIC, 11));\r
jLabel1.setText(\r
"Separate multiple accession ids with semi colon \";\"");\r
, GridBagConstraints.WEST,\r
GridBagConstraints.NONE,\r
new Insets(7, 4, 0, 6), 77, 6));\r
- this.add(textfield, new GridBagConstraints(1, 1, 1, 1, 1.0, 0.0\r
- , GridBagConstraints.WEST,\r
- GridBagConstraints.HORIZONTAL,\r
- new Insets(0, 0, 0, 6), 221, 1));\r
this.add(jPanel1, new GridBagConstraints(0, 2, 2, 1, 1.0, 1.0\r
, GridBagConstraints.WEST,\r
GridBagConstraints.BOTH,\r
new Insets(7, -2, 7, 12), 241, -2));\r
+ this.add(textfield, new GridBagConstraints(1, 1, 1, 1, 1.0, 0.0\r
+ , GridBagConstraints.WEST,\r
+ GridBagConstraints.HORIZONTAL,\r
+ new Insets(0, 0, 0, 6), 200, 1));\r
this.add(database, new GridBagConstraints(0, 1, 1, 1, 1.0, 0.0\r
- , GridBagConstraints.CENTER,\r
+ , GridBagConstraints.WEST,\r
GridBagConstraints.NONE,\r
new Insets(0, 4, 0, 0), 1, 0));\r
}\r