X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;f=src%2Fjalview%2Fgui%2FFontChooser.java;h=aaf0abcd41dfc26592623fc91e7ab658c24a3d89;hb=cbd8cafe5f1d302cf490d34a96f8231659afd402;hp=782d2d67de10415e114de7c805b05e8aaf925c57;hpb=6ab8366d05c5e884329e746b5df1fa169661ec4b;p=jalview.git diff --git a/src/jalview/gui/FontChooser.java b/src/jalview/gui/FontChooser.java index 782d2d6..aaf0abc 100755 --- a/src/jalview/gui/FontChooser.java +++ b/src/jalview/gui/FontChooser.java @@ -1,59 +1,259 @@ +/* + * Jalview - A Sequence Alignment Editor and Viewer + * Copyright (C) 2007 AM Waterhouse, J Procter, G Barton, M Clamp, S Searle + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA + */ package jalview.gui; -import jalview.jbgui.GFontChooser; -import jalview.gui.*; import java.awt.*; import java.awt.event.*; import javax.swing.*; -import javax.swing.event.*; +import jalview.bin.*; +import jalview.jbgui.*; -public class FontChooser extends GFontChooser +/** + * DOCUMENT ME! + * + * @author $author$ + * @version $Revision$ + */ +public class FontChooser + extends GFontChooser { AlignmentPanel ap; + TreePanel tp; Font oldFont; + boolean init = true; + JInternalFrame frame; + /** + * Creates a new FontChooser object. + * + * @param ap DOCUMENT ME! + */ + public FontChooser(TreePanel tp) + { + this.tp = tp; + ap = tp.treeCanvas.ap; + oldFont = tp.getTreeFont(); + defaultButton.setVisible(false); + smoothFont.setEnabled(false); + init(); + } + + /** + * Creates a new FontChooser object. + * + * @param ap DOCUMENT ME! + */ public FontChooser(AlignmentPanel ap) { + oldFont = ap.av.getFont(); this.ap = ap; + init(); + } + + void init() + { + frame = new JInternalFrame(); + frame.setContentPane(this); - String fonts[] = java.awt.GraphicsEnvironment.getLocalGraphicsEnvironment().getAvailableFontFamilyNames(); - for(int i=0; i