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
Format changes
[jalview.git]
/
src
/
jalview
/
gui
/
FeatureRenderer.java
diff --git
a/src/jalview/gui/FeatureRenderer.java
b/src/jalview/gui/FeatureRenderer.java
index
eb09af6
..
beef70c
100755
(executable)
--- a/
src/jalview/gui/FeatureRenderer.java
+++ b/
src/jalview/gui/FeatureRenderer.java
@@
-212,7
+212,7
@@
public class FeatureRenderer
{
\r
type = renderOrder[renderIndex];
\r
\r
{
\r
type = renderOrder[renderIndex];
\r
\r
- if(!av.featuresDisplayed.containsKey(type))
\r
+ if(type==null || !av.featuresDisplayed.containsKey(type))
\r
continue;
\r
\r
// loop through all features in sequence to find
\r
continue;
\r
\r
// loop through all features in sequence to find
\r
@@
-423,13
+423,14
@@
public class FeatureRenderer
public boolean createNewFeatures(SequenceI[] sequences,
\r
SequenceFeature [] features)
\r
{
\r
public boolean createNewFeatures(SequenceI[] sequences,
\r
SequenceFeature [] features)
\r
{
\r
- return amendFeatures(sequences, features, true);
\r
+ return amendFeatures(sequences, features, true, null);
\r
}
\r
\r
int featureIndex = 0;
\r
}
\r
\r
int featureIndex = 0;
\r
- boolean amendFeatures(SequenceI[] sequences,
\r
- final SequenceFeature [] features,
\r
- boolean newFeatures)
\r
+ boolean amendFeatures(final SequenceI[] sequences,
\r
+ final SequenceFeature[] features,
\r
+ boolean newFeatures,
\r
+ final AlignmentPanel ap)
\r
{
\r
JPanel bigPanel = new JPanel(new BorderLayout());
\r
final JComboBox name = new JComboBox();
\r
{
\r
JPanel bigPanel = new JPanel(new BorderLayout());
\r
final JComboBox name = new JComboBox();
\r
@@
-437,6
+438,8
@@
public class FeatureRenderer
final JTextArea description = new JTextArea(3,25);
\r
final JSpinner start = new JSpinner();
\r
final JSpinner end = new JSpinner();
\r
final JTextArea description = new JTextArea(3,25);
\r
final JSpinner start = new JSpinner();
\r
final JSpinner end = new JSpinner();
\r
+ start.setPreferredSize(new Dimension(80,20));
\r
+ end.setPreferredSize(new Dimension(80,20));
\r
final JPanel colour = new JPanel();
\r
colour.setBorder(BorderFactory.createEtchedBorder());
\r
colour.setMaximumSize(new Dimension(40,10));
\r
final JPanel colour = new JPanel();
\r
colour.setBorder(BorderFactory.createEtchedBorder());
\r
colour.setMaximumSize(new Dimension(40,10));
\r
@@
-476,9
+479,9
@@
public class FeatureRenderer
bigPanel.add(panel, BorderLayout.SOUTH);
\r
\r
panel = new JPanel();
\r
bigPanel.add(panel, BorderLayout.SOUTH);
\r
\r
panel = new JPanel();
\r
- panel.add(new JLabel(" Start: ", JLabel.RIGHT));
\r
+ panel.add(new JLabel(" Start:", JLabel.RIGHT));
\r
panel.add(start);
\r
panel.add(start);
\r
- panel.add(new JLabel(" End: ", JLabel.RIGHT));
\r
+ panel.add(new JLabel(" End:", JLabel.RIGHT));
\r
panel.add(end);
\r
bigPanel.add(panel, BorderLayout.CENTER);
\r
}
\r
panel.add(end);
\r
bigPanel.add(panel, BorderLayout.CENTER);
\r
}
\r
@@
-528,12
+531,10
@@
public class FeatureRenderer
if (getColour(lastFeatureAdded) != null)
\r
{
\r
colour.setBackground(getColour(lastFeatureAdded));
\r
if (getColour(lastFeatureAdded) != null)
\r
{
\r
colour.setBackground(getColour(lastFeatureAdded));
\r
- colour.setForeground(getColour(lastFeatureAdded));
\r
}
\r
else
\r
{
\r
colour.setBackground(new Color(60, 160, 115));
\r
}
\r
else
\r
{
\r
colour.setBackground(new Color(60, 160, 115));
\r
- colour.setForeground(new Color(60, 160, 115));
\r
}
\r
\r
}
\r
}
\r
\r
}
\r
@@
-565,9
+566,22
@@
public class FeatureRenderer
end.setValue(new Integer(features[index].getEnd()));
\r
colour.setBackground(
\r
getColour(name.getSelectedItem().toString()));
\r
end.setValue(new Integer(features[index].getEnd()));
\r
colour.setBackground(
\r
getColour(name.getSelectedItem().toString()));
\r
- colour.setForeground(
\r
- getColour(name.getSelectedItem().toString()));
\r
+
\r
+ SearchResults highlight = new SearchResults();
\r
+ highlight.addResult(sequences[0],
\r
+ features[index].getBegin(),
\r
+ features[index].getEnd());
\r
+
\r
+ ap.seqPanel.seqCanvas.highlightSearchResults(highlight);
\r
+
\r
}
\r
}
\r
+ Color col = getColour(name.getSelectedItem().toString());
\r
+ if (col == null)
\r
+ col = new
\r
+ jalview.schemes.UserColourScheme()
\r
+ .createColourFromName(name.getSelectedItem().toString());
\r
+
\r
+ colour.setBackground(col);
\r
}
\r
});
\r
\r
}
\r
});
\r
\r
@@
-581,7
+595,8
@@
public class FeatureRenderer
options = new Object[]{"OK", "Cancel"};
\r
\r
String title = newFeatures ? "Create New Sequence Feature(s)" :
\r
options = new Object[]{"OK", "Cancel"};
\r
\r
String title = newFeatures ? "Create New Sequence Feature(s)" :
\r
- "Amend/Delete Features";
\r
+ "Amend/Delete Features for "
\r
+ +sequences[0].getName();
\r
\r
int reply = JOptionPane.showInternalOptionDialog(Desktop.desktop,
\r
bigPanel,
\r
\r
int reply = JOptionPane.showInternalOptionDialog(Desktop.desktop,
\r
bigPanel,
\r