import jalview.analysis.ParseProperties;
import jalview.analysis.SequenceIdMatcher;
import jalview.api.AlignExportSettingsI;
+import jalview.api.AlignFrameI;
import jalview.api.AlignViewControllerGuiI;
import jalview.api.AlignViewControllerI;
import jalview.api.AlignViewportI;
import jalview.api.AlignmentViewPanel;
+//from JalviewLite imports import jalview.api.FeatureRenderer;
import jalview.api.FeatureSettingsControllerI;
import jalview.api.SplitContainerI;
import jalview.api.ViewStyleI;
* @version $Revision$
*/
@SuppressWarnings("serial")
-public class AlignFrame extends GAlignFrame implements DropTargetListener,
+public class AlignFrame extends GAlignFrame
+ implements AlignFrameI, DropTargetListener,
IProgressIndicator, AlignViewControllerGuiI, ColourChangeListener
{
// modifyPID.setEnabled(false);
}
- String sortby = jalview.bin.Cache.getDefault("SORT_ALIGNMENT",
+ String sortby = jalview.bin.Cache.getDefault(Preferences.SORT_ALIGNMENT,
"No sort");
if (sortby.equals("Id"))
wrapMenuItem_actionPerformed(null);
}
- if (jalview.bin.Cache.getDefault("SHOW_OVERVIEW", false))
+ if (jalview.bin.Cache.getDefault(Preferences.SHOW_OVERVIEW, false))
{
this.overviewMenuItem_actionPerformed(null);
}
DataSourceType protocol = fileName.startsWith("http:")
? DataSourceType.URL
: DataSourceType.FILE;
- loader.LoadFile(viewport, fileName, protocol, currentFileFormat);
+ loader.loadFile(viewport, fileName, protocol, currentFileFormat);
}
else
{
DataSourceType protocol = (fileName.startsWith("http:")
? DataSourceType.URL
: DataSourceType.FILE);
- newframe = loader.LoadFileWaitTillLoaded(fileName, protocol,
+ newframe = loader.loadFileWaitTillLoaded(fileName, protocol,
currentFileFormat);
}
else
{
- newframe = loader.LoadFileWaitTillLoaded(fileObject,
+ newframe = loader.loadFileWaitTillLoaded(fileObject,
DataSourceType.FILE, currentFileFormat);
}
if (Cache.getDefault(Preferences.ENABLE_SPLIT_FRAME, true))
{
final SequenceI[] seqs = viewport.getSelectionAsNewSequence();
- viewport.openSplitFrame(af, new Alignment(seqs));
+ AlignViewport.openSplitFrame(this, af, new Alignment(seqs));
}
else
{
{
// BH 2018
return avc.parseFeaturesFile(file, sourceType,
- Cache.getDefault("RELAXEDSEQIDMATCHING", false));
+ Cache.getDefault(Preferences.RELAXEDSEQIDMATCHING, false));
}
if (filesmatched.size() > 0)
{
boolean autoAssociate = Cache
- .getDefault("AUTOASSOCIATE_PDBANDSEQS", false);
+ .getDefault(Preferences.AUTOASSOCIATE_PDBANDSEQS, false);
if (!autoAssociate)
{
String msg = MessageManager.formatMessage(
}
else
{
- new FileLoader().LoadFile(viewport, file, sourceType, format);
+ new FileLoader().loadFile(viewport, file, sourceType, format);
}
}
}
}
+ /**
+ * BH 2019 from JalviewLite
+ *
+ * get sequence feature groups that are hidden or shown
+ *
+ * @param visible
+ * true is visible
+ * @return list
+ */
+ public String[] getFeatureGroupsOfState(boolean visible)
+ {
+ jalview.api.FeatureRenderer fr = null;
+ if (alignPanel != null
+ && (fr = alignPanel
+ .getFeatureRenderer()) != null)
+ {
+ List<String> gps = fr.getGroups(visible);
+ String[] _gps = gps.toArray(new String[gps.size()]);
+ return _gps;
+ }
+ return null;
+ }
+
+ public void scrollTo(int row, int column)
+ {
+ alignPanel.getSeqPanel().scrollTo(row, column);
+ }
+
+ public void scrollToRow(int row)
+ {
+ alignPanel.getSeqPanel().scrollToRow(row);
+ }
+
+ public void scrollToColumn(int column)
+ {
+ alignPanel.getSeqPanel().scrollToColumn(column);
+ }
+
+ /**
+ *
+ * @return list of feature groups on the view
+ */
+ public String[] getFeatureGroups()
+ {
+ jalview.api.FeatureRenderer fr = null;
+ if (alignPanel != null
+ && (fr = alignPanel.getFeatureRenderer()) != null)
+ {
+ List<String> gps = fr.getFeatureGroups();
+ String[] _gps = gps.toArray(new String[gps.size()]);
+ return _gps;
+ }
+ return null;
+ }
+
+ public void select(SequenceGroup sel, ColumnSelection csel,
+ HiddenColumns hidden)
+ {
+ alignPanel.getSeqPanel().selection(sel, csel, hidden, null);
+ }
+
}
class PrintThread extends Thread