git://source.jalview.org
/
jalview.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge branch 'develop' into features/JAL-2446NCList
[jalview.git]
/
src
/
jalview
/
appletgui
/
AlignFrame.java
diff --git
a/src/jalview/appletgui/AlignFrame.java
b/src/jalview/appletgui/AlignFrame.java
index
2eed311
..
b30c5ae
100644
(file)
--- a/
src/jalview/appletgui/AlignFrame.java
+++ b/
src/jalview/appletgui/AlignFrame.java
@@
-599,25
+599,11
@@
public class AlignFrame extends EmbmenuFrame implements ActionListener,
}
case KeyEvent.VK_PAGE_UP:
}
case KeyEvent.VK_PAGE_UP:
- if (viewport.getWrapAlignment())
- {
- ranges.scrollUp(true);
- }
- else
- {
- ranges.pageUp();
- }
+ ranges.pageUp();
break;
case KeyEvent.VK_PAGE_DOWN:
break;
case KeyEvent.VK_PAGE_DOWN:
- if (viewport.getWrapAlignment())
- {
- ranges.scrollUp(false);
- }
- else
- {
- ranges.pageDown();
- }
+ ranges.pageDown();
break;
case KeyEvent.VK_Z:
break;
case KeyEvent.VK_Z:
@@
-1438,6
+1424,17
@@
public class AlignFrame extends EmbmenuFrame implements ActionListener,
return null;
}
return null;
}
+ private List<String> getDisplayedFeatureGroups()
+ {
+ if (alignPanel.getFeatureRenderer() != null
+ && viewport.getFeaturesDisplayed() != null)
+ {
+ return alignPanel.getFeatureRenderer().getDisplayedFeatureGroups();
+
+ }
+ return null;
+ }
+
public String outputFeatures(boolean displayTextbox, String format)
{
String features;
public String outputFeatures(boolean displayTextbox, String format)
{
String features;
@@
-1445,12
+1442,14
@@
public class AlignFrame extends EmbmenuFrame implements ActionListener,
if (format.equalsIgnoreCase("Jalview"))
{
features = formatter.printJalviewFormat(viewport.getAlignment()
if (format.equalsIgnoreCase("Jalview"))
{
features = formatter.printJalviewFormat(viewport.getAlignment()
- .getSequencesArray(), getDisplayedFeatureCols());
+ .getSequencesArray(), getDisplayedFeatureCols(),
+ getDisplayedFeatureGroups(), true);
}
else
{
features = formatter.printGffFormat(viewport.getAlignment()
}
else
{
features = formatter.printGffFormat(viewport.getAlignment()
- .getSequencesArray(), getDisplayedFeatureCols());
+ .getSequencesArray(), getDisplayedFeatureCols(),
+ getDisplayedFeatureGroups(), true);
}
if (displayTextbox)
}
if (displayTextbox)
@@
-1798,7
+1797,7
@@
public class AlignFrame extends EmbmenuFrame implements ActionListener,
synchronized void slideSequences(boolean right, int size)
{
synchronized void slideSequences(boolean right, int size)
{
- List<SequenceI> sg = new Vector<SequenceI>();
+ List<SequenceI> sg = new Vector<>();
if (viewport.cursorMode)
{
sg.add(viewport.getAlignment().getSequenceAt(
if (viewport.cursorMode)
{
sg.add(viewport.getAlignment().getSequenceAt(
@@
-1900,7
+1899,7
@@
public class AlignFrame extends EmbmenuFrame implements ActionListener,
static StringBuffer copiedSequences;
static StringBuffer copiedSequences;
- static Vector copiedHiddenColumns;
+ static Vector<int[]> copiedHiddenColumns;
protected void copy_actionPerformed()
{
protected void copy_actionPerformed()
{
@@
-1911,7
+1910,7
@@
public class AlignFrame extends EmbmenuFrame implements ActionListener,
SequenceGroup sg = viewport.getSelectionGroup();
copiedSequences = new StringBuffer();
SequenceGroup sg = viewport.getSelectionGroup();
copiedSequences = new StringBuffer();
- Map<Integer, SequenceI> orderedSeqs = new HashMap<Integer, SequenceI>();
+ Map<Integer, SequenceI> orderedSeqs = new HashMap<>();
for (int i = 0; i < sg.getSize(); i++)
{
SequenceI seq = sg.getSequenceAt(i);
for (int i = 0; i < sg.getSize(); i++)
{
SequenceI seq = sg.getSequenceAt(i);
@@
-1924,13
+1923,13
@@
public class AlignFrame extends EmbmenuFrame implements ActionListener,
if (viewport.hasHiddenColumns() && viewport.getSelectionGroup() != null)
{
if (viewport.hasHiddenColumns() && viewport.getSelectionGroup() != null)
{
- copiedHiddenColumns = new Vector();
+ copiedHiddenColumns = new Vector<>(viewport.getAlignment()
+ .getHiddenColumns().getHiddenColumnsCopy());
int hiddenOffset = viewport.getSelectionGroup().getStartRes();
int hiddenOffset = viewport.getSelectionGroup().getStartRes();
- for (int[] region : viewport.getAlignment().getHiddenColumns()
- .getHiddenRegions())
+ for (int[] region : copiedHiddenColumns)
{
{
- copiedHiddenColumns.addElement(new int[] {
- region[0] - hiddenOffset, region[1] - hiddenOffset });
+ region[0] = region[0] - hiddenOffset;
+ region[1] = region[1] - hiddenOffset;
}
}
else
}
}
else
@@
-2045,7
+2044,7
@@
public class AlignFrame extends EmbmenuFrame implements ActionListener,
{
for (int i = 0; i < copiedHiddenColumns.size(); i++)
{
{
for (int i = 0; i < copiedHiddenColumns.size(); i++)
{
- int[] region = (int[]) copiedHiddenColumns.elementAt(i);
+ int[] region = copiedHiddenColumns.elementAt(i);
af.viewport.hideColumns(region[0], region[1]);
}
}
af.viewport.hideColumns(region[0], region[1]);
}
}
@@
-2631,7
+2630,7
@@
public class AlignFrame extends EmbmenuFrame implements ActionListener,
}
Frame frame = new Frame();
}
Frame frame = new Frame();
- OverviewPanel overview = new OverviewPanel(alignPanel);
+ final OverviewPanel overview = new OverviewPanel(alignPanel);
frame.add(overview);
// +50 must allow for applet frame window
jalview.bin.JalviewLite.addFrame(frame, MessageManager.formatMessage(
frame.add(overview);
// +50 must allow for applet frame window
jalview.bin.JalviewLite.addFrame(frame, MessageManager.formatMessage(
@@
-2646,6
+2645,7
@@
public class AlignFrame extends EmbmenuFrame implements ActionListener,
@Override
public void windowClosing(WindowEvent e)
{
@Override
public void windowClosing(WindowEvent e)
{
+ overview.dispose();
if (ap != null)
{
ap.setOverviewPanel(null);
if (ap != null)
{
ap.setOverviewPanel(null);