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
Pull from develop
[jalview.git]
/
src
/
jalview
/
appletgui
/
SliderPanel.java
diff --git
a/src/jalview/appletgui/SliderPanel.java
b/src/jalview/appletgui/SliderPanel.java
index
2aa010f
..
9154aa0
100644
(file)
--- a/
src/jalview/appletgui/SliderPanel.java
+++ b/
src/jalview/appletgui/SliderPanel.java
@@
-21,7
+21,7
@@
package jalview.appletgui;
import jalview.datamodel.SequenceGroup;
package jalview.appletgui;
import jalview.datamodel.SequenceGroup;
-import jalview.schemes.CollectionColourSchemeI;
+import jalview.renderer.ResidueShaderI;
import jalview.util.MessageManager;
import java.awt.BorderLayout;
import jalview.util.MessageManager;
import java.awt.BorderLayout;
@@
-49,39
+49,39
@@
import java.util.Iterator;
public class SliderPanel extends Panel implements ActionListener,
AdjustmentListener, MouseListener
{
public class SliderPanel extends Panel implements ActionListener,
AdjustmentListener, MouseListener
{
+ private static final String BACKGROUND = "Background";
+
AlignmentPanel ap;
boolean forConservation = true;
AlignmentPanel ap;
boolean forConservation = true;
- CollectionColourSchemeI cs;
+ ResidueShaderI cs;
static Frame conservationSlider;
static Frame PIDSlider;
public static int setConservationSlider(AlignmentPanel ap,
static Frame conservationSlider;
static Frame PIDSlider;
public static int setConservationSlider(AlignmentPanel ap,
- CollectionColourSchemeI collectionColourSchemeI, String source)
+ ResidueShaderI ccs, String source)
{
SliderPanel sp = null;
if (conservationSlider == null)
{
{
SliderPanel sp = null;
if (conservationSlider == null)
{
- sp = new SliderPanel(ap,
- collectionColourSchemeI.getConservationInc(), true,
- collectionColourSchemeI);
+ sp = new SliderPanel(ap, ccs.getConservationInc(), true, ccs);
conservationSlider = new Frame();
conservationSlider.add(sp);
}
else
{
sp = (SliderPanel) conservationSlider.getComponent(0);
conservationSlider = new Frame();
conservationSlider.add(sp);
}
else
{
sp = (SliderPanel) conservationSlider.getComponent(0);
- sp.cs = collectionColourSchemeI;
+ sp.cs = ccs;
+ sp.valueField.setText(String.valueOf(ccs.getConservationInc()));
}
}
- conservationSlider
- .setTitle(MessageManager.formatMessage(
- "label.conservation_colour_increment",
- new String[] { source }));
+ conservationSlider.setTitle(MessageManager.formatMessage(
+ "label.conservation_colour_increment",
+ new String[] { source == null ? BACKGROUND : source }));
if (ap.av.getAlignment().getGroups() != null)
{
sp.setAllGroupsCheckEnabled(true);
if (ap.av.getAlignment().getGroups() != null)
{
sp.setAllGroupsCheckEnabled(true);
@@
-122,7
+122,7
@@
public class SliderPanel extends Panel implements ActionListener,
}
public static int setPIDSliderSource(AlignmentPanel ap,
}
public static int setPIDSliderSource(AlignmentPanel ap,
- CollectionColourSchemeI ccs, String source)
+ ResidueShaderI ccs, String source)
{
SliderPanel pid = null;
if (PIDSlider == null)
{
SliderPanel pid = null;
if (PIDSlider == null)
@@
-135,11
+135,11
@@
public class SliderPanel extends Panel implements ActionListener,
{
pid = (SliderPanel) PIDSlider.getComponent(0);
pid.cs = ccs;
{
pid = (SliderPanel) PIDSlider.getComponent(0);
pid.cs = ccs;
+ pid.valueField.setText(String.valueOf(ccs.getThreshold()));
}
}
- PIDSlider
- .setTitle(MessageManager.formatMessage(
- "label.percentage_identity_threshold",
- new String[] { source }));
+ PIDSlider.setTitle(MessageManager.formatMessage(
+ "label.percentage_identity_threshold",
+ new String[] { source == null ? BACKGROUND : source }));
if (ap.av.getAlignment().getGroups() != null)
{
if (ap.av.getAlignment().getGroups() != null)
{
@@
-204,7
+204,7
@@
public class SliderPanel extends Panel implements ActionListener,
}
}
public SliderPanel(AlignmentPanel ap, int value, boolean forConserve,
}
}
public SliderPanel(AlignmentPanel ap, int value, boolean forConserve,
- CollectionColourSchemeI collectionColourSchemeI)
+ ResidueShaderI shader)
{
try
{
{
try
{
@@
-214,7
+214,7
@@
public class SliderPanel extends Panel implements ActionListener,
e.printStackTrace();
}
this.ap = ap;
e.printStackTrace();
}
this.ap = ap;
- this.cs = collectionColourSchemeI;
+ this.cs = shader;
forConservation = forConserve;
undoButton.setVisible(false);
applyButton.setVisible(false);
forConservation = forConserve;
undoButton.setVisible(false);
applyButton.setVisible(false);
@@
-249,7
+249,7
@@
public class SliderPanel extends Panel implements ActionListener,
return;
}
return;
}
- CollectionColourSchemeI toChange = cs;
+ ResidueShaderI toChange = cs;
Iterator<SequenceGroup> allGroups = null;
if (allGroupsCheck.getState())
Iterator<SequenceGroup> allGroups = null;
if (allGroupsCheck.getState())