git://source.jalview.org
/
jalview.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (from parent 1:
0c60848
)
JAL-2383 check for null, spelling
author
gmungoc
<g.m.carstairs@dundee.ac.uk>
Fri, 20 Jan 2017 10:55:50 +0000
(10:55 +0000)
committer
gmungoc
<g.m.carstairs@dundee.ac.uk>
Fri, 20 Jan 2017 10:55:50 +0000
(10:55 +0000)
resources/lang/Messages.properties
patch
|
blob
|
history
src/jalview/appletgui/SliderPanel.java
patch
|
blob
|
history
src/jalview/gui/SliderPanel.java
patch
|
blob
|
history
src/jalview/util/ParseHtmlBodyAndLinks.java
patch
|
blob
|
history
diff --git
a/resources/lang/Messages.properties
b/resources/lang/Messages.properties
index
a86154c
..
1352f0b
100644
(file)
--- a/
resources/lang/Messages.properties
+++ b/
resources/lang/Messages.properties
@@
-323,7
+323,7
@@
label.size = Size:
label.style = Style:
label.calculating = Calculating....
label.modify_conservation_visibility = Modify conservation visibility
label.style = Style:
label.calculating = Calculating....
label.modify_conservation_visibility = Modify conservation visibility
-label.colour_residues_above_occurence = Colour residues above % occurrence
+label.colour_residues_above_occurrence = Colour residues above % occurrence
label.set_this_label_text = set this label text
label.sequences_from = Sequences from {0}
label.successfully_loaded_file = Successfully loaded file {0}
label.set_this_label_text = set this label text
label.sequences_from = Sequences from {0}
label.successfully_loaded_file = Successfully loaded file {0}
diff --git
a/src/jalview/appletgui/SliderPanel.java
b/src/jalview/appletgui/SliderPanel.java
index
5ee665a
..
ec64b3b
100644
(file)
--- a/
src/jalview/appletgui/SliderPanel.java
+++ b/
src/jalview/appletgui/SliderPanel.java
@@
-125,7
+125,7
@@
public class SliderPanel extends Panel implements ActionListener,
SliderPanel pid = null;
if (PIDSlider == null)
{
SliderPanel pid = null;
if (PIDSlider == null)
{
- pid = new SliderPanel(ap, 50, false, cs);
+ pid = new SliderPanel(ap, cs.getThreshold(), false, cs);
PIDSlider = new Frame();
PIDSlider.add(pid);
}
PIDSlider = new Frame();
PIDSlider.add(pid);
}
@@
-178,16
+178,28
@@
public class SliderPanel extends Panel implements ActionListener,
}
}
+ /**
+ * Hides the PID slider panel if it is shown
+ */
public static void hidePIDSlider()
{
public static void hidePIDSlider()
{
- PIDSlider.setVisible(false);
- PIDSlider = null;
+ if (PIDSlider != null)
+ {
+ PIDSlider.setVisible(false);
+ PIDSlider = null;
+ }
}
}
+ /**
+ * Hides the conservation slider panel if it is shown
+ */
public static void hideConservationSlider()
{
public static void hideConservationSlider()
{
- conservationSlider.setVisible(false);
- conservationSlider = null;
+ if (conservationSlider != null)
+ {
+ conservationSlider.setVisible(false);
+ conservationSlider = null;
+ }
}
public SliderPanel(AlignmentPanel ap, int value, boolean forConserve,
ColourSchemeI cs)
}
public SliderPanel(AlignmentPanel ap, int value, boolean forConserve,
ColourSchemeI cs)
diff --git
a/src/jalview/gui/SliderPanel.java
b/src/jalview/gui/SliderPanel.java
index
af77c48
..
7d733c9
100755
(executable)
--- a/
src/jalview/gui/SliderPanel.java
+++ b/
src/jalview/gui/SliderPanel.java
@@
-34,6
+34,8
@@
import javax.swing.JInternalFrame;
import javax.swing.JLayeredPane;
import javax.swing.event.ChangeEvent;
import javax.swing.event.ChangeListener;
import javax.swing.JLayeredPane;
import javax.swing.event.ChangeEvent;
import javax.swing.event.ChangeListener;
+import javax.swing.event.InternalFrameAdapter;
+import javax.swing.event.InternalFrameEvent;
/**
* DOCUMENT ME!
/**
* DOCUMENT ME!
@@
-139,6
+141,7
@@
public class SliderPanel extends GSliderPanel
else
{
sp = (SliderPanel) conservationSlider.getContentPane();
else
{
sp = (SliderPanel) conservationSlider.getContentPane();
+ sp.slider.setValue(cs.getConservationInc());
sp.cs = cs;
}
sp.cs = cs;
}
@@
-159,25
+162,37
@@
public class SliderPanel extends GSliderPanel
return sp.getValue();
}
return sp.getValue();
}
+ /**
+ * Hides the PID slider panel if it is shown
+ */
public static void hidePIDSlider()
{
public static void hidePIDSlider()
{
- try
- {
- PIDSlider.setClosed(true);
- PIDSlider = null;
- } catch (PropertyVetoException ex)
+ if (PIDSlider != null)
{
{
+ try
+ {
+ PIDSlider.setClosed(true);
+ PIDSlider = null;
+ } catch (PropertyVetoException ex)
+ {
+ }
}
}
}
}
+ /**
+ * Hides the conservation slider panel if it is shown
+ */
public static void hideConservationSlider()
{
public static void hideConservationSlider()
{
- try
- {
- conservationSlider.setClosed(true);
- conservationSlider = null;
- } catch (PropertyVetoException ex)
+ if (conservationSlider != null)
{
{
+ try
+ {
+ conservationSlider.setClosed(true);
+ conservationSlider = null;
+ } catch (PropertyVetoException ex)
+ {
+ }
}
}
}
}
@@
-186,24
+201,17
@@
public class SliderPanel extends GSliderPanel
*/
public static void showConservationSlider()
{
*/
public static void showConservationSlider()
{
- try
- {
- PIDSlider.setClosed(true);
- PIDSlider = null;
- } catch (Exception ex)
- {
- }
+ hidePIDSlider();
if (!conservationSlider.isVisible())
{
Desktop.addInternalFrame(conservationSlider,
conservationSlider.getTitle(), 420, 90, false);
conservationSlider
if (!conservationSlider.isVisible())
{
Desktop.addInternalFrame(conservationSlider,
conservationSlider.getTitle(), 420, 90, false);
conservationSlider
- .addInternalFrameListener(new javax.swing.event.InternalFrameAdapter()
+ .addInternalFrameListener(new InternalFrameAdapter()
{
@Override
{
@Override
- public void internalFrameClosed(
- javax.swing.event.InternalFrameEvent e)
+ public void internalFrameClosed(InternalFrameEvent e)
{
conservationSlider = null;
}
{
conservationSlider = null;
}
@@
-241,6
+249,7
@@
public class SliderPanel extends GSliderPanel
else
{
pid = (SliderPanel) PIDSlider.getContentPane();
else
{
pid = (SliderPanel) PIDSlider.getContentPane();
+ pid.slider.setValue(cs.getThreshold());
pid.cs = cs;
}
pid.cs = cs;
}
@@
-266,29
+275,21
@@
public class SliderPanel extends GSliderPanel
*/
public static void showPIDSlider()
{
*/
public static void showPIDSlider()
{
- try
- {
- conservationSlider.setClosed(true);
- conservationSlider = null;
- } catch (Exception ex)
- {
- }
+ hideConservationSlider();
if (!PIDSlider.isVisible())
{
Desktop.addInternalFrame(PIDSlider, PIDSlider.getTitle(), 420, 90,
false);
PIDSlider.setLayer(JLayeredPane.PALETTE_LAYER);
if (!PIDSlider.isVisible())
{
Desktop.addInternalFrame(PIDSlider, PIDSlider.getTitle(), 420, 90,
false);
PIDSlider.setLayer(JLayeredPane.PALETTE_LAYER);
- PIDSlider
- .addInternalFrameListener(new javax.swing.event.InternalFrameAdapter()
- {
- @Override
- public void internalFrameClosed(
- javax.swing.event.InternalFrameEvent e)
- {
- PIDSlider = null;
- }
- });
+ PIDSlider.addInternalFrameListener(new InternalFrameAdapter()
+ {
+ @Override
+ public void internalFrameClosed(InternalFrameEvent e)
+ {
+ PIDSlider = null;
+ }
+ });
PIDSlider.setLayer(JLayeredPane.PALETTE_LAYER);
}
}
PIDSlider.setLayer(JLayeredPane.PALETTE_LAYER);
}
}
diff --git
a/src/jalview/util/ParseHtmlBodyAndLinks.java
b/src/jalview/util/ParseHtmlBodyAndLinks.java
index
f1b83b8
..
139ee19
100644
(file)
--- a/
src/jalview/util/ParseHtmlBodyAndLinks.java
+++ b/
src/jalview/util/ParseHtmlBodyAndLinks.java
@@
-97,12
+97,12
@@
public class ParseHtmlBodyAndLinks
public ParseHtmlBodyAndLinks(String description, boolean removeHTML,
String newline)
{
public ParseHtmlBodyAndLinks(String description, boolean removeHTML,
String newline)
{
- StringBuilder sb = new StringBuilder(description.length());
if (description == null || description.length() == 0)
{
htmlContent = false;
return;
}
if (description == null || description.length() == 0)
{
htmlContent = false;
return;
}
+ StringBuilder sb = new StringBuilder(description.length());
if (description.toUpperCase().indexOf("<HTML>") == -1)
{
htmlContent = false;
if (description.toUpperCase().indexOf("<HTML>") == -1)
{
htmlContent = false;