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-3253-applet headless branch - just experimenting.
[jalview.git]
/
src
/
jalview
/
gui
/
Desktop.java
diff --git
a/src/jalview/gui/Desktop.java
b/src/jalview/gui/Desktop.java
index
a58e22a
..
d312a25
100644
(file)
--- a/
src/jalview/gui/Desktop.java
+++ b/
src/jalview/gui/Desktop.java
@@
-199,7
+199,7
@@
public class Desktop extends GDesktop
public static MyDesktopPane getDesktopPane()
{
public static MyDesktopPane getDesktopPane()
{
- Desktop desktop = Desktop.getInstance();
+ Desktop desktop = getInstance();
return desktop == null ? null : desktop.desktopPane;
}
return desktop == null ? null : desktop.desktopPane;
}
@@
-799,7
+799,7
@@
public class Desktop extends GDesktop
FileFormatI format = new IdentifyFile().identify(file,
DataSourceType.PASTE);
FileFormatI format = new IdentifyFile().identify(file,
DataSourceType.PASTE);
- new FileLoader().loadFile(file, DataSourceType.PASTE, format);
+ new FileLoader(true).loadFile(file, DataSourceType.PASTE, format);
}
} catch (Exception ex)
}
} catch (Exception ex)
@@
-909,7
+909,7
@@
public class Desktop extends GDesktop
// A HEADLESS STATE WHEN NO DESKTOP EXISTS. MUST RETURN
// IF JALVIEW IS RUNNING HEADLESS
// ///////////////////////////////////////////////
// A HEADLESS STATE WHEN NO DESKTOP EXISTS. MUST RETURN
// IF JALVIEW IS RUNNING HEADLESS
// ///////////////////////////////////////////////
- if (Desktop.getInstance().instanceOnly || Jalview.isHeadlessMode())
+ if (Jalview.isHeadlessMode() || getInstance().instanceOnly)
{
return;
}
{
return;
}
@@
-925,7
+925,7
@@
public class Desktop extends GDesktop
// The Alignment Frame window could be added from a number of places,
// hence,
// I did this here in order not to miss out on any Alignment frame.
// The Alignment Frame window could be added from a number of places,
// hence,
// I did this here in order not to miss out on any Alignment frame.
- if (frame instanceof AlignFrame)
+ if (frame instanceof AlignFrame.IFrame)
{
frame.setMinimumSize(new Dimension(ALIGN_FRAME_DEFAULT_MIN_WIDTH,
ALIGN_FRAME_DEFAULT_MIN_HEIGHT));
{
frame.setMinimumSize(new Dimension(ALIGN_FRAME_DEFAULT_MIN_WIDTH,
ALIGN_FRAME_DEFAULT_MIN_HEIGHT));
@@
-958,9
+958,9
@@
public class Desktop extends GDesktop
JInternalFrame itf = getDesktopPane().getSelectedFrame();
if (itf != null)
{
JInternalFrame itf = getDesktopPane().getSelectedFrame();
if (itf != null)
{
- if (itf instanceof AlignFrame)
+ if (itf.getContentPane() instanceof AlignFrame)
{
{
- Jalview.setCurrentAlignFrame((AlignFrame) itf);
+ Jalview.setCurrentAlignFrame((AlignFrame) itf.getContentPane());
}
itf.requestFocus();
}
}
itf.requestFocus();
}
@@
-987,7
+987,7
@@
public class Desktop extends GDesktop
{
menuItem.removeActionListener(menuItem.getActionListeners()[0]);
}
{
menuItem.removeActionListener(menuItem.getActionListeners()[0]);
}
- Desktop.getInstance().windowMenu.remove(menuItem);
+ getInstance().windowMenu.remove(menuItem);
}
});
}
});
@@
-1011,7
+1011,7
@@
public class Desktop extends GDesktop
getDesktopPane().add(frame);
getDesktopPane().add(frame);
- Desktop.getInstance().windowMenu.add(menuItem);
+ getInstance().windowMenu.add(menuItem);
frame.toFront();
try
frame.toFront();
try
@@
-1068,7
+1068,7
@@
public class Desktop extends GDesktop
{
if (!internalCopy)
{
{
if (!internalCopy)
{
- Desktop.getInstance().jalviewClipboard = null;
+ getInstance().jalviewClipboard = null;
}
internalCopy = false;
}
internalCopy = false;
@@
-1636,9
+1636,9
@@
public class Desktop extends GDesktop
}
AlignmentViewport source = null, target = null;
}
AlignmentViewport source = null, target = null;
- if (frames[0] instanceof AlignFrame)
+ if (frames[0] instanceof AlignFrame.IFrame)
{
{
- source = ((AlignFrame) frames[0]).getCurrentView();
+ source = ((AlignFrame.IFrame) frames[0]).alignframe.getCurrentView();
}
else if (frames[0] instanceof TreePanel)
{
}
else if (frames[0] instanceof TreePanel)
{
@@
-1662,9
+1662,10
@@
public class Desktop extends GDesktop
{
continue;
}
{
continue;
}
- if (frames[i] instanceof AlignFrame)
+ if (frames[i] instanceof AlignFrame.IFrame)
{
{
- target = ((AlignFrame) frames[i]).getCurrentView();
+ target = ((AlignFrame.IFrame) frames[i]).alignframe
+ .getCurrentView();
}
else if (frames[i] instanceof TreePanel)
{
}
else if (frames[i] instanceof TreePanel)
{
@@
-2080,7
+2081,8
@@
public class Desktop extends GDesktop
ap.av.setGatherViewsHere(false);
ap.av.setGatherViewsHere(false);
- addInternalFrame(newaf, af.getTitle(), AlignFrame.DEFAULT_WIDTH,
+ addInternalFrame(newaf, af.getTitle(),
+ AlignFrame.DEFAULT_WIDTH,
AlignFrame.DEFAULT_HEIGHT);
}
AlignFrame.DEFAULT_HEIGHT);
}
@@
-2106,9
+2108,10
@@
public class Desktop extends GDesktop
for (int t = 0; t < frames.length; t++)
{
for (int t = 0; t < frames.length; t++)
{
- if (frames[t] instanceof AlignFrame && frames[t] != source)
+ if (frames[t] instanceof AlignFrame.IFrame
+ && ((AlignFrame.IFrame) frames[t]).alignframe != source)
{
{
- AlignFrame af = (AlignFrame) frames[t];
+ AlignFrame af = ((AlignFrame.IFrame) frames[t]).alignframe;
boolean gatherThis = false;
for (int a = 0; a < af.alignPanels.size(); a++)
{
boolean gatherThis = false;
for (int a = 0; a < af.alignPanels.size(); a++)
{
@@
-2686,6
+2689,7
@@
public class Desktop extends GDesktop
}
}
}
}
}
}
+
}
/**
}
/**
@@
-2711,9
+2715,9
@@
public class Desktop extends GDesktop
// REVERSE ORDER
for (int i = frames.length - 1; i > -1; i--)
{
// REVERSE ORDER
for (int i = frames.length - 1; i > -1; i--)
{
- if (frames[i] instanceof AlignFrame)
+ if (frames[i].getContentPane() instanceof AlignFrame)
{
{
- avp.add((AlignFrame) frames[i]);
+ avp.add((AlignFrame) frames[i].getContentPane());
}
else if (frames[i] instanceof SplitFrame)
{
}
else if (frames[i] instanceof SplitFrame)
{
@@
-3160,7
+3164,7
@@
public class Desktop extends GDesktop
*/
public static void showUrl(final String url)
{
*/
public static void showUrl(final String url)
{
- showUrl(url, Desktop.getInstance());
+ showUrl(url, getInstance());
}
/**
}
/**
@@
-3209,7
+3213,7
@@
public class Desktop extends GDesktop
public static ParamManager getUserParameterStore()
{
public static ParamManager getUserParameterStore()
{
- Desktop d = Desktop.getInstance();
+ Desktop d = getInstance();
if (d.wsparamManager == null)
{
d.wsparamManager = new WsParamSetManager();
if (d.wsparamManager == null)
{
d.wsparamManager = new WsParamSetManager();
@@
-3500,7
+3504,7
@@
public class Desktop extends GDesktop
public static groovy.ui.Console getGroovyConsole()
{
public static groovy.ui.Console getGroovyConsole()
{
- Desktop desktop = Desktop.getInstance();
+ Desktop desktop = getInstance();
return desktop == null ? null : desktop.groovyConsole;
}
return desktop == null ? null : desktop.groovyConsole;
}
@@
-3773,4
+3777,10
@@
public class Desktop extends GDesktop
return result;
}
return result;
}
+ public static void addInternalFrame(AlignFrame af, String title,
+ int width, int height)
+ {
+ addInternalFrame(af.getIFrame(), title, width, height);
+ }
+
}
}