From: amwaterhouse Date: Thu, 10 Mar 2005 10:12:48 +0000 (+0000) Subject: search and font frames are now internalframes X-Git-Tag: Release_2_0~603 X-Git-Url: http://source.jalview.org/gitweb/?a=commitdiff_plain;h=798a8f1eda50a57b71e21df22e015da1364ffd1c;p=jalview.git search and font frames are now internalframes --- diff --git a/src/jalview/gui/AlignFrame.java b/src/jalview/gui/AlignFrame.java index 9566bb5..4209455 100755 --- a/src/jalview/gui/AlignFrame.java +++ b/src/jalview/gui/AlignFrame.java @@ -34,6 +34,15 @@ public class AlignFrame extends GAlignFrame { super(); viewport = new AlignViewport(al,true,true,true,false); + + String fontName = jalview.bin.Cache.getProperty("FONT_NAME"); + String fontStyle= jalview.bin.Cache.getProperty("FONT_STYLE"); + String fontSize = jalview.bin.Cache.getProperty("FONT_SIZE"); + if(fontName!=null && fontStyle!=null && fontSize!=null) + viewport.setFont( new Font(fontName,Integer.parseInt(fontStyle),Integer.parseInt(fontSize)) ); + + + alignPanel = new AlignmentPanel(this, viewport); getContentPane().add(alignPanel, java.awt.BorderLayout.CENTER); @@ -509,25 +518,21 @@ public class AlignFrame extends GAlignFrame public void findMenuItem_actionPerformed(ActionEvent e) { - JOptionPane op = new JOptionPane(); - JInternalFrame frame = op.createInternalFrame(this, "Find"); - Finder finder = new Finder(viewport, alignPanel, frame); - frame.setClosable(true); - frame.setContentPane(finder); - frame.setSize(340,110); - frame.setVisible(true); + JInternalFrame frame = new JInternalFrame(); + Finder finder = new Finder(viewport, alignPanel, frame); + frame.setContentPane(finder); + Desktop.addInternalFrame(frame, "Find", 340,110); + } public void font_actionPerformed(ActionEvent e) { - JOptionPane op = new JOptionPane(); - JInternalFrame frame = op.createInternalFrame(this, "Change Font"); - FontChooser fc = new FontChooser( alignPanel ); - frame.setClosable(true); + // JOptionPane op = new JOptionPane(); + JInternalFrame frame = new JInternalFrame(); + FontChooser fc = new FontChooser( alignPanel, frame ); frame.setContentPane(fc); - frame.setSize(480, 100); - frame.setVisible(true); + Desktop.addInternalFrame(frame, "Change Font", 480,100); } protected void colourTextMenuItem_actionPerformed(ActionEvent e)