{\r
final AlignmentPanel alignPanel;\r
final AlignViewport viewport;\r
- public static int NEW_WINDOW_WIDTH = 700;\r
- public static int NEW_WINDOW_HEIGHT = 500;\r
+ int NEW_WINDOW_WIDTH = 700;\r
+ int NEW_WINDOW_HEIGHT = 500;\r
jalview.bin.JalviewLite applet;\r
\r
\r
- public AlignFrame(AlignmentI al, jalview.bin.JalviewLite applet)\r
+ public AlignFrame(AlignmentI al, jalview.bin.JalviewLite applet, String title)\r
{\r
this.applet = applet;\r
viewport = new AlignViewport(al, applet);\r
wrapMenuItem_actionPerformed(null);\r
}\r
}\r
+\r
+ try\r
+ {\r
+ param = applet.getParameter("windowWidth");\r
+ if (param != null)\r
+ {\r
+ int width = Integer.parseInt(param);\r
+ NEW_WINDOW_WIDTH = width;\r
+ }\r
+ param = applet.getParameter("windowHeight");\r
+ if (param != null)\r
+ {\r
+ int height = Integer.parseInt(param);\r
+ NEW_WINDOW_HEIGHT = height;\r
+ }\r
+ }\r
+ catch (Exception ex)\r
+ {}\r
+\r
}\r
\r
this.addWindowListener(new WindowAdapter()\r
}\r
}\r
});\r
+\r
+ jalview.bin.JalviewLite.addFrame(this, title,\r
+ NEW_WINDOW_WIDTH,\r
+ NEW_WINDOW_HEIGHT);\r
+\r
+\r
}\r
\r
public void inputText_actionPerformed(ActionEvent e)\r
newSeqs[i] = (SequenceI) seqs.elementAt(i);\r
}\r
\r
- AlignFrame af = new AlignFrame(new Alignment(newSeqs), applet);\r
String newtitle = new String("Copied sequences");\r
if (getTitle().startsWith("Copied sequences"))\r
{\r
{\r
newtitle = newtitle.concat("- from " + getTitle());\r
}\r
+ AlignFrame af = new AlignFrame(new Alignment(newSeqs), applet, newtitle);\r
+\r
jalview.bin.JalviewLite.addFrame(af, newtitle, NEW_WINDOW_WIDTH,\r
NEW_WINDOW_HEIGHT);\r
}\r
\r
if (sequences != null)\r
{\r
- AlignFrame af = new AlignFrame(new Alignment(sequences), applet);\r
- jalview.bin.JalviewLite.addFrame(af, "Cut & Paste input - " + format,\r
- AlignFrame.NEW_WINDOW_WIDTH,\r
- AlignFrame.NEW_WINDOW_HEIGHT);\r
+ AlignFrame af = new AlignFrame(new Alignment(sequences), applet,\r
+ "Cut & Paste input - " + format);\r
af.statusBar.setText("Successfully pasted alignment file");\r
}\r
\r
seq[i] = (Sequence) sequences.elementAt(i);\r
}\r
\r
- AlignFrame af = new AlignFrame(new Alignment(seq), ap.alignFrame.applet);\r
- jalview.bin.JalviewLite.addFrame(af, "Pairwise Aligned Sequences",\r
- AlignFrame.NEW_WINDOW_WIDTH,\r
- AlignFrame.NEW_WINDOW_HEIGHT);\r
+ AlignFrame af = new AlignFrame(new Alignment(seq),\r
+ ap.alignFrame.applet,\r
+ "Pairwise Aligned Sequences");\r
\r
}\r
\r
}\r
}\r
\r
- AlignFrame.NEW_WINDOW_WIDTH = 700;\r
- AlignFrame.NEW_WINDOW_HEIGHT = 500;\r
- try{\r
- param = applet.getParameter("windowWidth");\r
- if (param != null)\r
- {\r
- int width = Integer.parseInt(param);\r
- AlignFrame.NEW_WINDOW_WIDTH = width;\r
- }\r
- param = applet.getParameter("windowHeight");\r
- if (param != null)\r
- {\r
- int height = Integer.parseInt(param);\r
- AlignFrame.NEW_WINDOW_HEIGHT = height;\r
- }\r
- }catch(Exception ex){}\r
-\r
this.setBackground(new Color(r, g, b));\r
\r
file = getParameter("file");\r
\r
if ( (sequences != null) && (sequences.length > 0))\r
{\r
- AlignFrame af = new AlignFrame(new Alignment(sequences), null);\r
- addFrame(af, args[0], AlignFrame.NEW_WINDOW_WIDTH,\r
- AlignFrame.NEW_WINDOW_HEIGHT);\r
+ AlignFrame af = new AlignFrame(new Alignment(sequences), null, args[0]);\r
af.statusBar.setText("Successfully loaded file " + args[0]);\r
}\r
}\r
if ((sequences != null) && (sequences.length > 0))\r
{\r
AlignFrame af = new AlignFrame(new Alignment(sequences),\r
- jlapplet);\r
- addFrame(af, file, AlignFrame.NEW_WINDOW_WIDTH,\r
- AlignFrame.NEW_WINDOW_HEIGHT);\r
+ jlapplet, file);\r
af.statusBar.setText("Successfully loaded file " + file);\r
}\r
else\r