X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;f=src%2Fjalview%2Fappletgui%2FFontChooser.java;h=843ffe7fe48f0fd2b772604648bac9282ec71d06;hb=99f3f01792321efb671ac7ad946efffc3a3319a4;hp=eb29211000138fc769fdc0bceef878abbf192634;hpb=99c58ee0ae2a848f982552e53feaf6d5cb9925e5;p=jalview.git diff --git a/src/jalview/appletgui/FontChooser.java b/src/jalview/appletgui/FontChooser.java index eb29211..843ffe7 100755 --- a/src/jalview/appletgui/FontChooser.java +++ b/src/jalview/appletgui/FontChooser.java @@ -1,76 +1,145 @@ /* -* Jalview - A Sequence Alignment Editor and Viewer -* Copyright (C) 2005 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 -*/ + * Jalview - A Sequence Alignment Editor and Viewer + * Copyright (C) 2005 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.appletgui; -import jalview.jbappletgui.GFontChooser; -import jalview.appletgui.*; import java.awt.*; -import java.awt.event.*; +import java.awt.event.*; -public class FontChooser extends GFontChooser +public class FontChooser + extends Panel implements ActionListener, ItemListener { AlignmentPanel ap; + TreePanel tp; Font oldFont; boolean init = true; Frame frame; - public FontChooser(AlignmentPanel ap, Frame frame) + public FontChooser(TreePanel tp) { - super(); + try + { + jbInit(); + } + catch (Exception e) + { + e.printStackTrace(); + } - this.frame = frame; + this.tp = tp; + oldFont = tp.getTreeFont(); + init(); + } + + public FontChooser(AlignmentPanel ap) + { + try + { + jbInit(); + } + catch (Exception e) + { + e.printStackTrace(); + } this.ap = ap; + oldFont = ap.av.getFont(); + init(); + } + + void init() + { String fonts[] = Toolkit.getDefaultToolkit().getFontList(); - for(int i=0; i