.getStructureSelectionManager(getInstance());
}
- static int openFrameCount = 0;
+ int openFrameCount = 0;
- static final int xOffset = 30;
+ final int xOffset = 30;
- static final int yOffset = 30;
+ final int yOffset = 30;
- public static jalview.ws.jws1.Discoverer discoverer;
+ public jalview.ws.jws1.Discoverer discoverer;
- public static Object[] jalviewClipboard;
+ public Object[] jalviewClipboard;
- public static boolean internalCopy = false;
+ public boolean internalCopy = false;
- static int fileLoadingCount = 0;
+ int fileLoadingCount = 0;
class MyDesktopManager implements DesktopManager
{
final JInternalFrame frame, String title, boolean makeVisible,
int w, int h, boolean resizable, boolean ignoreMinSize)
{
+
+ getInstance().addFrame(frame, title, makeVisible, w, h, resizable, ignoreMinSize);
+ }
+
+ private void addFrame(JInternalFrame frame, String title,
+ boolean makeVisible, int w, int h, boolean resizable,
+ boolean ignoreMinSize)
+ {
+ // TODO: allow callers to determine X and Y position of frame (eg. via
+ // bounds object).
+ // TODO: consider fixing method to update entries in the window submenu with
+ // the current window title
-
-
- // TODO: allow callers to determine X and Y position of frame (eg. via
- // bounds object).
- // TODO: consider fixing method to update entries in the window submenu with
- // the current window title
-
- frame.setTitle(title);
- if (frame.getWidth() < 1 || frame.getHeight() < 1)
+ frame.setTitle(title);
+ if (frame.getWidth() < 1 || frame.getHeight() < 1)
{
frame.setSize(w, h);
}
*/
private static void setKeyBindings(JInternalFrame frame)
{
- @SuppressWarnings("serial")
final Action closeAction = new AbstractAction()
{
@Override
// todo: changesupport handlers need to be transferred
if (discoverer == null)
{
- discoverer = new jalview.ws.jws1.Discoverer();
+ discoverer = jalview.ws.jws1.Discoverer.getInstance();
// register PCS handler for desktop.
discoverer.addPropertyChangeListener(changeSupport);
}
* - the payload from the drop event
* @throws Exception
*/
+ @SuppressWarnings("unchecked")
public static void transferFromDropTarget(List<Object> files,
List<DataSourceType> protocols, DropTargetDropEvent evt,
Transferable t) throws Exception
{
// Works on Windows and MacOSX
Cache.log.debug("Drop handled as javaFileListFlavor");
- for (Object file : (List) t
+ for (File file : (List<File>) t
.getTransferData(DataFlavor.javaFileListFlavor))
{
files.add(file);