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-1668 removed redundant UI elements in PopupMenu class associated with the old...
[jalview.git]
/
src
/
jalview
/
util
/
ImageMaker.java
diff --git
a/src/jalview/util/ImageMaker.java
b/src/jalview/util/ImageMaker.java
index
8abe965
..
b7aa4ca
100755
(executable)
--- a/
src/jalview/util/ImageMaker.java
+++ b/
src/jalview/util/ImageMaker.java
@@
-22,6
+22,7
@@
package jalview.util;
import jalview.bin.Jalview;
import jalview.gui.EPSOptions;
import jalview.bin.Jalview;
import jalview.gui.EPSOptions;
+import jalview.gui.IProgressIndicator;
import jalview.gui.SVGOptions;
import jalview.io.JalviewFileChooser;
import jalview.gui.SVGOptions;
import jalview.io.JalviewFileChooser;
@@
-89,14
+90,21
@@
public class ImageMaker
}
}
-
public ImageMaker(Component parent, TYPE type, String title, int width,
public ImageMaker(Component parent, TYPE type, String title, int width,
- int height, File file, String fileTitle)
+ int height, File file, String fileTitle,
+ IProgressIndicator pIndicator, long pSessionId, boolean headless)
{
this.type = type;
if (file == null)
{
{
this.type = type;
if (file == null)
{
+ if (pIndicator != null && !headless)
+ {
+ pIndicator.setProgressBar(
+ MessageManager.formatMessage(
+ "status.waiting_for_user_to_select_output_file",
+ type.name), pSessionId);
+ }
JalviewFileChooser chooser;
chooser = type.getChooser();
chooser.setFileView(new jalview.io.JalviewFileView());
JalviewFileChooser chooser;
chooser = type.getChooser();
chooser.setFileView(new jalview.io.JalviewFileView());
@@
-110,6
+118,15
@@
public class ImageMaker
.getSelectedFile().getParent());
file = chooser.getSelectedFile();
}
.getSelectedFile().getParent());
file = chooser.getSelectedFile();
}
+ else
+ {
+ if (pIndicator != null && !headless)
+ {
+ pIndicator.setProgressBar(MessageManager.formatMessage(
+ "status.cancelled_image_export_operation", type.name),
+ pSessionId);
+ }
+ }
}
if (file != null)
}
if (file != null)
@@
-129,11
+146,19
@@
public class ImageMaker
{
setupPNG(width, height);
}
{
setupPNG(width, height);
}
-
+ if (pIndicator != null && !headless)
+ {
+ pIndicator.setProgressBar(
+MessageManager.formatMessage(
+ "status.export_complete", type.getName()),
+ pSessionId);
+ }
} catch (Exception ex)
{
} catch (Exception ex)
{
- System.out.println("Error creating "
- + type.getName() + " file.");
+ System.out.println("Error creating " + type.getName() + " file.");
+
+ pIndicator.setProgressBar(MessageManager.formatMessage(
+ "info.error_creating_file", type.getName()), pSessionId);
}
}
}
}
}
}
@@
-143,8
+168,6
@@
public class ImageMaker
return graphics;
}
return graphics;
}
-
-
public void writeImage()
{
try
public void writeImage()
{
try
@@
-261,13
+284,14
@@
public class ImageMaker
static JalviewFileChooser getPNGChooser()
{
if (Jalview.isHeadlessMode())
static JalviewFileChooser getPNGChooser()
{
if (Jalview.isHeadlessMode())
- {
+ {
return null;
}
return new jalview.io.JalviewFileChooser(
return null;
}
return new jalview.io.JalviewFileChooser(
- jalview.bin.Cache.getProperty("LAST_DIRECTORY"), new String[]
- { "png" }, new String[]
- { "Portable network graphics" }, "Portable network graphics");
+ jalview.bin.Cache.getProperty("LAST_DIRECTORY"),
+ new String[] { "png" },
+ new String[] { "Portable network graphics" },
+ "Portable network graphics");
}
static JalviewFileChooser getEPSChooser()
}
static JalviewFileChooser getEPSChooser()
@@
-277,20
+301,22
@@
public class ImageMaker
return null;
}
return new jalview.io.JalviewFileChooser(
return null;
}
return new jalview.io.JalviewFileChooser(
- jalview.bin.Cache.getProperty("LAST_DIRECTORY"), new String[]
- { "eps" }, new String[]
- { "Encapsulated Postscript" }, "Encapsulated Postscript");
+ jalview.bin.Cache.getProperty("LAST_DIRECTORY"),
+ new String[] { "eps" },
+ new String[] { "Encapsulated Postscript" },
+ "Encapsulated Postscript");
}
static JalviewFileChooser getSVGChooser()
{
if (Jalview.isHeadlessMode())
}
static JalviewFileChooser getSVGChooser()
{
if (Jalview.isHeadlessMode())
- {
+ {
return null;
}
return new jalview.io.JalviewFileChooser(
return null;
}
return new jalview.io.JalviewFileChooser(
- jalview.bin.Cache.getProperty("LAST_DIRECTORY"), new String[]
- { "svg" }, new String[]
- { "Scalable Vector Graphics" }, "Scalable Vector Graphics");
+ jalview.bin.Cache.getProperty("LAST_DIRECTORY"),
+ new String[] { "svg" },
+ new String[] { "Scalable Vector Graphics" },
+ "Scalable Vector Graphics");
}
}
}
}