git://source.jalview.org
/
jalview.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
c2484e3
)
JAL-1989 tightened up use of flag for 'column selection changed'
author
gmungoc
<g.m.carstairs@dundee.ac.uk>
Fri, 27 May 2016 14:24:15 +0000
(15:24 +0100)
committer
gmungoc
<g.m.carstairs@dundee.ac.uk>
Fri, 27 May 2016 14:24:15 +0000
(15:24 +0100)
src/jalview/appletgui/SeqPanel.java
patch
|
blob
|
history
src/jalview/gui/ScalePanel.java
patch
|
blob
|
history
src/jalview/gui/SeqPanel.java
patch
|
blob
|
history
src/jalview/viewmodel/AlignmentViewport.java
patch
|
blob
|
history
diff --git
a/src/jalview/appletgui/SeqPanel.java
b/src/jalview/appletgui/SeqPanel.java
index
479b746
..
a4dad4b
100644
(file)
--- a/
src/jalview/appletgui/SeqPanel.java
+++ b/
src/jalview/appletgui/SeqPanel.java
@@
-1964,7
+1964,6
@@
public class SeqPanel extends Panel implements MouseMotionListener,
ColumnSelection cs = MappingUtils.mapColumnSelection(colsel, sourceAv,
av);
av.setColumnSelection(cs);
ColumnSelection cs = MappingUtils.mapColumnSelection(colsel, sourceAv,
av);
av.setColumnSelection(cs);
- av.isColSelChanged(true);
ap.scalePanelHolder.repaint();
ap.repaint();
ap.scalePanelHolder.repaint();
ap.repaint();
diff --git
a/src/jalview/gui/ScalePanel.java
b/src/jalview/gui/ScalePanel.java
index
f2cbf33
..
2165b2c
100755
(executable)
--- a/
src/jalview/gui/ScalePanel.java
+++ b/
src/jalview/gui/ScalePanel.java
@@
-43,17
+43,14
@@
import javax.swing.JPopupMenu;
import javax.swing.ToolTipManager;
/**
import javax.swing.ToolTipManager;
/**
- * DOCUMENT ME!
- *
- * @author $author$
- * @version $Revision$
+ * The panel containing the sequence ruler (when not in wrapped mode), and
+ * supports a range of mouse operations to select, hide or reveal columns.
*/
public class ScalePanel extends JPanel implements MouseMotionListener,
MouseListener
{
protected int offy = 4;
*/
public class ScalePanel extends JPanel implements MouseMotionListener,
MouseListener
{
protected int offy = 4;
- /** DOCUMENT ME!! */
public int width;
protected AlignViewport av;
public int width;
protected AlignViewport av;
@@
-62,13
+59,26
@@
public class ScalePanel extends JPanel implements MouseMotionListener,
boolean stretchingGroup = false;
boolean stretchingGroup = false;
- int min; // used by mouseDragged to see if user
+ /*
+ * min, max hold the extent of a mouse drag action
+ */
+ int min;
- int max; // used by mouseDragged to see if user
+ int max;
boolean mouseDragging = false;
boolean mouseDragging = false;
- // wants to delete columns
+ /*
+ * holds a hidden column range when the mouse is over an adjacent column
+ */
+ int[] reveal;
+
+ /**
+ * Constructor
+ *
+ * @param av
+ * @param ap
+ */
public ScalePanel(AlignViewport av, AlignmentPanel ap)
{
this.av = av;
public ScalePanel(AlignViewport av, AlignmentPanel ap)
{
this.av = av;
@@
-393,6
+403,8
@@
public class ScalePanel extends JPanel implements MouseMotionListener,
@Override
public void mouseMoved(MouseEvent evt)
{
@Override
public void mouseMoved(MouseEvent evt)
{
+ this.setToolTipText(null);
+ reveal = null;
if (!av.hasHiddenColumns())
{
return;
if (!av.hasHiddenColumns())
{
return;
@@
-402,7
+414,6
@@
public class ScalePanel extends JPanel implements MouseMotionListener,
res = av.getColumnSelection().adjustForHiddenColumns(res);
res = av.getColumnSelection().adjustForHiddenColumns(res);
- reveal = null;
if (av.getColumnSelection().getHiddenColumns() != null)
{
for (int[] region : av.getColumnSelection().getHiddenColumns())
if (av.getColumnSelection().getHiddenColumns() != null)
{
for (int[] region : av.getColumnSelection().getHiddenColumns())
@@
-415,17
+426,11
@@
public class ScalePanel extends JPanel implements MouseMotionListener,
.getString("label.reveal_hidden_columns"));
break;
}
.getString("label.reveal_hidden_columns"));
break;
}
- else
- {
- this.setToolTipText(null);
- }
}
}
repaint();
}
}
}
repaint();
}
- int[] reveal;
-
/**
* DOCUMENT ME!
*
/**
* DOCUMENT ME!
*
diff --git
a/src/jalview/gui/SeqPanel.java
b/src/jalview/gui/SeqPanel.java
index
3fbb809
..
bd4b234
100644
(file)
--- a/
src/jalview/gui/SeqPanel.java
+++ b/
src/jalview/gui/SeqPanel.java
@@
-2061,7
+2061,6
@@
public class SeqPanel extends JPanel implements MouseListener,
ColumnSelection cs = MappingUtils.mapColumnSelection(colsel, sourceAv,
av);
av.setColumnSelection(cs);
ColumnSelection cs = MappingUtils.mapColumnSelection(colsel, sourceAv,
av);
av.setColumnSelection(cs);
- av.isColSelChanged(true);
PaintRefresher.Refresh(this, av.getSequenceSetId());
PaintRefresher.Refresh(this, av.getSequenceSetId());
diff --git
a/src/jalview/viewmodel/AlignmentViewport.java
b/src/jalview/viewmodel/AlignmentViewport.java
index
fbd1622
..
c16fdce
100644
(file)
--- a/
src/jalview/viewmodel/AlignmentViewport.java
+++ b/
src/jalview/viewmodel/AlignmentViewport.java
@@
-1078,6
+1078,7
@@
public abstract class AlignmentViewport implements AlignViewportI,
{
updateHiddenColumns();
}
{
updateHiddenColumns();
}
+ isColSelChanged(true);
}
/**
}
/**
@@
-1206,8
+1207,7
@@
public abstract class AlignmentViewport implements AlignViewportI,
*/
public boolean isColSelChanged(boolean b)
{
*/
public boolean isColSelChanged(boolean b)
{
- int hc = (colSel == null || colSel.isEmpty()) ? -1 : colSel
- .hashCode();
+ int hc = (colSel == null || colSel.isEmpty()) ? -1 : colSel.hashCode();
if (hc != -1 && hc != colselhash)
{
if (b)
if (hc != -1 && hc != colselhash)
{
if (b)
@@
-1308,7
+1308,7
@@
public abstract class AlignmentViewport implements AlignViewportI,
colSel.hideSelectedColumns();
setSelectionGroup(null);
colSel.hideSelectedColumns();
setSelectionGroup(null);
-
+ isColSelChanged(true);
}
public void hideColumns(int start, int end)
}
public void hideColumns(int start, int end)
@@
-1321,17
+1321,19
@@
public abstract class AlignmentViewport implements AlignViewportI,
{
colSel.hideColumns(start, end);
}
{
colSel.hideColumns(start, end);
}
+ isColSelChanged(true);
}
public void showColumn(int col)
{
colSel.revealHiddenColumns(col);
}
public void showColumn(int col)
{
colSel.revealHiddenColumns(col);
-
+ isColSelChanged(true);
}
public void showAllHiddenColumns()
{
colSel.revealAllHiddenColumns();
}
public void showAllHiddenColumns()
{
colSel.revealAllHiddenColumns();
+ isColSelChanged(true);
}
// common hide/show seq stuff
}
// common hide/show seq stuff