import jalview.datamodel.Alignment;
import jalview.io.FormatAdapter;
import jalview.io.IdentifyFile;
+import jalview.io.JSONFile;
import jalview.io.JalviewFileChooser;
import jalview.io.JalviewFileView;
import jalview.jbgui.GCutAndPasteTransfer;
af.statusBar.setText(MessageManager
.getString("label.successfully_pasted_alignment_file"));
- af.setShowSeqFeatures(Desktop.isCurrentSeqFeaturesVisible());
+ af.setShowSeqFeatures(JSONFile.isSeqFeaturesEnabled());
- af.changeColour(Desktop.getCurrentGlobalColourScheme());
+ af.changeColour(JSONFile.getColourScheme());
af.setMenusForViewport();
try
import jalview.io.FileLoader;
import jalview.io.FormatAdapter;
import jalview.io.IdentifyFile;
+import jalview.io.JSONFile;
import jalview.io.JalviewFileChooser;
import jalview.io.JalviewFileView;
import jalview.jbgui.GSplitFrame;
import jalview.jbgui.GStructureViewer;
-import jalview.schemes.ColourSchemeI;
import jalview.structure.StructureSelectionManager;
import jalview.util.ImageMaker;
import jalview.util.MessageManager;
private static AlignFrame currentAlignFrame;
- private static ColourSchemeI currentGlobalColourScheme;
-
- private static boolean currentSeqFeaturesVisible;
-
public static jalview.ws.jws1.Discoverer discoverer;
public static Object[] jalviewClipboard;
{
new FileLoader().LoadFile(viewport, choice, FormatAdapter.FILE,
format);
- viewport.setShowSequenceFeatures(isCurrentSeqFeaturesVisible());
+ viewport.setShowSequenceFeatures(JSONFile.isSeqFeaturesEnabled());
AlignFrame af = viewport.getAlignPanel().alignFrame;
if (af != null)
{
- af.changeColour(getCurrentGlobalColourScheme());
+ af.changeColour(JSONFile.getColourScheme());
af.setMenusForViewport();
}
}
Desktop.currentAlignFrame = currentAlignFrame;
}
- public static ColourSchemeI getCurrentGlobalColourScheme()
- {
- return currentGlobalColourScheme;
- }
-
- public static void setCurrentGlobalColourScheme(
- ColourSchemeI currentGlobalColourScheme)
- {
- Desktop.currentGlobalColourScheme = currentGlobalColourScheme;
- }
-
- public static boolean isCurrentSeqFeaturesVisible()
- {
- return currentSeqFeaturesVisible;
- }
-
- public static void setCurrentSeqFeaturesVisible(
- boolean currentSeqFeaturesVisible)
- {
- Desktop.currentSeqFeaturesVisible = currentSeqFeaturesVisible;
- }
}
public class JSONFile extends AlignFile
{
- private ColourSchemeI cs;
+ private static ColourSchemeI colourScheme;
+
+ private static boolean seqFeaturesEnabled;
private String jalviewVersion;
.get("globalColorScheme");
Boolean showFeatures = Boolean.valueOf(jvSettingsJsonObj.get(
"showSeqFeatures").toString());
- cs = getJalviewColorScheme(jsColourScheme);
- Desktop.setCurrentSeqFeaturesVisible(showFeatures);
+ setColourScheme(getJalviewColorScheme(jsColourScheme));
+ JSONFile.setSeqFeaturesEnabled(showFeatures);
+ // Desktop.setCurrentSeqFeaturesVisible(showFeatures);
}
seqMap = new Hashtable<String, Sequence>();
- Desktop.setCurrentGlobalColourScheme(cs);
+ // Desktop.setCurrentGlobalColourScheme(cs);
for (Iterator<JSONObject> sequenceIter = seqJsonArray.iterator(); sequenceIter
.hasNext();)
{
public void LoadAlignmentFeatures(AlignFrame af)
{
- af.setShowSeqFeatures(Desktop.isCurrentSeqFeaturesVisible());
- af.changeColour(Desktop.getCurrentGlobalColourScheme());
+ af.setShowSeqFeatures(JSONFile.isSeqFeaturesEnabled());
+ af.changeColour(getColourScheme());
af.setMenusForViewport();
}
this.globalColorScheme = globalColorScheme;
}
+ public static ColourSchemeI getColourScheme()
+ {
+ return colourScheme;
+ }
+
+ public static void setColourScheme(ColourSchemeI colourScheme)
+ {
+ JSONFile.colourScheme = colourScheme;
+ }
+
+ public static boolean isSeqFeaturesEnabled()
+ {
+ return seqFeaturesEnabled;
+ }
+
+ public static void setSeqFeaturesEnabled(boolean seqFeaturesEnabled)
+ {
+ JSONFile.seqFeaturesEnabled = seqFeaturesEnabled;
+ }
+
public class JSONExportSettings
{
private boolean exportSequence;