import jalview.datamodel.*;
import jalview.schemes.GraduatedColor;
-import jalview.util.FeatureColourI;
/**
* DOCUMENT ME!
} else { return true; }
}
-
+ //// /////////////
+ //// Feature Editing Dialog
+ //// Will be refactored in next release.
+
static String lastFeatureAdded;
static String lastFeatureGroupAdded;
tmp.add(new JLabel("Colour: ", JLabel.RIGHT));
tmp.add(colour);
colour.setPreferredSize(new Dimension(150, 15));
-
+ colour.setFont(new java.awt.Font("Verdana", Font.PLAIN, 9));
+ colour.setForeground(Color.black);
+ colour.setHorizontalAlignment(SwingConstants.CENTER);
+ colour.setVerticalAlignment(SwingConstants.CENTER);
+ colour.setHorizontalTextPosition(SwingConstants.CENTER);
+ colour.setVerticalTextPosition(SwingConstants.CENTER);
bigPanel.add(panel, BorderLayout.NORTH);
panel = new JPanel();
lastFeatureAdded = name.getText().trim();
lastFeatureGroupAdded = source.getText().trim();
lastDescriptionAdded = description.getText().replaceAll("\n", " ");
-
+ // TODO: determine if the null feature group is valid
if (lastFeatureGroupAdded.length() < 1)
lastFeatureGroupAdded = null;
}
colour.setIcon(null);
colour.setToolTipText(null);
colour.setText("");
+
if (col2 instanceof Color) {
colour.setBackground((Color)col2);
} else {
colour.setBackground(bigPanel.getBackground());
- colour.setForeground(bigPanel.getForeground());
+ colour.setForeground(Color.black);
FeatureSettings.renderGraduatedColor(colour, (GraduatedColor) col2);
//colour.setForeground(colour.getBackground());
}