X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;ds=inline;f=src%2Fjalview%2Fgui%2FOptsAndParamsPage.java;h=e584eb754d80c9c6641293eaa14b2379c3403276;hb=5299e0d9142887a30889e8277d12039f10e5c36f;hp=6f9e4b199724407122142bcc9b2133ae45226c74;hpb=838e4f91d4a53dd315640dbc9ff6ef7a815ee576;p=jalview.git
diff --git a/src/jalview/gui/OptsAndParamsPage.java b/src/jalview/gui/OptsAndParamsPage.java
index 6f9e4b1..e584eb7 100644
--- a/src/jalview/gui/OptsAndParamsPage.java
+++ b/src/jalview/gui/OptsAndParamsPage.java
@@ -1,6 +1,6 @@
/*
- * Jalview - A Sequence Alignment Editor and Viewer (Version 2.9.0b1)
- * Copyright (C) 2015 The Jalview Authors
+ * Jalview - A Sequence Alignment Editor and Viewer ($$Version-Rel$$)
+ * Copyright (C) $$Year-Rel$$ The Jalview Authors
*
* This file is part of Jalview.
*
@@ -114,7 +114,7 @@ public class OptsAndParamsPage
.wrapTooltip(
true,
((desc == null || desc.trim().length() == 0) ? MessageManager
- .getString("label.opt_and_params_further_details ")
+ .getString("label.opt_and_params_further_details")
: desc)
+ "
"));
enabled.addMouseListener(this);
@@ -130,9 +130,9 @@ public class OptsAndParamsPage
add(enabled, BorderLayout.NORTH);
for (Object str : opt.getPossibleValues())
{
- val.addItem((String) str);
+ val.addItem(str);
}
- val.setSelectedItem((String) opt.getValue());
+ val.setSelectedItem(opt.getValue());
if (opt.getPossibleValues().size() > 1)
{
setLayout(new GridLayout(1, 2));
@@ -145,6 +145,7 @@ public class OptsAndParamsPage
setInitialValue();
}
+ @Override
public void actionPerformed(ActionEvent e)
{
if (e.getSource() != enabled)
@@ -206,36 +207,41 @@ public class OptsAndParamsPage
return opt;
}
+ @Override
public void mouseClicked(MouseEvent e)
{
- if (javax.swing.SwingUtilities.isRightMouseButton(e))
+ if (e.isPopupTrigger()) // for Windows
{
showUrlPopUp(this, finfo.toString(), e.getX(), e.getY());
}
}
+ @Override
public void mouseEntered(MouseEvent e)
{
// TODO Auto-generated method stub
}
+ @Override
public void mouseExited(MouseEvent e)
{
// TODO Auto-generated method stub
}
+ @Override
public void mousePressed(MouseEvent e)
{
- // TODO Auto-generated method stub
-
+ if (e.isPopupTrigger()) // Mac
+ {
+ showUrlPopUp(this, finfo.toString(), e.getX(), e.getY());
+ }
}
+ @Override
public void mouseReleased(MouseEvent e)
{
- // TODO Auto-generated method stub
-
}
public void resetToDefault(boolean setDefaultParams)
@@ -351,7 +357,7 @@ public class OptsAndParamsPage
+ linkImageURL
+ "\"/>"
+ MessageManager
- .getString("label.opt_and_params_further_detail")
+ .getString("label.opt_and_params_further_details")
: "")));
}
@@ -412,6 +418,7 @@ public class OptsAndParamsPage
showDesc.addActionListener(new ActionListener()
{
+ @Override
public void actionPerformed(ActionEvent e)
{
descisvisible = !descisvisible;
@@ -451,6 +458,7 @@ public class OptsAndParamsPage
validate();
}
+ @Override
public void actionPerformed(ActionEvent e)
{
if (adjusting)
@@ -526,45 +534,53 @@ public class OptsAndParamsPage
lastVal = null;
}
+ @Override
public void mouseClicked(MouseEvent e)
{
- if (javax.swing.SwingUtilities.isRightMouseButton(e))
+ if (e.isPopupTrigger()) // for Windows
{
showUrlPopUp(this, finfo.toString(), e.getX(), e.getY());
}
}
+ @Override
public void mouseEntered(MouseEvent e)
{
// TODO Auto-generated method stub
}
+ @Override
public void mouseExited(MouseEvent e)
{
// TODO Auto-generated method stub
}
+ @Override
public void mousePressed(MouseEvent e)
{
- // TODO Auto-generated method stub
-
+ if (e.isPopupTrigger()) // for Mac
+ {
+ showUrlPopUp(this, finfo.toString(), e.getX(), e.getY());
+ }
}
+ @Override
public void mouseReleased(MouseEvent e)
{
// TODO Auto-generated method stub
}
+ @Override
public void stateChanged(ChangeEvent e)
{
if (!adjusting)
{
valueField.setText(""
- + ((integ) ? ("" + (int) slider.getValue())
- : ("" + (float) (slider.getValue() / 1000f))));
+ + ((integ) ? ("" + slider.getValue()) : ("" + slider
+ .getValue() / 1000f)));
checkIfModified();
}