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 remote-tracking branch 'origin/develop' into imp/JAL-2774
[jalview.git]
/
src
/
jalview
/
gui
/
FeatureSettings.java
diff --git
a/src/jalview/gui/FeatureSettings.java
b/src/jalview/gui/FeatureSettings.java
index
0963b31
..
3f1d9c7
100644
(file)
--- a/
src/jalview/gui/FeatureSettings.java
+++ b/
src/jalview/gui/FeatureSettings.java
@@
-131,6
+131,11
@@
public class FeatureSettings extends JPanel
private static final int MIN_WIDTH = 400;
private static final int MIN_HEIGHT = 400;
private static final int MIN_WIDTH = 400;
private static final int MIN_HEIGHT = 400;
+
+ /**
+ * when true, constructor is still executing - so ignore UI events
+ */
+ protected volatile boolean inConstruction = true;
/**
* Constructor
/**
* Constructor
@@
-303,6
+308,7
@@
public class FeatureSettings extends JPanel
};
});
frame.setLayer(JLayeredPane.PALETTE_LAYER);
};
});
frame.setLayer(JLayeredPane.PALETTE_LAYER);
+ inConstruction = false;
}
protected void popupSort(final int selectedRow, final String type,
}
protected void popupSort(final int selectedRow, final String type,
@@
-485,7
+491,7
@@
public class FeatureSettings extends JPanel
@Override
synchronized public void discoverAllFeatureData()
{
@Override
synchronized public void discoverAllFeatureData()
{
- Set<String> allGroups = new HashSet<String>();
+ Set<String> allGroups = new HashSet<>();
AlignmentI alignment = af.getViewport().getAlignment();
for (int i = 0; i < alignment.getHeight(); i++)
AlignmentI alignment = af.getViewport().getAlignment();
for (int i = 0; i < alignment.getHeight(); i++)
@@
-535,13
+541,8
@@
public class FeatureSettings extends JPanel
public void itemStateChanged(ItemEvent evt)
{
fr.setGroupVisibility(check.getText(), check.isSelected());
public void itemStateChanged(ItemEvent evt)
{
fr.setGroupVisibility(check.getText(), check.isSelected());
- af.alignPanel.getSeqPanel().seqCanvas.repaint();
- if (af.alignPanel.overviewPanel != null)
- {
- af.alignPanel.overviewPanel.updateOverviewImage();
- }
-
resetTable(new String[] { grp });
resetTable(new String[] { grp });
+ af.alignPanel.paintAlignment(true, true);
}
});
groupPanel.add(check);
}
});
groupPanel.add(check);
@@
-557,12
+558,12
@@
public class FeatureSettings extends JPanel
return;
}
resettingTable = true;
return;
}
resettingTable = true;
- typeWidth = new Hashtable<String, float[]>();
+ typeWidth = new Hashtable<>();
// TODO: change avWidth calculation to 'per-sequence' average and use long
// rather than float
// TODO: change avWidth calculation to 'per-sequence' average and use long
// rather than float
- Set<String> displayableTypes = new HashSet<String>();
- Set<String> foundGroups = new HashSet<String>();
+ Set<String> displayableTypes = new HashSet<>();
+ Set<String> foundGroups = new HashSet<>();
/*
* determine which feature types may be visible depending on
/*
* determine which feature types may be visible depending on
@@
-578,7
+579,7
@@
public class FeatureSettings extends JPanel
* and keep track of which groups are visible
*/
Set<String> groups = seq.getFeatures().getFeatureGroups(true);
* and keep track of which groups are visible
*/
Set<String> groups = seq.getFeatures().getFeatureGroups(true);
- Set<String> visibleGroups = new HashSet<String>();
+ Set<String> visibleGroups = new HashSet<>();
for (String group : groups)
{
if (group == null || checkGroupState(group))
for (String group : groups)
{
if (group == null || checkGroupState(group))
@@
-1058,7
+1059,7
@@
public class FeatureSettings extends JPanel
{
if (fr.setFeaturePriority(data, visibleNew))
{
{
if (fr.setFeaturePriority(data, visibleNew))
{
- af.alignPanel.paintAlignment(true);
+ af.alignPanel.paintAlignment(true, true);
}
}
}
}
@@
-1237,8
+1238,11
@@
public class FeatureSettings extends JPanel
@Override
public void stateChanged(ChangeEvent evt)
{
@Override
public void stateChanged(ChangeEvent evt)
{
- fr.setTransparency((100 - transparency.getValue()) / 100f);
- af.alignPanel.paintAlignment(true);
+ if (!inConstruction)
+ {
+ fr.setTransparency((100 - transparency.getValue()) / 100f);
+ af.alignPanel.paintAlignment(true,true);
+ }
}
});
}
});