📄 fontmanager.java
字号:
// Decompiled by DJ v3.7.7.81 Copyright 2004 Atanas Neshkov Date: 2007-11-23 16:17:31
// Home Page : http://members.fortunecity.com/neshkov/dj.html - Check often for new version!
// Decompiler options: packimports(3)
// Source File Name: FontManager.java
package com.bokai.drawing;
// Referenced classes of package com.bokai.drawing:
// FontInfo, FontInfoImpl, FontSpec, SansSerif_10,
// SansSerif_11, SansSerif_12, SansSerif_14, SansSerif_16,
// SansSerif_18, SansSerif_20, SansSerif_22, SansSerif_24,
// SansSerif_8, SansSerif_9
public class FontManager
{
private FontManager()
{
}
static Class _mthclass$(String s)
{
try
{
return Class.forName(s);
}
catch(ClassNotFoundException classnotfoundexception)
{
throw new NoClassDefFoundError(classnotfoundexception.getMessage());
}
}
public FontInfo getFont(String s, int i, int j)
{
int k = 0;
int l = 0;
for(int i1 = 0; i1 < _fontSpecs.length; i1++)
{
if(i1 == 0)
{
k = 0;
l = _fontSpecs[i1].getSize();
} else
{
int j1 = _fontSpecs[i1].getSize();
if(l > j)
{
if(j1 < l)
{
k = i1;
l = j1;
}
} else
if(l < j && j1 > l && j1 <= j)
{
k = i1;
l = j1;
}
}
if(l == j)
break;
}
return getFontInfo(k);
}
public static FontInfo getFontInfo(int i)
{
if(_fontInfos == null)
synchronized(com.bokai.drawing.FontManager.class)
{
if(_fontInfos == null)
{
_fontInfos = new FontInfo[_fontSpecs.length];
for(int j = 0; j < _fontSpecs.length; j++)
_fontInfos[j] = null;
}
}
if(_fontInfos[i] == null)
synchronized(com.bokai.drawing.FontManager.class)
{
if(_fontInfos[i] == null)
_fontInfos[i] = new FontInfoImpl(_fontSpecs[i]);
}
return _fontInfos[i];
}
public static FontManager getFontManager()
{
if(_fontManager == null)
synchronized(com.bokai.drawing.FontManager.class)
{
if(_fontManager == null)
_fontManager = new FontManager();
}
return _fontManager;
}
private static FontManager _fontManager = null;
static FontSpec _fontSpecs[] = {
new SansSerif_8(), new SansSerif_9(), new SansSerif_10(), new SansSerif_11(), new SansSerif_12(), new SansSerif_14(), new SansSerif_16(), new SansSerif_18(), new SansSerif_20(), new SansSerif_22(),
new SansSerif_24()
};
static FontInfo _fontInfos[] = null;
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -