📄 simplefont.java
字号:
// Decompiled by DJ v3.7.7.81 Copyright 2004 Atanas Neshkov Date: 2007-11-23 16:17:32
// Home Page : http://members.fortunecity.com/neshkov/dj.html - Check often for new version!
// Decompiler options: packimports(3)
// Source File Name: SimpleFont.java
package com.bokai.drawing;
import java.awt.Font;
public class SimpleFont
{
public SimpleFont(Font font)
{
_font = font;
_name = font.getName();
_style = font.getStyle();
_size = font.getSize();
}
public SimpleFont(String s, int i, int j)
{
_font = null;
_name = s;
_style = i;
_size = j;
}
public SimpleFont clone(int i)
{
if(_font == null)
return new SimpleFont(_name, _style, _size * i);
else
return new SimpleFont(new Font(_name, _style, _size * i));
}
boolean equals(SimpleFont simplefont)
{
return _style == simplefont.getStyle() && _size == simplefont.getSize() && _name.equals(simplefont.getName());
}
public Font getFont()
{
return _font;
}
public String getName()
{
return _name;
}
public int getSize()
{
return _size;
}
public int getStyle()
{
return _style;
}
public Font realizeFont()
{
if(_font != null)
{
return _font;
} else
{
_font = new Font(_name, _style, _size);
return _font;
}
}
private Font _font;
private String _name;
private int _style;
private int _size;
public static final int PLAIN = 0;
public static final int BOLD = 1;
public static final int ITALIC = 2;
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -