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-3066 Fix NullPointerException thrown when showing HMMER run dialog
[jalview.git]
/
src
/
jalview
/
gui
/
WebserviceInfo.java
diff --git
a/src/jalview/gui/WebserviceInfo.java
b/src/jalview/gui/WebserviceInfo.java
index
8158718
..
b9b42dc
100644
(file)
--- a/
src/jalview/gui/WebserviceInfo.java
+++ b/
src/jalview/gui/WebserviceInfo.java
@@
-22,6
+22,7
@@
package jalview.gui;
import jalview.jbgui.GWebserviceInfo;
import jalview.util.MessageManager;
import jalview.jbgui.GWebserviceInfo;
import jalview.util.MessageManager;
+import jalview.util.Platform;
import jalview.ws.WSClientI;
import java.awt.BorderLayout;
import jalview.ws.WSClientI;
import java.awt.BorderLayout;
@@
-46,6
+47,8
@@
import javax.swing.JTabbedPane;
import javax.swing.JTextArea;
import javax.swing.event.HyperlinkEvent;
import javax.swing.event.HyperlinkListener;
import javax.swing.JTextArea;
import javax.swing.event.HyperlinkEvent;
import javax.swing.event.HyperlinkListener;
+import javax.swing.event.InternalFrameAdapter;
+import javax.swing.event.InternalFrameEvent;
import javax.swing.text.html.HTMLEditorKit;
import javax.swing.text.html.StyleSheet;
import javax.swing.text.html.HTMLEditorKit;
import javax.swing.text.html.StyleSheet;
@@
-99,7
+102,7
@@
public class WebserviceInfo extends GWebserviceInfo
{
super.setVisible(aFlag);
frame.setVisible(aFlag);
{
super.setVisible(aFlag);
frame.setVisible(aFlag);
- };
+ }
JTabbedPane subjobs = null;
JTabbedPane subjobs = null;
@@
-257,6
+260,7
@@
public class WebserviceInfo extends GWebserviceInfo
public WebserviceInfo(String title, String info, int width, int height,
boolean makeVisible)
{
public WebserviceInfo(String title, String info, int width, int height,
boolean makeVisible)
{
+ // no references
init(title, info, width, height, makeVisible);
}
init(title, info, width, height, makeVisible);
}
@@
-320,7
+324,7
@@
public class WebserviceInfo extends GWebserviceInfo
{
frame = new JInternalFrame();
frame.setContentPane(this);
{
frame = new JInternalFrame();
frame.setContentPane(this);
- Desktop.addInternalFrame(frame, title, makeVisible, width, height);
+ Desktop.addInternalFrame(frame, title, makeVisible, width, height, Desktop.FRAME_ALLOW_RESIZE, Desktop.FRAME_SET_MIN_SIZE_300);
frame.setClosable(false);
progressBar = new ProgressBar(statusPanel, statusBar);
frame.setClosable(false);
progressBar = new ProgressBar(statusPanel, statusBar);
@@
-347,16
+351,18
@@
public class WebserviceInfo extends GWebserviceInfo
titlePanel.add(ap, BorderLayout.WEST);
titlePanel.add(titleText, BorderLayout.CENTER);
setStatus(currentStatus);
titlePanel.add(ap, BorderLayout.WEST);
titlePanel.add(titleText, BorderLayout.CENTER);
setStatus(currentStatus);
-
- Thread thread = new Thread(ap);
- thread.start();
+ if (!Platform.isJS())
+ {
+ // No animation for the moment//
+ Thread thread = new Thread(ap);
+ thread.start();
+ }
final WebserviceInfo thisinfo = this;
frame.addInternalFrameListener(
final WebserviceInfo thisinfo = this;
frame.addInternalFrameListener(
- new javax.swing.event.InternalFrameAdapter()
+ new InternalFrameAdapter()
{
@Override
{
@Override
- public void internalFrameClosed(
- javax.swing.event.InternalFrameEvent evt)
+ public void internalFrameClosed(InternalFrameEvent evt)
{
// System.out.println("Shutting down webservice client");
WSClientI service = thisinfo.getthisService();
{
// System.out.println("Shutting down webservice client");
WSClientI service = thisinfo.getthisService();
@@
-364,7
+370,7
@@
public class WebserviceInfo extends GWebserviceInfo
{
service.cancelJob();
}
{
service.cancelJob();
}
- };
+ }
});
frame.validate();
});
frame.validate();
@@
-711,7
+717,7
@@
public class WebserviceInfo extends GWebserviceInfo
* DOCUMENT ME!
*/
@Override
* DOCUMENT ME!
*/
@Override
-protected void cancel_actionPerformed(ActionEvent e)
+ protected void cancel_actionPerformed(ActionEvent e)
{
if (!serviceIsCancellable)
{
{
if (!serviceIsCancellable)
{
@@
-743,9
+749,9
@@
protected void cancel_actionPerformed(ActionEvent e)
javax.swing.SwingUtilities.invokeLater(new Runnable()
{
@Override
javax.swing.SwingUtilities.invokeLater(new Runnable()
{
@Override
- public void run()
+ public void run()
{
{
- JvOptionPane.showInternalMessageDialog(Desktop.desktop, message,
+ JvOptionPane.showInternalMessageDialog(Desktop.getDesktopPane(), message,
title, JvOptionPane.WARNING_MESSAGE);
}
title, JvOptionPane.WARNING_MESSAGE);
}
@@
-927,6
+933,12
@@
public void hyperlinkUpdate(HyperlinkEvent e)
{
progressBar.setProgressBar(message, id);
}
{
progressBar.setProgressBar(message, id);
}
+
+ @Override
+ public void removeProgressBar(long id)
+ {
+ progressBar.removeProgressBar(id);
+ }
@Override
public void registerHandler(final long id,
@Override
public void registerHandler(final long id,