import java.beans.PropertyChangeListener;
import java.io.File;
import java.util.ArrayList;
+import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.StringTokenizer;
{
private static final long serialVersionUID = 1L;
- private Map<Object, Runnable> callbacks;
+ private Map<Object, Runnable> callbacks = new HashMap<>();
File selectedFile = null;
{
int value = super.showOpenDialog(this);
- /*
- * code below here is not reached in JalviewJS, instead
- * propertyChange() is called for dialog action
- */
- handleResponse(value);
+ if (!Platform.isJS())
+ {
+ /*
+ * code here is not run in JalviewJS, instead
+ * propertyChange() is called for dialog action
+ */
+ handleResponse(value);
+ }
return value;
}
layout.putConstraint(SpringLayout.NORTH, scroller, 5,
SpringLayout.NORTH, this);
- if (Platform.isAMac())
+ if (Platform.isAMacAndNotJS())
{
scroller.setPreferredSize(new Dimension(500, 100));
}