*/
package jalview.gui;
+import jalview.jbgui.GWebserviceInfo;
+import jalview.util.MessageManager;
+import jalview.util.Platform;
+import jalview.ws.WSClientI;
+
import java.awt.BorderLayout;
import java.awt.Color;
import java.awt.Dimension;
import java.awt.RenderingHints;
import java.awt.event.ActionEvent;
import java.awt.image.BufferedImage;
+import java.util.Locale;
import java.util.Vector;
import javax.swing.JComponent;
import javax.swing.text.html.HTMLEditorKit;
import javax.swing.text.html.StyleSheet;
-import jalview.jbgui.GWebserviceInfo;
-import jalview.util.ChannelProperties;
-import jalview.util.MessageManager;
-import jalview.ws.WSClientI;
-
/**
* Base class for web service client thread and gui TODO: create StAX parser to
* extract html body content reliably when preparing html formatted job statuses
public WebserviceInfo(String title, String info, int width, int height,
boolean makeVisible)
{
+ // no references
init(title, info, width, height, makeVisible);
}
{
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);
titlePanel.add(titleText, BorderLayout.CENTER);
setStatus(currentStatus);
- Thread thread = new Thread(ap);
- thread.start();
- final WebserviceInfo thisinfo = this;
- frame.addInternalFrameListener(new InternalFrameAdapter()
+ if (!Platform.isJS())
{
- @Override
- public void internalFrameClosed(InternalFrameEvent evt)
- {
- // System.out.println("Shutting down webservice client");
- WSClientI service = thisinfo.getthisService();
- if (service != null && service.isCancellable())
- {
- service.cancelJob();
- }
- }
- });
+ // No animation for the moment//
+ Thread thread = new Thread(ap);
+ thread.start();
+ }
+ final WebserviceInfo thisinfo = this;
+ frame.addInternalFrameListener(
+ new InternalFrameAdapter()
+ {
+ @Override
+ public void internalFrameClosed(InternalFrameEvent evt)
+ {
+ // System.out.println("Shutting down webservice client");
+ WSClientI service = thisinfo.getthisService();
+ if (service != null && service.isCancellable())
+ {
+ service.cancelJob();
+ }
+ }
+ });
frame.validate();
}
{
return null;
}
- String lowertxt = text.toLowerCase();
+ String lowertxt = text.toLowerCase(Locale.ROOT);
int htmlpos = leaveFirst ? -1 : lowertxt.indexOf("<body");
int htmlend = leaveLast ? -1 : lowertxt.indexOf("</body");
{
return "";
}
- String lowertxt = text.toLowerCase();
+ String lowertxt = text.toLowerCase(Locale.ROOT);
int htmlpos = lowertxt.indexOf("<body");
int htmlend = lowertxt.indexOf("</body");
int doctype = lowertxt.indexOf("<!doctype");
@Override
public void run()
{
- JvOptionPane.showInternalMessageDialog(Desktop.desktop, message,
+ JvOptionPane.showInternalMessageDialog(Desktop.getDesktopPane(), message,
title, JvOptionPane.WARNING_MESSAGE);
}
{
progressBar.setProgressBar(message, id);
}
+
+ @Override
+ public void removeProgressBar(long id)
+ {
+ progressBar.removeProgressBar(id);
+ }
@Override
public void registerHandler(final long id,