package jalview.io;
-import jalview.api.AlignExportSettingI;
+import jalview.api.AlignExportSettingsI;
import jalview.api.AlignViewportI;
import jalview.api.AlignmentViewPanel;
import jalview.api.ComplexAlignFile;
import jalview.api.FeatureSettingsModelI;
import jalview.api.FeaturesDisplayedI;
import jalview.bin.BuildDetails;
+import jalview.datamodel.AlignExportSettingsAdapter;
import jalview.datamodel.AlignmentAnnotation;
import jalview.datamodel.AlignmentI;
import jalview.datamodel.Annotation;
-import jalview.datamodel.ColumnSelection;
+import jalview.datamodel.HiddenColumns;
import jalview.datamodel.HiddenSequences;
import jalview.datamodel.Sequence;
import jalview.datamodel.SequenceFeature;
import jalview.schemes.JalviewColourScheme;
import jalview.schemes.ResidueColourScheme;
import jalview.util.ColorUtils;
+import jalview.util.Format;
+import jalview.util.JSONUtils;
import jalview.viewmodel.seqfeatures.FeaturesDisplayed;
import java.awt.Color;
import java.util.Hashtable;
import java.util.Iterator;
import java.util.List;
+import java.util.Map;
import java.util.Vector;
-import org.json.simple.JSONArray;
-import org.json.simple.JSONObject;
-import org.json.simple.parser.JSONParser;
-
public class JSONFile extends AlignFile implements ComplexAlignFile
{
private static String version = new BuildDetails().getVersion();
- private String webstartUrl = "http://www.jalview.org/services/launchApp";
+ private String webstartUrl = "https://www.jalview.org/services/launchApp";
private String application = "Jalview";
private FeatureRenderer fr;
- private List<int[]> hiddenColumns;
-
- private ColumnSelection columnSelection;
+ private HiddenColumns hiddenColumns;
private List<String> hiddenSeqRefs;
try
{
AlignmentPojo jsonAlignmentPojo = new AlignmentPojo();
- AlignExportSettingI exportSettings = getExportSettings();
+ AlignExportSettingsI exportSettings = getExportSettings();
- // if no export settings were supplied use the following with all values
- // defaulting to true
+ /*
+ * if no export settings were supplied, provide an 'export all' setting
+ */
if (exportSettings == null)
{
- exportSettings = new AlignExportSettingI()
- {
- @Override
- public boolean isExportHiddenSequences()
- {
- return true;
- }
-
- @Override
- public boolean isExportHiddenColumns()
- {
- return true;
- }
-
- @Override
- public boolean isExportGroups()
- {
- return true;
- }
-
- @Override
- public boolean isExportFeatures()
- {
- return true;
- }
-
- @Override
- public boolean isExportAnnotations()
- {
- return true;
- }
-
- @Override
- public boolean isCancelled()
- {
- return false;
- }
- };
+ exportSettings = new AlignExportSettingsAdapter(true);
}
int count = 0;
// are not exported
if (globalColourScheme
.equalsIgnoreCase(JalviewColourScheme.RNAHelices.toString())
- || globalColourScheme
- .equalsIgnoreCase(JalviewColourScheme.TCoffee
- .toString()))
+ || globalColourScheme.equalsIgnoreCase(
+ JalviewColourScheme.TCoffee.toString()))
{
jsonAlignmentPojo.setGlobalColorScheme(ResidueColourScheme.NONE);
}
if (exportSettings.isExportFeatures())
{
- jsonAlignmentPojo
- .setSeqFeatures(sequenceFeatureToJsonPojo(sqs, fr));
+ jsonAlignmentPojo.setSeqFeatures(sequenceFeatureToJsonPojo(sqs));
}
if (exportSettings.isExportGroups() && seqGroups != null
jsonAlignmentPojo.getSeqGroups().add(seqGrpPojo);
}
}
- org.json.JSONObject generatedJSon = new org.json.JSONObject(
- jsonAlignmentPojo);
- jsonOutput = generatedJSon.toString();
+
+ jsonOutput = JSONUtils.stringify(jsonAlignmentPojo);
return jsonOutput.replaceAll("xstart", "xStart").replaceAll("xend",
"xEnd");
} catch (Exception e)
// hidden column business
if (getViewport().hasHiddenColumns())
{
- List<int[]> hiddenCols = getViewport().getColumnSelection()
- .getHiddenColumns();
- StringBuilder hiddenColsBuilder = new StringBuilder();
- for (int[] range : hiddenCols)
- {
- hiddenColsBuilder.append(";").append(range[0]).append("-")
- .append(range[1]);
- }
-
- hiddenColsBuilder.deleteCharAt(0);
- hiddenSections[0] = hiddenColsBuilder.toString();
+ hiddenSections[0] = getViewport().getAlignment().getHiddenColumns()
+ .regionsToString(";", "-");
}
// hidden rows/seqs business
return hiddenSections;
}
- public List<SequenceFeaturesPojo> sequenceFeatureToJsonPojo(
- SequenceI[] sqs, FeatureRenderer fr)
+ protected List<SequenceFeaturesPojo> sequenceFeatureToJsonPojo(
+ SequenceI[] sqs)
{
displayedFeatures = (fr == null) ? null : fr.getFeaturesDisplayed();
- List<SequenceFeaturesPojo> sequenceFeaturesPojo = new ArrayList<SequenceFeaturesPojo>();
+ List<SequenceFeaturesPojo> sequenceFeaturesPojo = new ArrayList<>();
if (sqs == null)
{
return sequenceFeaturesPojo;
FeatureColourFinder finder = new FeatureColourFinder(fr);
+ String[] visibleFeatureTypes = displayedFeatures == null ? null
+ : displayedFeatures.getVisibleFeatures().toArray(
+ new String[displayedFeatures.getVisibleFeatureCount()]);
+
for (SequenceI seq : sqs)
{
- SequenceI dataSetSequence = seq.getDatasetSequence();
- SequenceFeature[] seqFeatures = (dataSetSequence == null) ? null
- : seq.getDatasetSequence().getSequenceFeatures();
-
- seqFeatures = (seqFeatures == null) ? seq.getSequenceFeatures()
- : seqFeatures;
- if (seqFeatures == null)
- {
- continue;
- }
-
+ /*
+ * get all features currently visible (and any non-positional features)
+ */
+ List<SequenceFeature> seqFeatures = seq.getFeatures()
+ .getAllFeatures(visibleFeatureTypes);
for (SequenceFeature sf : seqFeatures)
{
- if (displayedFeatures != null
- && displayedFeatures.isVisible(sf.getType()))
- {
- SequenceFeaturesPojo jsonFeature = new SequenceFeaturesPojo(
- String.valueOf(seq.hashCode()));
-
- String featureColour = (fr == null) ? null : jalview.util.Format
- .getHexString(finder.findFeatureColour(Color.white, seq,
- seq.findIndex(sf.getBegin())));
- jsonFeature.setXstart(seq.findIndex(sf.getBegin()) - 1);
- jsonFeature.setXend(seq.findIndex(sf.getEnd()));
- jsonFeature.setType(sf.getType());
- jsonFeature.setDescription(sf.getDescription());
- jsonFeature.setLinks(sf.links);
- jsonFeature.setOtherDetails(sf.otherDetails);
- jsonFeature.setScore(sf.getScore());
- jsonFeature.setFillColor(featureColour);
- jsonFeature.setFeatureGroup(sf.getFeatureGroup());
- sequenceFeaturesPojo.add(jsonFeature);
- }
+ SequenceFeaturesPojo jsonFeature = new SequenceFeaturesPojo(
+ String.valueOf(seq.hashCode()));
+
+ String featureColour = (fr == null) ? null
+ : Format.getHexString(finder.findFeatureColour(Color.white,
+ seq, seq.findIndex(sf.getBegin())));
+ int xStart = sf.getBegin() == 0 ? 0
+ : seq.findIndex(sf.getBegin()) - 1;
+ int xEnd = sf.getEnd() == 0 ? 0 : seq.findIndex(sf.getEnd());
+ jsonFeature.setXstart(xStart);
+ jsonFeature.setXend(xEnd);
+ jsonFeature.setType(sf.getType());
+ jsonFeature.setDescription(sf.getDescription());
+ jsonFeature.setLinks(sf.links);
+ jsonFeature.setOtherDetails(sf.otherDetails);
+ jsonFeature.setScore(sf.getScore());
+ jsonFeature.setFillColor(featureColour);
+ jsonFeature.setFeatureGroup(sf.getFeatureGroup());
+ sequenceFeaturesPojo.add(jsonFeature);
}
}
return sequenceFeaturesPojo;
public static List<AlignmentAnnotationPojo> annotationToJsonPojo(
Vector<AlignmentAnnotation> annotations)
{
- List<AlignmentAnnotationPojo> jsonAnnotations = new ArrayList<AlignmentAnnotationPojo>();
+ List<AlignmentAnnotationPojo> jsonAnnotations = new ArrayList<>();
if (annotations == null)
{
return jsonAnnotations;
annotationPojo.setDisplayCharacter(displayChar);
if (annotation.colour != null)
{
- annotationPojo.setColour(jalview.util.Format
- .getHexString(annotation.colour));
+ annotationPojo.setColour(
+ jalview.util.Format.getHexString(annotation.colour));
}
alignAnnotPojo.getAnnotations().add(annotationPojo);
}
{
try
{
- JSONParser jsonParser = new JSONParser();
- JSONObject alignmentJsonObj = (JSONObject) jsonParser
+ Map<String, Object> alignmentJsonObj = (Map<String, Object>) JSONUtils
.parse(jsonAlignmentString);
- JSONArray seqJsonArray = (JSONArray) alignmentJsonObj.get("seqs");
- JSONArray alAnnotJsonArray = (JSONArray) alignmentJsonObj
+ List<Object> seqJsonArray = (List<Object>) alignmentJsonObj
+ .get("seqs");
+ List<Object> alAnnotJsonArray = (List<Object>) alignmentJsonObj
.get("alignAnnotation");
- JSONArray jsonSeqArray = (JSONArray) alignmentJsonObj
+ List<Object> jsonSeqArray = (List<Object>) alignmentJsonObj
.get("seqFeatures");
- JSONArray seqGrpJsonArray = (JSONArray) alignmentJsonObj
+ List<Object> seqGrpJsonArray = (List<Object>) alignmentJsonObj
.get("seqGroups");
- JSONObject jvSettingsJsonObj = (JSONObject) alignmentJsonObj
+ Map<String, Object> jvSettingsJsonObj = (Map<String, Object>) alignmentJsonObj
.get("appSettings");
if (jvSettingsJsonObj != null)
{
globalColourScheme = (String) jvSettingsJsonObj
.get("globalColorScheme");
- Boolean showFeatures = Boolean.valueOf(jvSettingsJsonObj.get(
- "showSeqFeatures").toString());
+ Boolean showFeatures = Boolean.valueOf(
+ jvSettingsJsonObj.get("showSeqFeatures").toString());
setShowSeqFeatures(showFeatures);
parseHiddenSeqRefsAsList(jvSettingsJsonObj);
parseHiddenCols(jvSettingsJsonObj);
}
- hiddenSequences = new ArrayList<SequenceI>();
- seqMap = new Hashtable<String, Sequence>();
- for (Iterator<JSONObject> sequenceIter = seqJsonArray.iterator(); sequenceIter
- .hasNext();)
+ hiddenSequences = new ArrayList<>();
+ seqMap = new Hashtable<>();
+ for (Iterator<Object> sequenceIter = seqJsonArray
+ .iterator(); sequenceIter.hasNext();)
{
- JSONObject sequence = sequenceIter.next();
+ Map<String, Object> sequence = (Map<String, Object>) sequenceIter
+ .next();
String sequcenceString = sequence.get("seq").toString();
String sequenceName = sequence.get("name").toString();
String seqUniqueId = sequence.get("id").toString();
parseFeatures(jsonSeqArray);
- for (Iterator<JSONObject> seqGrpIter = seqGrpJsonArray.iterator(); seqGrpIter
- .hasNext();)
+ for (Iterator<Object> seqGrpIter = seqGrpJsonArray
+ .iterator(); seqGrpIter.hasNext();)
{
- JSONObject seqGrpObj = seqGrpIter.next();
+ Map<String, Object> seqGrpObj = (Map<String, Object>) seqGrpIter
+ .next();
String grpName = seqGrpObj.get("groupName").toString();
String colourScheme = seqGrpObj.get("colourScheme").toString();
String description = (seqGrpObj.get("description") == null) ? null
: seqGrpObj.get("description").toString();
- boolean displayBoxes = Boolean.valueOf(seqGrpObj
- .get("displayBoxes").toString());
- boolean displayText = Boolean.valueOf(seqGrpObj.get("displayText")
- .toString());
- boolean colourText = Boolean.valueOf(seqGrpObj.get("colourText")
- .toString());
- boolean showNonconserved = Boolean.valueOf(seqGrpObj.get(
- "showNonconserved").toString());
+ boolean displayBoxes = Boolean
+ .valueOf(seqGrpObj.get("displayBoxes").toString());
+ boolean displayText = Boolean
+ .valueOf(seqGrpObj.get("displayText").toString());
+ boolean colourText = Boolean
+ .valueOf(seqGrpObj.get("colourText").toString());
+ boolean showNonconserved = Boolean
+ .valueOf(seqGrpObj.get("showNonconserved").toString());
int startRes = Integer
.valueOf(seqGrpObj.get("startRes").toString());
int endRes = Integer.valueOf(seqGrpObj.get("endRes").toString());
- JSONArray sequenceRefs = (JSONArray) seqGrpObj.get("sequenceRefs");
+ List<Object> sequenceRefs = (List<Object>) seqGrpObj
+ .get("sequenceRefs");
- ArrayList<SequenceI> grpSeqs = new ArrayList<SequenceI>();
+ ArrayList<SequenceI> grpSeqs = new ArrayList<>();
if (sequenceRefs.size() > 0)
{
- Iterator<String> seqHashIter = sequenceRefs.iterator();
+ Iterator<Object> seqHashIter = sequenceRefs.iterator();
while (seqHashIter.hasNext())
{
- String seqHash = seqHashIter.next();
- Sequence sequence = seqMap.get(seqHash);
+ Sequence sequence = seqMap.get(seqHashIter.next());
if (sequence != null)
{
grpSeqs.add(sequence);
}
SequenceGroup seqGrp = new SequenceGroup(grpSeqs, grpName, null,
displayBoxes, displayText, colourText, startRes, endRes);
- seqGrp.setColourScheme(ColourSchemeMapper.getJalviewColourScheme(
- colourScheme, seqGrp));
+ seqGrp.setColourScheme(ColourSchemeMapper
+ .getJalviewColourScheme(colourScheme, seqGrp));
seqGrp.setShowNonconserved(showNonconserved);
seqGrp.setDescription(description);
this.seqGroups.add(seqGrp);
}
- for (Iterator<JSONObject> alAnnotIter = alAnnotJsonArray.iterator(); alAnnotIter
- .hasNext();)
+ for (Iterator<Object> alAnnotIter = alAnnotJsonArray
+ .iterator(); alAnnotIter.hasNext();)
{
- JSONObject alAnnot = alAnnotIter.next();
- JSONArray annotJsonArray = (JSONArray) alAnnot.get("annotations");
+ Map<String, Object> alAnnot = (Map<String, Object>) alAnnotIter
+ .next();
+ List<Object> annotJsonArray = (List<Object>) alAnnot
+ .get("annotations");
Annotation[] annotations = new Annotation[annotJsonArray.size()];
int count = 0;
- for (Iterator<JSONObject> annotIter = annotJsonArray.iterator(); annotIter
- .hasNext();)
+ for (Iterator<Object> annotIter = annotJsonArray
+ .iterator(); annotIter.hasNext();)
{
- JSONObject annot = annotIter.next();
+ Map<String, Object> annot = (Map<String, Object>) annotIter
+ .next();
if (annot == null)
{
annotations[count] = null;
}
else
{
- float val = annot.get("value") == null ? null : Float
- .valueOf(annot.get("value").toString());
- String desc = annot.get("description") == null ? null : annot
- .get("description").toString();
+ float val = annot.get("value") == null ? null
+ : Float.valueOf(annot.get("value").toString());
+ String desc = annot.get("description") == null ? null
+ : annot.get("description").toString();
char ss = annot.get("secondaryStructure") == null
|| annot.get("secondaryStructure").toString()
- .equalsIgnoreCase("u0000") ? ' ' : annot
- .get("secondaryStructure").toString().charAt(0);
+ .equalsIgnoreCase("u0000") ? ' '
+ : annot.get("secondaryStructure")
+ .toString().charAt(0);
String displayChar = annot.get("displayCharacter") == null ? ""
: annot.get("displayCharacter").toString();
annotations[count] = new Annotation(displayChar, desc, ss, val);
if (annot.get("colour") != null)
{
- Color color = ColorUtils.parseColourString(annot.get(
- "colour").toString());
+ Color color = ColorUtils
+ .parseColourString(annot.get("colour").toString());
annotations[count].colour = color;
}
}
++count;
}
- AlignmentAnnotation alignAnnot = new AlignmentAnnotation(alAnnot
- .get("label").toString(), alAnnot.get("description")
- .toString(), annotations);
- alignAnnot.graph = (alAnnot.get("graphType") == null) ? 0 : Integer
- .valueOf(alAnnot.get("graphType").toString());
+ AlignmentAnnotation alignAnnot = new AlignmentAnnotation(
+ alAnnot.get("label").toString(),
+ alAnnot.get("description").toString(), annotations);
+ alignAnnot.graph = (alAnnot.get("graphType") == null) ? 0
+ : Integer.valueOf(alAnnot.get("graphType").toString());
- JSONObject diplaySettings = (JSONObject) alAnnot
+ Map<String, Object> diplaySettings = (Map<String, Object>) alAnnot
.get("annotationSettings");
if (diplaySettings != null)
{
- alignAnnot.scaleColLabel = (diplaySettings.get("scaleColLabel") == null) ? false
- : Boolean.valueOf(diplaySettings.get("scaleColLabel")
- .toString());
+ alignAnnot.scaleColLabel = (diplaySettings
+ .get("scaleColLabel") == null) ? false
+ : Boolean.valueOf(diplaySettings
+ .get("scaleColLabel").toString());
alignAnnot.showAllColLabels = (diplaySettings
- .get("showAllColLabels") == null) ? true : Boolean
- .valueOf(diplaySettings.get("showAllColLabels")
- .toString());
+ .get("showAllColLabels") == null) ? true
+ : Boolean.valueOf(diplaySettings
+ .get("showAllColLabels").toString());
alignAnnot.centreColLabels = (diplaySettings
.get("centreColLabels") == null) ? true
- : Boolean.valueOf(diplaySettings.get("centreColLabels")
- .toString());
- alignAnnot.belowAlignment = (diplaySettings.get("belowAlignment") == null) ? false
- : Boolean.valueOf(diplaySettings.get("belowAlignment")
- .toString());
- alignAnnot.visible = (diplaySettings.get("visible") == null) ? true
- : Boolean.valueOf(diplaySettings.get("visible")
- .toString());
- alignAnnot.hasIcons = (diplaySettings.get("hasIcon") == null) ? true
- : Boolean.valueOf(diplaySettings.get("hasIcon")
- .toString());
+ : Boolean.valueOf(diplaySettings
+ .get("centreColLabels").toString());
+ alignAnnot.belowAlignment = (diplaySettings
+ .get("belowAlignment") == null) ? false
+ : Boolean.valueOf(diplaySettings
+ .get("belowAlignment").toString());
+ alignAnnot.visible = (diplaySettings.get("visible") == null)
+ ? true
+ : Boolean.valueOf(
+ diplaySettings.get("visible").toString());
+ alignAnnot.hasIcons = (diplaySettings.get("hasIcon") == null)
+ ? true
+ : Boolean.valueOf(
+ diplaySettings.get("hasIcon").toString());
}
if (alAnnot.get("score") != null)
.valueOf(alAnnot.get("score").toString());
}
- String calcId = (alAnnot.get("calcId") == null) ? "" : alAnnot.get(
- "calcId").toString();
+ String calcId = (alAnnot.get("calcId") == null) ? ""
+ : alAnnot.get("calcId").toString();
alignAnnot.setCalcId(calcId);
- String seqHash = (alAnnot.get("sequenceRef") != null) ? alAnnot
- .get("sequenceRef").toString() : null;
+ String seqHash = (alAnnot.get("sequenceRef") != null)
+ ? alAnnot.get("sequenceRef").toString()
+ : null;
Sequence sequence = (seqHash != null) ? seqMap.get(seqHash) : null;
if (sequence != null)
return this;
}
- public void parseHiddenSeqRefsAsList(JSONObject jvSettingsJson)
+ public void parseHiddenSeqRefsAsList(Map<String, Object> jvSettingsJson)
{
- hiddenSeqRefs = new ArrayList<String>();
+ hiddenSeqRefs = new ArrayList<>();
String hiddenSeqs = (String) jvSettingsJson.get("hiddenSeqs");
if (hiddenSeqs != null && !hiddenSeqs.isEmpty())
{
String[] seqRefs = hiddenSeqs.split(";");
- for (String seqRef : seqRefs)
+ for (int i = 0, n = seqRefs.length; i < n; i++)
{
- hiddenSeqRefs.add(seqRef);
+ hiddenSeqRefs.add(seqRefs[i]);
}
}
}
- public void parseHiddenCols(JSONObject jvSettingsJson)
+ public void parseHiddenCols(Map<String, Object> jvSettingsJson)
{
String hiddenCols = (String) jvSettingsJson.get("hiddenCols");
if (hiddenCols != null && !hiddenCols.isEmpty())
{
- columnSelection = new ColumnSelection();
+ hiddenColumns = new HiddenColumns();
String[] rangeStrings = hiddenCols.split(";");
- for (String rangeString : rangeStrings)
+ for (int i = 0, n = rangeStrings.length; i < n; i++)
{
- String[] range = rangeString.split("-");
- columnSelection.hideColumns(Integer.valueOf(range[0]),
+ String[] range = rangeStrings[i].split("-");
+ hiddenColumns.hideColumns(Integer.valueOf(range[0]),
Integer.valueOf(range[1]));
}
}
}
@SuppressWarnings("unchecked")
- private void parseFeatures(JSONArray jsonSeqFeatures)
+ private void parseFeatures(List<Object> jsonSeqFeatures)
{
if (jsonSeqFeatures != null)
{
displayedFeatures = new FeaturesDisplayed();
- for (Iterator<JSONObject> seqFeatureItr = jsonSeqFeatures.iterator(); seqFeatureItr
- .hasNext();)
+ for (Object o : jsonSeqFeatures)
{
- JSONObject jsonFeature = seqFeatureItr.next();
+ Map<String, Object> jsonFeature = (Map<String, Object>) o;
Long begin = (Long) jsonFeature.get("xStart");
Long end = (Long) jsonFeature.get("xEnd");
String type = (String) jsonFeature.get("type");
String featureGrp = (String) jsonFeature.get("featureGroup");
- String descripiton = (String) jsonFeature.get("description");
+ String description = (String) jsonFeature.get("description");
String seqRef = (String) jsonFeature.get("sequenceRef");
Float score = Float.valueOf(jsonFeature.get("score").toString());
Sequence seq = seqMap.get(seqRef);
- SequenceFeature sequenceFeature = new SequenceFeature();
- JSONArray linksJsonArray = (JSONArray) jsonFeature.get("links");
+
+ /*
+ * begin/end of 0 is for a non-positional feature
+ */
+ int featureBegin = begin.intValue() == 0 ? 0
+ : seq.findPosition(begin.intValue());
+ int featureEnd = end.intValue() == 0 ? 0
+ : seq.findPosition(end.intValue()) - 1;
+
+ SequenceFeature sequenceFeature = new SequenceFeature(type,
+ description, featureBegin, featureEnd, score, featureGrp);
+
+ List<Object> linksJsonArray = (List<Object>) jsonFeature
+ .get("links");
if (linksJsonArray != null && linksJsonArray.size() > 0)
{
- Iterator<String> linkList = linksJsonArray.iterator();
+ Iterator<Object> linkList = linksJsonArray.iterator();
while (linkList.hasNext())
{
- String link = linkList.next();
- sequenceFeature.addLink(link);
+ sequenceFeature.addLink((String) linkList.next());
}
}
- sequenceFeature.setFeatureGroup(featureGrp);
- sequenceFeature.setScore(score);
- sequenceFeature.setDescription(descripiton);
- sequenceFeature.setType(type);
- sequenceFeature.setBegin(seq.findPosition(begin.intValue()));
- sequenceFeature.setEnd(seq.findPosition(end.intValue()) - 1);
+
seq.addSequenceFeature(sequenceFeature);
displayedFeatures.setVisible(type);
}
}
}
}
- globalColourScheme = ColourSchemeProperty.getColourName(viewport
- .getGlobalColourScheme());
+ globalColourScheme = ColourSchemeProperty
+ .getColourName(viewport.getGlobalColourScheme());
setDisplayedFeatures(viewport.getFeaturesDisplayed());
showSeqFeatures = viewport.isShowSequenceFeatures();
return annotations;
}
- public List<int[]> getHiddenColumns()
- {
- return hiddenColumns;
- }
-
@Override
- public ColumnSelection getColumnSelection()
+ public HiddenColumns getHiddenColumns()
{
- return columnSelection;
+ return hiddenColumns;
}
- public void setColumnSelection(ColumnSelection columnSelection)
+ public void setHiddenColumns(HiddenColumns hidden)
{
- this.columnSelection = columnSelection;
+ this.hiddenColumns = hidden;
}
@Override