*/
package jalview.gui;
-import static jalview.gui.FeatureSettings.FeatureTableModel.COLOUR_COLUMN;
-import static jalview.gui.FeatureSettings.FeatureTableModel.FILTER_COLUMN;
-import static jalview.gui.FeatureSettings.FeatureTableModel.SHOW_COLUMN;
-import static jalview.gui.FeatureSettings.FeatureTableModel.TYPE_COLUMN;
-
import jalview.api.FeatureColourI;
import jalview.api.FeatureSettingsControllerI;
import jalview.bin.Cache;
public class FeatureSettings extends JPanel
implements FeatureSettingsControllerI
{
+ /*
+ * column indices of fields in Feature Settings table
+ */
+ static final int TYPE_COLUMN = 0;
+
+ static final int COLOUR_COLUMN = 1;
+
+ static final int FILTER_COLUMN = 2;
+
+ static final int SHOW_COLUMN = 3;
+
private static final int COLUMN_COUNT = 4;
private static final int MIN_WIDTH = 400;
}
}
- int columnCount = COLUMN_COUNT;
- Object[][] data = new Object[displayableTypes.size()][columnCount];
+ Object[][] data = new Object[displayableTypes.size()][COLUMN_COUNT];
int dataIndex = 0;
if (fr.hasRenderOrder())
if (originalData == null)
{
- int size = data[0].length;
- originalData = new Object[data.length][size];
+ originalData = new Object[data.length][COLUMN_COUNT];
for (int i = 0; i < data.length; i++)
{
- System.arraycopy(data[i], 0, originalData[i], 0, size);
+ System.arraycopy(data[i], 0, originalData[i], 0, COLUMN_COUNT);
}
}
else
/*
* new feature detected - add to original data (on top)
*/
- int size = currentData[0].length;
- Object[][] newData = new Object[originalData.length + 1][size];
+ Object[][] newData = new Object[originalData.length
+ + 1][COLUMN_COUNT];
for (int i = 0; i < originalData.length; i++)
{
- System.arraycopy(originalData[i], 0, newData[i + 1], 0, size);
+ System.arraycopy(originalData[i], 0, newData[i + 1], 0,
+ COLUMN_COUNT);
}
newData[0] = row;
originalData = newData;
// ///////////////////////////////////////////////////////////////////////
class FeatureTableModel extends AbstractTableModel
{
- /*
- * column indices of fields in Feature Settings table
- */
- static final int TYPE_COLUMN = 0;
-
- static final int COLOUR_COLUMN = 1;
-
- static final int FILTER_COLUMN = 2;
-
- static final int SHOW_COLUMN = 3;
-
private String[] columnNames = {
MessageManager.getString("label.feature_type"),
MessageManager.getString("action.colour"),