dangsn
2024-12-26 4e9ff2ce6a830bb2340d7c8612c72eea0c5a553e
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
package com.vci.client.logon.client;
 
import javax.swing.UIManager;
import javax.swing.UnsupportedLookAndFeelException;
 
import com.l2fprod.gui.plaf.skin.Skin;
import com.l2fprod.gui.plaf.skin.SkinLookAndFeel;
import com.vci.client.ui.swing.VCISwingUtil;
 
public class BaseStyle {
    
    private static void setUIFont (javax.swing.plaf.FontUIResource f)
    {
        
        java.util.Enumeration<Object> keys = UIManager.getDefaults().keys();
        while (keys.hasMoreElements())
        {
            Object key = keys.nextElement();
            Object value = UIManager.get (key);
            if (value instanceof javax.swing.plaf.FontUIResource)
                UIManager.put (key, f);
        }
    }
    
    public static void initStyle() {
        try {
//            LookAndFeel alloyLnF = new com.incors.plaf.alloy.AlloyLookAndFeel();
//            javax.swing.UIManager.setLookAndFeel(alloyLnF);
            Skin skin = SkinLookAndFeel.loadThemePack(BaseStyle.class.getResource("/skin/aquathemepack.zip"));
            SkinLookAndFeel.setSkin(skin);
            //VCISwingUtil.setLookAndFeel("com.l2fprod.gui.plaf.skin.SkinLookAndFeel");
            //VCISwingUtil.setLookAndFeel("com.sun.java.swing.plaf.windows.windowsLookFeel");
            VCISwingUtil.setLookAndFeel();
        } catch (UnsupportedLookAndFeelException e) {
            e.printStackTrace();
        } catch (Exception e) {
            e.printStackTrace();
        }
        javax.swing.plaf.FontUIResource fontRes = new javax.swing.plaf.FontUIResource(VCISwingUtil.FONT_SONTTI_PLAN_14);
        setUIFont(fontRes);
    }
}