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
TreePanel takes viewport
[jalview.git]
/
src
/
jalview
/
gui
/
Desktop.java
diff --git
a/src/jalview/gui/Desktop.java
b/src/jalview/gui/Desktop.java
index
a705386
..
97c6a20
100755
(executable)
--- a/
src/jalview/gui/Desktop.java
+++ b/
src/jalview/gui/Desktop.java
@@
-115,6
+115,7
@@
public class Desktop extends jalview.jbgui.GDesktop
frame.setLayer(JLayeredPane.PALETTE_LAYER);
frame.setLocation((int) ((getWidth() - 750) / 2),
(int) ((getHeight() - 160) / 2));
frame.setLayer(JLayeredPane.PALETTE_LAYER);
frame.setLocation((int) ((getWidth() - 750) / 2),
(int) ((getHeight() - 160) / 2));
+
addInternalFrame(frame, "", 750, 160, false);
discoverer=new jalview.ws.Discoverer(); // Only gets started if gui is displayed.
addInternalFrame(frame, "", 750, 160, false);
discoverer=new jalview.ws.Discoverer(); // Only gets started if gui is displayed.
@@
-128,7
+129,7
@@
public class Desktop extends jalview.jbgui.GDesktop
* @param w DOCUMENT ME!
* @param h DOCUMENT ME!
*/
* @param w DOCUMENT ME!
* @param h DOCUMENT ME!
*/
- public static void addInternalFrame(final JInternalFrame frame,
+ public static synchronized void addInternalFrame(final JInternalFrame frame,
String title, int w, int h)
{
addInternalFrame(frame, title, w, h, true);
String title, int w, int h)
{
addInternalFrame(frame, title, w, h, true);
@@
-143,7
+144,7
@@
public class Desktop extends jalview.jbgui.GDesktop
* @param h DOCUMENT ME!
* @param resizable DOCUMENT ME!
*/
* @param h DOCUMENT ME!
* @param resizable DOCUMENT ME!
*/
- public static void addInternalFrame(final JInternalFrame frame,
+ public static synchronized void addInternalFrame(final JInternalFrame frame,
String title, int w, int h, boolean resizable)
{
String title, int w, int h, boolean resizable)
{
@@
-163,17
+164,9
@@
public class Desktop extends jalview.jbgui.GDesktop
}
}
- desktop.add(frame);
openFrameCount++;
openFrameCount++;
- try
- {
- frame.setSelected(true);
- }
- catch (java.beans.PropertyVetoException e)
- {
- }
-
+ frame.setVisible(true);
frame.setClosable(true);
frame.setResizable(resizable);
frame.setMaximizable(resizable);
frame.setClosable(true);
frame.setResizable(resizable);
frame.setMaximizable(resizable);
@@
-182,10
+175,13
@@
public class Desktop extends jalview.jbgui.GDesktop
if (frame.getX()<1 && frame.getY()<1)
{
if (frame.getX()<1 && frame.getY()<1)
{
- frame.setLocation(xOffset * openFrameCount, yOffset * (openFrameCount%10)+yOffset);
+ frame.setLocation(xOffset * openFrameCount, yOffset * ((openFrameCount-1)%10)+yOffset);
}
}
- frame.toFront();
+ desktop.add(frame);
+ frame.toFront();
+
+
final JMenuItem menuItem = new JMenuItem(title);
frame.addInternalFrameListener(new javax.swing.event.InternalFrameAdapter()
{
final JMenuItem menuItem = new JMenuItem(title);
frame.addInternalFrameListener(new javax.swing.event.InternalFrameAdapter()
{
@@
-209,13
+205,11
@@
public class Desktop extends jalview.jbgui.GDesktop
}
catch (java.beans.PropertyVetoException ex)
{
}
catch (java.beans.PropertyVetoException ex)
{
- }
- ;
+ }
}
});
}
});
- frame.setVisible(true);
windowMenu.add(menuItem);
}
windowMenu.add(menuItem);
}