*/
package jalview.appletgui;
+import static jalview.viewmodel.seqfeatures.FeatureRendererModel.COLOUR_COLUMN;
+import static jalview.viewmodel.seqfeatures.FeatureRendererModel.SHOW_COLUMN;
+import static jalview.viewmodel.seqfeatures.FeatureRendererModel.TYPE_COLUMN;
+
import jalview.api.FeatureColourI;
import jalview.api.FeatureSettingsControllerI;
import jalview.datamodel.AlignmentI;
// Group selection states
void resetTable(boolean groupsChanged)
{
- List<String> displayableTypes = new ArrayList<String>();
- Set<String> foundGroups = new HashSet<String>();
+ List<String> displayableTypes = new ArrayList<>();
+ Set<String> foundGroups = new HashSet<>();
AlignmentI alignment = av.getAlignment();
* 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 || fr.checkGroupVisibility(group, true))
Component[] comps = featurePanel.getComponents();
int cSize = comps.length;
- Object[][] tmp = new Object[cSize][3];
+ /*
+ * temporary! leave column[2] empty - used for Filter in
+ * gui.FeatureSettings
+ */
+ int columnCount = 4;
+ Object[][] tmp = new Object[cSize][columnCount];
int tmpSize = 0;
for (int i = 0; i < cSize; i++)
{
MyCheckbox check = (MyCheckbox) comps[i];
- tmp[tmpSize][0] = check.type;
- tmp[tmpSize][1] = fr.getFeatureStyle(check.type);
- tmp[tmpSize][2] = new Boolean(check.getState());
+ tmp[tmpSize][TYPE_COLUMN /* 0 */] = check.type;
+ tmp[tmpSize][COLOUR_COLUMN /* 1 */] = fr.getFeatureStyle(check.type);
+ tmp[tmpSize][SHOW_COLUMN /* 3 */] = new Boolean(check.getState());
tmpSize++;
}
- Object[][] data = new Object[tmpSize][3];
+ Object[][] data = new Object[tmpSize][columnCount];
System.arraycopy(tmp, 0, data, 0, tmpSize);
fr.setFeaturePriority(data);
- ap.paintAlignment(updateOverview);
+ ap.paintAlignment(updateOverview, updateOverview);
}
MyCheckbox selectedCheck;
{
featurePanel.removeAll();
resetTable(false);
- ap.paintAlignment(true);
+ ap.paintAlignment(true, true);
}
@Override
public void adjustmentValueChanged(AdjustmentEvent evt)
{
fr.setTransparency((100 - transparency.getValue()) / 100f);
- ap.paintAlignment(true);
+ ap.paintAlignment(true, true);
}
class MyCheckbox extends Checkbox