{
ex.printStackTrace();
}
-
+ // need to get window geometry before we calculate alignment layout
+ if (applet != null)
+ {
+ String param;
+ try
+ {
+ param = applet.getParameter("windowWidth");
+ if (param != null)
+ {
+ int width = Integer.parseInt(param);
+ DEFAULT_WIDTH = width;
+ }
+ param = applet.getParameter("windowHeight");
+ if (param != null)
+ {
+ int height = Integer.parseInt(param);
+ DEFAULT_HEIGHT = height;
+ }
+ } catch (Exception ex)
+ {
+ }
+ }
viewport = new AlignViewport(al, applet);
alignPanel = new AlignmentPanel(this, viewport);
avc = new jalview.controller.AlignViewController(this, viewport, alignPanel);
centreColumnLabelFlag.setState(true);
centreColumnLabelFlag_stateChanged();
}
- try
- {
- param = applet.getParameter("windowWidth");
- if (param != null)
- {
- int width = Integer.parseInt(param);
- DEFAULT_WIDTH = width;
- }
- param = applet.getParameter("windowHeight");
- if (param != null)
- {
- int height = Integer.parseInt(param);
- DEFAULT_HEIGHT = height;
- }
- } catch (Exception ex)
- {
- }
}
if (viewport.getAlignment().isNucleotide())
menu1.setLabel(MessageManager.getString("action.show"));
showColumns.setLabel(MessageManager.getString("label.all_columns"));
showSeqs.setLabel(MessageManager.getString("label.all_sequences"));
- menu2.setLabel(MessageManager.getString("aciton.hide"));
+ menu2.setLabel(MessageManager.getString("action.hide"));
hideColumns.setLabel(MessageManager.getString("label.selected_columns"));
hideSequences.setLabel(MessageManager.getString("label.selected_sequences"));
hideAllButSelection.setLabel(MessageManager.getString("label.all_but_selected_region"));
*/
public void drop(DropTargetDropEvent evt)
{
+ boolean success=true;
Transferable t = evt.getTransferable();
java.util.List files = null;
java.util.List protocols = null;
}
} catch (Exception e)
{
+ success=false;
}
if (files != null)
}
} catch (Exception ex)
{
+ success=false;
}
}
+ evt.dropComplete(success); // need this to ensure input focus is properly transfered to any new windows created
}
/**
.getSelectedFile().getParent());
String format = null;
- if (chooser.getSelectedFormat().equals("Jalview"))
+ if (chooser.getSelectedFormat()!=null && chooser.getSelectedFormat().equals("Jalview"))
{
format = "Jalview";
}