X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;f=forester%2Fjava%2Fsrc%2Forg%2Fforester%2Farchaeopteryx%2FTreeFontSet.java;h=22d3950eaef17969ec1b79a089bfc3c36f230fa5;hb=f2dd0dc88a6fca0bfda6bb756923af7f3b1624fd;hp=80c7bd239597b0f1d442e4d3cc0c3db5a33bb9f6;hpb=656be28debec520e0e35a8b311114398a40ea366;p=jalview.git diff --git a/forester/java/src/org/forester/archaeopteryx/TreeFontSet.java b/forester/java/src/org/forester/archaeopteryx/TreeFontSet.java index 80c7bd2..22d3950 100644 --- a/forester/java/src/org/forester/archaeopteryx/TreeFontSet.java +++ b/forester/java/src/org/forester/archaeopteryx/TreeFontSet.java @@ -48,6 +48,10 @@ public final class TreeFontSet { private Font _small_italic_font; private Font _large_italic_font; private Font _base_font; + private Font _small_font_system; + private Font _large_font_system; + private Font _small_italic_font_system; + private Font _large_italic_font_system; // Handy holders for font metrics public FontMetrics _fm_small; FontMetrics _fm_large; @@ -73,26 +77,48 @@ public final class TreeFontSet { setupFontMetrics(); } } + + void reset() { + _large_font_system = _large_font; + + } Font getBaseFont() { return _base_font; } - + + Font getLargeFont() { - return _large_font; + return getLargeFontSystem(); + } + + private Font getLargeFontSystem() { + return _large_font_system; } Font getLargeItalicFont() { return _large_italic_font; } + + Font getLargeItalicFontSystem() { + return _large_italic_font_system; + } public Font getSmallFont() { return _small_font; } + + public Font getSmallFontSystem() { + return _small_font_system; + } Font getSmallItalicFont() { return _small_italic_font; } + + Font getSmallItalicFontSystem() { + return _small_italic_font_system; + } void increaseFontSize() { _small_font = _small_font.deriveFont( _small_font.getSize() + FONT_SIZE_CHANGE_STEP ); @@ -112,6 +138,15 @@ public final class TreeFontSet { _large_font = new Font( getBaseFont().getFontName(), getBaseFont().getStyle(), getBaseFont().getSize() ); _small_italic_font = new Font( getBaseFont().getFontName(), italic, small_size ); _large_italic_font = new Font( getBaseFont().getFontName(), italic, getBaseFont().getSize() ); + _small_font_system = new Font( getBaseFont().getFontName(), getBaseFont().getStyle(), small_size ); + _large_font_system = new Font( getBaseFont().getFontName(), getBaseFont().getStyle(), getBaseFont().getSize() ); + _small_italic_font_system = new Font( getBaseFont().getFontName(), italic, small_size ); + _large_italic_font_system = new Font( getBaseFont().getFontName(), italic, getBaseFont().getSize() ); + + + + + setupFontMetrics(); }