sequence alignments and EPS files.
</li>
<li>The <a href="#editing"><strong>"Editing"</strong>
- Preferences</a> tab contains settings affecting the export of
- sequence alignments and EPS files.
+ Preferences</a> tab contains settings affecting behaviour when editing alignments.
</li>
<li>The <a href="../webServices/webServicesPrefs.html"><strong>"Web
Service"</strong> Preferences</a> tab allows you to configure the <a
the backbone atoms in the PDB file will be extracted as annotation
lines shown on the alignment.
<p>
- <em>Default structure viewer</em> - choose JMOL or CHIMERA for
+ <em>Default structure viewer</em> - choose Jmol or CHIMERA for
viewing 3D structures.
<p>
<em>Path to Chimera program</em> - Optional, as Jalview will search
Preferences tab</strong></a>
</p>
<p>
- <em>Default Browser (Unix)</em><br> Its difficult in Java to
+ <em>Default Browser (Unix)</em><br> It's difficult in Java to
detect the default web browser for Unix users. If Jalview can't find
your default web browser, enter the name or full path to your web
browser application.
just those you have configured yourself <em>via</em> the <em>Edit
Links</em> buttons. Press <em>Show all</em> to clear any filters.
</p>
- <p>The links table is prepoulated with persistent URLs for many common
+ <p>The links table is prepopulated with persistent URLs for many common
bioinformatics databases (since 2.10.2). These links are downloaded by Jalview from
the <em>identifiers.org</em> website, and the names and URLs are not
user editable.
allows the user to set a default rendering style for EPS export:
<ul>
<li>"Prompt each time"<br> Choose this to be
- asked select between Lineart and Text each time you make an EPS
+ asked to select between Lineart and Text each time you make an EPS
file.
</li>
<li>"Lineart"<br> EPS files will accurately
ignored if <em>"Automatically set ID width"</em> is set.
</p>
<p>
- <em>Sequence//Start-End Numbering</em><br> The output tab also
+ <em>Sequence/Start-End Numbering</em><br> The output tab also
has a group of checkboxes for each file format. If these are ticked,
then Jalview will write files with the start and end sequence
positions appended to each sequence id:
label.pca = PCA
label.create_image_of = Create {0} image of {1}
label.click_to_edit = Click to edit, right-click for menu
+label.by_annotation_tooltip = Annotation Colour is configured from the main Colour menu
label.pca = ACP
label.create_image_of = Crear imagen {0} de {1}
label.click_to_edit = Haga clic para editar, clic en el botón derecho para ver el menú
+label.by_annotation_tooltip = El color de anotación se configura desde el menú principal de colores
* this allows an easy change from http to https in future if needed
*/
ensemblDomain = Cache.getDefault(ENSEMBL_BASEURL,
- DEFAULT_ENSEMBL_BASEURL);
+ DEFAULT_ENSEMBL_BASEURL).trim();
ensemblGenomesDomain = Cache.getDefault(ENSEMBL_GENOMES_BASEURL,
- DEFAULT_ENSEMBL_GENOMES_BASEURL);
+ DEFAULT_ENSEMBL_GENOMES_BASEURL).trim();
domain = ensemblDomain;
}
protected void setDomain(String d)
{
- domain = d;
+ domain = d == null ? null : d.trim();
}
}
import java.util.List;
import java.util.Vector;
+import javax.swing.ButtonGroup;
import javax.swing.JCheckBoxMenuItem;
import javax.swing.JEditorPane;
import javax.swing.JInternalFrame;
colourMenu.add(textColour);
colourMenu.addSeparator();
- ColourMenuHelper.addMenuItems(colourMenu, this, viewport.getAlignment(),
- false);
+ ButtonGroup bg = ColourMenuHelper.addMenuItems(colourMenu, this,
+ viewport.getAlignment(), false);
+ colourMenu.add(annotationColour);
+ bg.add(annotationColour);
colourMenu.addSeparator();
colourMenu.add(conservationMenuItem);
colourMenu.add(modifyConservation);
colourMenu.add(abovePIDThreshold);
colourMenu.add(modifyPID);
- colourMenu.add(annotationColour);
ColourSchemeI colourScheme = viewport.getGlobalColourScheme();
ColourMenuHelper.setColourSelected(colourMenu, colourScheme);
@Override
public void reset()
{
- av.setGlobalColourScheme(oldcs);
+ this.ap.alignFrame.changeColour(oldcs);
if (av.getAlignment().getGroups() != null)
{
acg.setThresholdIsMinMax(thresholdIsMin.isSelected());
- av.setGlobalColourScheme(acg);
+ this.ap.alignFrame.changeColour(acg);
if (av.getAlignment().getGroups() != null)
{
super.sliderDragReleased();
ap.paintAlignment(true, true);
}
-
}
import jalview.schemes.ColourSchemeI;
import jalview.schemes.ColourSchemes;
import jalview.schemes.PIDColourScheme;
+import jalview.schemes.ResidueColourScheme;
import jalview.util.GroupUrlLink;
import jalview.util.GroupUrlLink.UrlStringTooLongException;
import jalview.util.MessageManager;
import java.util.TreeMap;
import java.util.Vector;
+import javax.swing.ButtonGroup;
import javax.swing.JCheckBoxMenuItem;
import javax.swing.JColorChooser;
import javax.swing.JMenu;
import javax.swing.JMenuItem;
import javax.swing.JPopupMenu;
+import javax.swing.JRadioButtonMenuItem;
/**
* DOCUMENT ME!
protected JCheckBoxMenuItem conservationMenuItem = new JCheckBoxMenuItem();
+ protected JRadioButtonMenuItem annotationColour;
+
protected JMenuItem modifyConservation = new JMenuItem();
AlignmentPanel ap;
}
});
+ annotationColour = new JRadioButtonMenuItem(
+ MessageManager.getString("action.by_annotation"));
+ annotationColour.setName(ResidueColourScheme.ANNOTATION_COLOUR);
+ annotationColour.setEnabled(false);
+ annotationColour.setToolTipText(
+ MessageManager.getString("label.by_annotation_tooltip"));
+
modifyConservation.setText(MessageManager
.getString("label.modify_conservation_threshold"));
modifyConservation.addActionListener(new ActionListener()
colourMenu.add(textColour);
colourMenu.addSeparator();
- ColourMenuHelper.addMenuItems(colourMenu, this, sg, false);
+ ButtonGroup bg = ColourMenuHelper.addMenuItems(colourMenu, this, sg,
+ false);
+ bg.add(annotationColour);
+ colourMenu.add(annotationColour);
colourMenu.addSeparator();
colourMenu.add(conservationMenuItem);
@Override
public void mouseReleased(MouseEvent evt)
{
+ boolean wasDragging = mouseDragging;
mouseDragging = false;
ap.getSeqPanel().stopScrolling();
res = av.getAlignment().getHiddenColumns()
.visibleToAbsoluteColumn(res);
}
- res = Math.min(res, av.getAlignment().getWidth() - 1);
+ res = Math.min(res, av.getRanges().getEndRes());
+ res = Math.max(0, res);
if (!stretchingGroup)
{
{
sg.setStartRes(res);
}
+ if (wasDragging)
+ {
+ min = Math.min(res, min);
+ max = Math.max(res, max);
+ av.getColumnSelection().stretchGroup(res, sg, min, max);
+ }
}
stretchingGroup = false;
ap.paintAlignment(false, false);
import jalview.gui.JvSwingUtils;
import jalview.gui.Preferences;
import jalview.io.FileFormats;
+import jalview.schemes.ResidueColourScheme;
import jalview.util.MessageManager;
import jalview.util.Platform;
protected JMenuItem modifyPID;
- protected JMenuItem annotationColour;
+ protected JRadioButtonMenuItem annotationColour;
protected JMenu sortByTreeMenu = new JMenu();
}
});
- annotationColour = new JMenuItem(
+ annotationColour = new JRadioButtonMenuItem(
MessageManager.getString("action.by_annotation"));
+ annotationColour.setName(ResidueColourScheme.ANNOTATION_COLOUR);
annotationColour.addActionListener(new ActionListener()
{
@Override
if (annotationThreshold != null)
{
if ((aboveAnnotationThreshold == ABOVE_THRESHOLD
- && aj.value < annotationThreshold.value)
+ && aj.value <= annotationThreshold.value)
|| (aboveAnnotationThreshold == BELOW_THRESHOLD
- && aj.value > annotationThreshold.value))
+ && aj.value >= annotationThreshold.value))
{
return Color.white;
}
@Override
public String getSchemeName()
{
- return "Annotation";
+ return ANNOTATION_COLOUR;
}
@Override
public static final String USER_DEFINED_MENU = "*User Defined*";
/*
+ * the canonical name of the annotation colour scheme
+ * (may be used to identify it in menu items)
+ */
+ public static final String ANNOTATION_COLOUR = "Annotation";
+
+ /*
* lookup up by character value e.g. 'G' to the colors array index
* e.g. if symbolIndex['K'] = 11 then colors[11] is the colour for K
*/
{
Color result = testee.findColour('a', col, seq);
/*
- * expect white below threshold of 5
+ * expect white at or below threshold of 5
*/
- Color expected = col < 5 ? Color.white : new Color(50 + 10 * col,
+ Color expected = col <= 5 ? Color.white
+ : new Color(50 + 10 * col,
200 - 10 * col,
150 + 10 * col);
assertEquals(result, expected, "for column " + col);
for (int col = 0; col < WIDTH; col++)
{
/*
- * colours for values >= threshold are graduated
+ * colours for values > threshold are graduated
* range is 6-10 so steps of 100/5 = 20
*/
int factor = col - THRESHOLD_FIVE;
- Color expected = col < 5 ? Color.white : new Color(50 + 20 * factor,
+ Color expected = col <= 5 ? Color.white
+ : new Color(50 + 20 * factor,
200 - 20 * factor,
150 + 20 * factor);
Color result = testee.findColour('a', col, seq);
for (int col = 0; col < WIDTH; col++)
{
Color result = testee.findColour('a', col, seq);
- Color expected = col > 5 ? Color.white : new Color(50 + 10 * col,
+ Color expected = col >= 5 ? Color.white
+ : new Color(50 + 10 * col,
200 - 10 * col, 150 + 10 * col);
assertEquals(result, expected, "for column " + col);
}
for (int col = 0; col < WIDTH; col++)
{
/*
- * colours for values <= threshold are graduated
+ * colours for values < threshold are graduated
* range is 0-5 so steps of 100/5 = 20
*/
- Color expected = col > 5 ? Color.white : new Color(50 + 20 * col,
+ Color expected = col >= 5 ? Color.white
+ : new Color(50 + 20 * col,
200 - 20 * col, 150 + 20 * col);
Color result = testee.findColour('a', col, seq);
assertEquals(result, expected, "for column " + col);