import jalview.api.FeatureColourI;
import jalview.datamodel.SearchResults;
+import jalview.datamodel.SearchResultsI;
import jalview.datamodel.SequenceFeature;
import jalview.datamodel.SequenceI;
import jalview.schemes.FeatureColour;
-import jalview.schemes.UserColourScheme;
+import jalview.util.ColorUtils;
import jalview.util.MessageManager;
import java.awt.BorderLayout;
import javax.swing.JColorChooser;
import javax.swing.JComboBox;
import javax.swing.JLabel;
-import javax.swing.JOptionPane;
import javax.swing.JPanel;
import javax.swing.JScrollPane;
import javax.swing.JSpinner;
* @version $Revision$
*/
public class FeatureRenderer extends
- jalview.renderer.seqfeatures.FeatureRenderer implements
- jalview.api.FeatureRenderer
+ jalview.renderer.seqfeatures.FeatureRenderer
{
Color resBoxColour;
start.setValue(new Integer(features[index].getBegin()));
end.setValue(new Integer(features[index].getEnd()));
- SearchResults highlight = new SearchResults();
+ SearchResultsI highlight = new SearchResults();
highlight.addResult(sequences[0], features[index].getBegin(),
features[index].getEnd());
FeatureColourI col = getFeatureStyle(name.getText());
if (col == null)
{
- col = new FeatureColour(UserColourScheme
+ col = new FeatureColour(ColorUtils
.createColourFromName(name.getText()));
}
oldcol = fcol = col;
: MessageManager.formatMessage("label.amend_delete_features",
new String[] { sequences[0].getName() });
- int reply = JOptionPane.showInternalOptionDialog(Desktop.desktop,
- bigPanel, title, JOptionPane.YES_NO_CANCEL_OPTION,
- JOptionPane.QUESTION_MESSAGE, null, options,
+ int reply = JvOptionPane.showInternalOptionDialog(Desktop.desktop,
+ bigPanel, title, JvOptionPane.YES_NO_CANCEL_OPTION,
+ JvOptionPane.QUESTION_MESSAGE, null, options,
MessageManager.getString("action.ok"));
jalview.io.FeaturesFile ffile = new jalview.io.FeaturesFile();
- if (reply == JOptionPane.OK_OPTION && name.getText().length() > 0)
+ if (reply == JvOptionPane.OK_OPTION && name.getText().length() > 0)
{
- // This ensures that the last sequence
- // is refreshed and new features are rendered
- lastSeq = null;
lastFeatureAdded = name.getText().trim();
lastFeatureGroupAdded = source.getText().trim();
lastDescriptionAdded = description.getText().replaceAll("\n", " ");
{
SequenceFeature sf = features[featureIndex];
- if (reply == JOptionPane.NO_OPTION)
+ if (reply == JvOptionPane.NO_OPTION)
{
sequences[0].getDatasetSequence().deleteFeature(sf);
}
- else if (reply == JOptionPane.YES_OPTION)
+ else if (reply == JvOptionPane.YES_OPTION)
{
sf.type = lastFeatureAdded;
sf.featureGroup = lastFeatureGroupAdded;
else
// NEW FEATURES ADDED
{
- if (reply == JOptionPane.OK_OPTION && lastFeatureAdded.length() > 0)
+ if (reply == JvOptionPane.OK_OPTION && lastFeatureAdded.length() > 0)
{
for (int i = 0; i < sequences.length; i++)
{