1 25 26 package net.yagga.miniinstaller.gui; 27 28 import java.awt.*; 29 import javax.swing.*; 30 31 import net.yagga.util.Ut; 32 37 public class GuiProperties { 38 39 private static final String TIMES_ROMAN="TimesRoman"; 40 private static final String DIALOG="Dialog"; 41 42 static Font titleFont; 43 46 static Font stepFont; 47 static Font selectedStepFont; 48 49 static Font smallTitleFont; 50 static Font textFont; 51 52 public static void init() { 53 setTitleFont(TIMES_ROMAN,Font.BOLD | Font.ITALIC, 20); 54 setStepFont(DIALOG,0, 12); 55 setSmallTitleFont(DIALOG,0, 12); 56 setTextFont(DIALOG,0,12); 57 } 58 59 60 public static void setTitleFont(String fontFace, int style, int size){ 61 titleFont=new Font(fontFace,style,size); 62 } 63 public static void setSmallTitleFont(String fontFace, int style, int size){ 64 smallTitleFont=new Font(fontFace,style,size); 65 } 66 public static void setTextFont(String fontFace, int style, int size){ 67 textFont=new Font(fontFace,style,size); 68 } 69 public static void setStepFont(String fontFace, int style, int size){ 70 stepFont=new Font(fontFace,style,size); 71 selectedStepFont=new Font(fontFace,style | Font.BOLD, size); 72 } 73 74 public static Font makeBold(Font font){ 75 Font f=new Font(font.getFontName(),font.getStyle() | Font.BOLD, font.getSize()); 76 return f; 77 } 78 public static Font makeItalic(Font font){ 79 Font f=new Font(font.getFontName(),font.getStyle() | Font.ITALIC, font.getSize()); 80 return f; 81 } 82 } | Popular Tags |