~ubuntu-branches/ubuntu/lucid/monajat/lucid

« back to all changes in this revision

Viewing changes to src/monajat/gui/main/GuiFontSetter.java

  • Committer: Bazaar Package Importer
  • Author(s): أحمد المحمودي (Ahmed El-Mahmoudy)
  • Date: 2009-12-21 10:36:41 UTC
  • mfrom: (1.1.1 upstream)
  • Revision ID: james.westby@ubuntu.com-20091221103641-i7o1qicc69y4py8q
Tags: 2.3.1-0ubuntu1
* New upstream release. (LP: #506085)
* Code is re-written in python, hence packaging changed accordingly.
* Added manpages for monajat-applet & monajat-mod
* Added patch desktop.diff to:
  + Remove Encoding field.
  + Add X-Islamic-Software category.
  + Replace irrevelant categories with Utility.
* debian/copyright: Updated & converted to machine-readable format.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
/*
2
 
 *         Copyright (C) 2008 Fadi Al-katout (cutout) <cutout33@gmail.com>
3
 
 * 
4
 
 *  Monajat is free software; you can redistribute it and/or modify   
5
 
 * it under the terms of the GNU General  Public Licence as published by the 
6
 
 * Free Software Foundation;  either version 2 of the Licence, 
7
 
 * or(at your option) any later version.
8
 
 * 
9
 
 * Monajat is distributed in  the hope that it will be useful,
10
 
 * but WITHOUT ANY WARRANTY;  without even the implied warranty of
11
 
 * MERCHANTABILITY or FITNESS FOR A  PARTICULAR PURPOSE. 
12
 
 * See the GNU General  Public Licence for more details.
13
 
 * 
14
 
 * You should have received a copy of  the GNU General Public Licence
15
 
 * along with Monajat; 
16
 
 * if not, write to  the Free Software Foundation, Inc.,
17
 
 * 51 Franklin Street, Fifth Floor,  Boston, MA  02110-1301, USA
18
 
 */
19
 
 
20
 
package monajat.gui.main;
21
 
import java.awt.Font;
22
 
 
23
 
import javax.swing.SwingUtilities;
24
 
import javax.swing.UIManager;
25
 
import javax.swing.plaf.FontUIResource;
26
 
 
27
 
public final class GuiFontSetter {
28
 
 
29
 
 
30
 
        public static void adjustFont(MonajatPreferences pPreferences) {
31
 
                Object[] objs = UIManager.getLookAndFeel().getDefaults().keySet().toArray();
32
 
                for (int i = 0; i < objs.length; i++) {
33
 
                        if (objs[i].toString().toUpperCase().indexOf(".FONT") != -1) {
34
 
                                Font font = UIManager.getFont(objs[i]);
35
 
                                font = new Font("Times New Roman", Font.PLAIN, 13);
36
 
                                UIManager.put(objs[i], new FontUIResource(font));
37
 
                        }
38
 
                }
39
 
                SwingUtilities.updateComponentTreeUI(pPreferences);
40
 
                pPreferences.repaint();
41
 
        }
42
 
        
43
 
}