java.lang.Object
java.awt.Font
javax.swing.plaf.FontUIResource
- 所有已实现的接口:
-
Serializable
,UIResource
一个实现了UIResource的java.awt.Font子类。设置默认字体属性的UI类应该使用这个类。
警告: 该类的序列化对象将不兼容未来的Swing版本。当前的序列化支持适用于短期存储或在运行相同Swing版本的应用程序之间的RMI。从1.4版本开始,已经在java.beans
包中添加了对所有JavaBeans的长期存储支持。请参阅XMLEncoder
。
- 参见:
-
Field Summary
Fields declared in class java.awt.Font
BOLD, CENTER_BASELINE, DIALOG, DIALOG_INPUT, HANGING_BASELINE, ITALIC, LAYOUT_LEFT_TO_RIGHT, LAYOUT_NO_LIMIT_CONTEXT, LAYOUT_NO_START_CONTEXT, LAYOUT_RIGHT_TO_LEFT, MONOSPACED, name, PLAIN, pointSize, ROMAN_BASELINE, SANS_SERIF, SERIF, size, style, TRUETYPE_FONT, TYPE1_FONT
-
Constructor Summary
ConstructorDescriptionFontUIResource
(Font font) 构造一个FontUIResource
。FontUIResource
(String name, int style, int size) 构造一个FontUIResource
。 -
Method Summary
Methods declared in class java.awt.Font
canDisplay, canDisplay, canDisplayUpTo, canDisplayUpTo, canDisplayUpTo, createFont, createFont, createFonts, createFonts, createGlyphVector, createGlyphVector, createGlyphVector, createGlyphVector, decode, deriveFont, deriveFont, deriveFont, deriveFont, deriveFont, deriveFont, equals, getAttributes, getAvailableAttributes, getBaselineFor, getFamily, getFamily, getFont, getFont, getFont, getFontName, getFontName, getItalicAngle, getLineMetrics, getLineMetrics, getLineMetrics, getLineMetrics, getMaxCharBounds, getMissingGlyphCode, getName, getNumGlyphs, getPSName, getSize, getSize2D, getStringBounds, getStringBounds, getStringBounds, getStringBounds, getStyle, getTransform, hashCode, hasLayoutAttributes, hasUniformLineMetrics, isBold, isItalic, isPlain, isTransformed, layoutGlyphVector, textRequiresLayout, toString
-
Constructor Details
-
FontUIResource
构造一个FontUIResource
。- 参数:
-
name
- 字体名称 -
style
- 字体的样式常量 -
size
- 字体的点大小
-
FontUIResource
构造一个FontUIResource
。- 参数:
-
font
- 字体
-