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
JAL-3597 additional references nulled, bug in test corrected
[jalview.git]
/
src
/
jalview
/
gui
/
LineartOptions.java
diff --git
a/src/jalview/gui/LineartOptions.java
b/src/jalview/gui/LineartOptions.java
index
1dd030b
..
d55733c
100644
(file)
--- a/
src/jalview/gui/LineartOptions.java
+++ b/
src/jalview/gui/LineartOptions.java
@@
-22,7
+22,6
@@
package jalview.gui;
import jalview.bin.Cache;
import jalview.util.MessageManager;
import jalview.bin.Cache;
import jalview.util.MessageManager;
-import jalview.util.dialogrunner.RunResponse;
import java.awt.FlowLayout;
import java.awt.event.ActionEvent;
import java.awt.FlowLayout;
import java.awt.event.ActionEvent;
@@
-38,10
+37,12
@@
import javax.swing.JRadioButton;
/**
* A dialog where the user may choose Text or Lineart rendering, and optionally
/**
* A dialog where the user may choose Text or Lineart rendering, and optionally
- * save this as a preference
+ * save this as a preference ("Don't ask me again")
*/
public class LineartOptions extends JPanel
{
*/
public class LineartOptions extends JPanel
{
+ static final String PROMPT_EACH_TIME = "Prompt each time";
+
JvOptionPane dialog;
public boolean cancelled = false;
JvOptionPane dialog;
public boolean cancelled = false;
@@
-61,22
+62,22
@@
public class LineartOptions extends JPanel
* mutable boolean object. User action in the dialog should update this
* object, and the <em>same</em> object should be used in any action handler
* set by calling <code>setResponseAction</code>.
* mutable boolean object. User action in the dialog should update this
* object, and the <em>same</em> object should be used in any action handler
* set by calling <code>setResponseAction</code>.
+ * <p>
+ * If the user chooses an option and also "Don't ask me again", the chosen
+ * option is saved as a property with key type_RENDERING i.e. "EPS_RENDERING",
+ * "SVG_RENDERING" or "HTML_RENDERING".
*
*
- * @param preferencesKey
- * the key under which the choice is saved as a user preference, if
- * 'Don't ask me again' is selected
* @param formatType
* image type e.g. EPS, SVG
* @param textOption
* true to select Text, false for Lineart
*/
* @param formatType
* image type e.g. EPS, SVG
* @param textOption
* true to select Text, false for Lineart
*/
- public LineartOptions(String preferencesKey, String formatType,
- AtomicBoolean textOption)
+ public LineartOptions(String formatType, AtomicBoolean textOption)
{
this.asText = textOption;
dialogTitle = MessageManager.formatMessage(
"label.select_character_style_title", formatType);
{
this.asText = textOption;
dialogTitle = MessageManager.formatMessage(
"label.select_character_style_title", formatType);
-
+ String preferencesKey = formatType + "_RENDERING";
try
{
jbInit(preferencesKey, formatType);
try
{
jbInit(preferencesKey, formatType);
@@
-94,9
+95,9
@@
public class LineartOptions extends JPanel
*
* @param action
*/
*
* @param action
*/
- public void setResponseAction(RunResponse action)
+ public void setResponseAction(Object response, Runnable action)
{
{
- dialog.response(action);
+ dialog.setResponseHandler(response, action);
}
/**
}
/**