软件包 | 描述 |
---|---|
java.awt |
包含创建用户界面和绘制图形和图像的所有类。
|
java.awt.font |
提供有关字体的类和接口。
|
javax.accessibility |
定义用户界面组件和提供对这些组件的访问的辅助技术之间的一个合同。
|
javax.swing |
提供了一套“轻量级”(所有的java语言)组件,以最大可能的程度,在所有平台上工作。
|
javax.swing.border |
提供用于绘图的类和接口,以绘制一个摆动组件的专门边框。
|
javax.swing.plaf |
提供一个接口和抽象类的使用许多摆动为可插拔的外观和感觉的能力。
|
javax.swing.plaf.basic |
根据基本的外观和感觉提供内置的用户界面对象。
|
javax.swing.plaf.nimbus |
提供用户界面对象建立跨平台的灵气的外观和感觉。
|
javax.swing.plaf.synth |
它是一个可更换皮肤的外观和感觉的绘画是授。
|
javax.swing.table |
处理
javax.swing.JTable 提供类和接口。
|
javax.swing.text |
提供类和接口处理编辑和不可编辑的文本组件。
|
javax.swing.text.html |
提供类
HTMLEditorKit 和创建HTML文本编辑器支持类。
|
javax.swing.tree |
处理
javax.swing.JTree 提供类和接口。
|
Modifier and Type | Field and Description |
---|---|
protected Font |
FontMetrics.font
实际
Font 从字体度量了。
|
Modifier and Type | Method and Description |
---|---|
static Font |
Font.createFont(int fontFormat, File fontFile)
返回使用指定的字体类型和指定的字体文件的新
Font 。
|
static Font |
Font.createFont(int fontFormat, InputStream fontStream)
返回使用指定的字体和输入数据的新
Font 。
|
static Font |
Font.decode(String str)
返回
Font ,
str 参数描述。
|
Font |
Font.deriveFont(AffineTransform trans)
通过复制当前
Font 对象和应用新的变换,它创建了一个新的
Font 对象。
|
Font |
Font.deriveFont(float size)
通过复制当前
Font 对象和应用新的尺寸,它创建了一个新的
Font 对象。
|
Font |
Font.deriveFont(int style)
通过复制当前
Font 对象和应用一种新的风格,它创建了一个新的
Font 对象。
|
Font |
Font.deriveFont(int style, AffineTransform trans)
创建一个新的
Font 对象通过复制这种
Font 对象和应用一种新的风格和变换。
|
Font |
Font.deriveFont(int style, float size)
通过复制这种
Font 对象和应用一种新的样式和大小创建一个新的
Font 对象。
|
Font |
Font.deriveFont(Map<? extends AttributedCharacterIterator.Attribute,?> attributes)
通过复制当前
Font 对象和应用一套新的字体属性,它创建了一个新的
Font 对象。
|
abstract Font[] |
GraphicsEnvironment.getAllFonts()
返回一个数组包含所有字体在这
GraphicsEnvironment 可用一一点大小的实例。
|
Font |
MenuContainer.getFont() |
abstract Font |
Graphics.getFont()
获取当前字体。
|
Font |
List.AccessibleAWTList.AccessibleAWTListChild.getFont()
获取此对象的字体。
|
Font |
MenuComponent.getFont()
获取用于此菜单组件的字体。
|
Font |
MenuComponent.AccessibleAWTMenuComponent.getFont()
获取此对象的
Font 。
|
Font |
FontMetrics.getFont()
得到
Font 这个
FontMetrics 对象描述。
|
Font |
Component.getFont()
获取此组件的字体。
|
Font |
Component.AccessibleAWTComponent.getFont()
获取此对象的
Font 。
|
static Font |
Font.getFont(Map<? extends AttributedCharacterIterator.Attribute,?> attributes)
返回一个
Font 适当的属性。
|
static Font |
Font.getFont(String nm)
返回系统属性列表
Font 对象。
|
static Font |
Font.getFont(String nm, Font font)
从系统属性列表获取指定的
Font 。
|
Modifier and Type | Method and Description |
---|---|
static Font |
Font.getFont(String nm, Font font)
从系统属性列表获取指定的
Font 。
|
abstract FontMetrics |
Graphics.getFontMetrics(Font f)
获取指定字体的字体度量。
|
FontMetrics |
List.AccessibleAWTList.AccessibleAWTListChild.getFontMetrics(Font f)
获得此对象的FontMetrics。
|
FontMetrics |
MenuComponent.AccessibleAWTMenuComponent.getFontMetrics(Font f)
获取此对象的
FontMetrics 。
|
FontMetrics |
Component.getFontMetrics(Font font)
获取指定字体的字体度量。
|
FontMetrics |
Component.AccessibleAWTComponent.getFontMetrics(Font f)
获取此对象的
FontMetrics 。
|
abstract FontMetrics |
Toolkit.getFontMetrics(Font font)
过时的。
作为JDK 1.2版本,由
Font getLineMetrics 更换方法。
|
boolean |
GraphicsEnvironment.registerFont(Font font)
注册一个空创建
Font in这
GraphicsEnvironment 。
|
abstract void |
Graphics.setFont(Font font)
将此图形上下文的字体设置为指定的字体。
|
void |
List.AccessibleAWTList.AccessibleAWTListChild.setFont(Font f)
设置此对象的字体。
|
void |
Container.setFont(Font f)
设置此容器的字体。
|
void |
MenuComponent.setFont(Font f)
将此菜单组件的字体设置为指定的字体。
|
void |
MenuComponent.AccessibleAWTMenuComponent.setFont(Font f)
设置此对象的
Font 。
|
void |
Component.setFont(Font f)
设置此组件的字体。
|
void |
Component.AccessibleAWTComponent.setFont(Font f)
设置此对象的
Font 。
|
Constructor and Description |
---|
Font(Font font)
创建从指定一个新的
Font
font 。
|
FontMetrics(Font font)
创造发现的高度和宽度对指定的
Font 和个性符号,
Font 信息的一种新的
FontMetrics 对象。
|
Modifier and Type | Method and Description |
---|---|
Font |
MultipleMaster.deriveMMFont(float[] axes)
根据包含在指定数组中的设计轴值,创建一个多主字体的新实例。
|
Font |
MultipleMaster.deriveMMFont(float[] glyphWidths, float avgStemWidth, float typicalCapHeight, float typicalXHeight, float italicAngle)
创建一个基于详细度量信息的多主字体的新实例。
|
abstract Font |
GlyphVector.getFont()
返回与此相关的
Font
GlyphVector 。
|
Constructor and Description |
---|
TextLayout(String string, Font font, FontRenderContext frc)
|
Modifier and Type | Method and Description |
---|---|
Font |
AccessibleComponent.getFont()
获取此对象的字体。
|
Modifier and Type | Method and Description |
---|---|
FontMetrics |
AccessibleComponent.getFontMetrics(Font f)
获取此对象的根据。
|
void |
AccessibleComponent.setFont(Font f)
设置此对象的字体。
|
Modifier and Type | Method and Description |
---|---|
Font |
DebugGraphics.getFont()
返回用于文本绘制操作的字体。
|
Font |
JList.AccessibleJList.AccessibleJListChild.getFont() |
Font |
JTree.AccessibleJTree.AccessibleJTreeNode.getFont() |
Font |
JTable.AccessibleJTable.AccessibleJTableCell.getFont()
获取此对象的
Font 。
|
Font |
UIDefaults.getFont(Object key)
如果
key 的值是一个
Font 返回,否则返回
null 。
|
static Font |
UIManager.getFont(Object key)
从默认值返回一个字体。
|
Font |
UIDefaults.getFont(Object key, Locale l)
如果
key 对于给定的
Locale 的值是一个
Font 返回,否则返回
null 。
|
static Font |
UIManager.getFont(Object key, Locale l)
从适当的默认值返回一个字体,这是适当的给定的语言环境。
|
Modifier and Type | Method and Description |
---|---|
static TitledBorder |
BorderFactory.createTitledBorder(Border border, String title, int titleJustification, int titlePosition, Font titleFont)
添加一个标题到一个现有的边框,用指定的定位和字体,并使用默认的文本颜色(由当前的外观和感觉决定)。
|
static TitledBorder |
BorderFactory.createTitledBorder(Border border, String title, int titleJustification, int titlePosition, Font titleFont, Color titleColor)
添加一个标题到一个现有的边框,用指定的定位,字体和颜色。
|
FontMetrics |
JComponent.getFontMetrics(Font font)
获取指定
Font 的
FontMetrics 。
|
FontMetrics |
DebugGraphics.getFontMetrics(Font f)
覆盖
Graphics.getFontMetrics 。
|
FontMetrics |
JList.AccessibleJList.AccessibleJListChild.getFontMetrics(Font f) |
FontMetrics |
JTree.AccessibleJTree.AccessibleJTreeNode.getFontMetrics(Font f) |
FontMetrics |
JTable.AccessibleJTable.AccessibleJTableCell.getFontMetrics(Font f)
获取此对象的
FontMetrics 。
|
void |
JComponent.setFont(Font font)
为该组件设置字体。
|
void |
DebugGraphics.setFont(Font aFont)
设置用于文本绘制操作的字体。
|
void |
JList.AccessibleJList.AccessibleJListChild.setFont(Font f) |
void |
JTree.AccessibleJTree.AccessibleJTreeNode.setFont(Font f) |
void |
JTextArea.setFont(Font f)
设置当前字体。
|
void |
JTable.AccessibleJTable.AccessibleJTableCell.setFont(Font f)
设置此对象的
Font 。
|
void |
JTextField.setFont(Font f)
设置当前字体。
|
void |
JSlider.setFont(Font font)
为该组件设置字体。
|
Modifier and Type | Field and Description |
---|---|
protected Font |
TitledBorder.titleFont |
Modifier and Type | Method and Description |
---|---|
protected Font |
TitledBorder.getFont(Component c) |
Font |
TitledBorder.getTitleFont()
返回标题边框的标题字体。
|
Modifier and Type | Method and Description |
---|---|
void |
TitledBorder.setTitleFont(Font titleFont)
设置标题边框的标题字体。
|
Constructor and Description |
---|
TitledBorder(Border border, String title, int titleJustification, int titlePosition, Font titleFont)
创建一个具有指定边界,TitledBorder实例标题,标题对齐,标题的位置,和标题字体。
|
TitledBorder(Border border, String title, int titleJustification, int titlePosition, Font titleFont, Color titleColor)
创建一个具有指定边界,TitledBorder实例标题,标题对齐,标题的位置,标题的字体、颜色和标题。
|
Modifier and Type | Class and Description |
---|---|
class |
FontUIResource
java.awt.font uiresource子类实现的。
|
Constructor and Description |
---|
FontUIResource(Font font) |
TitledBorderUIResource(Border border, String title, int titleJustification, int titlePosition, Font titleFont) |
TitledBorderUIResource(Border border, String title, int titleJustification, int titlePosition, Font titleFont, Color titleColor) |
Modifier and Type | Field and Description |
---|---|
protected Font |
BasicMenuItemUI.acceleratorFont |
Modifier and Type | Method and Description |
---|---|
protected void |
BasicTabbedPaneUI.paintText(Graphics g, int tabPlacement, Font font, FontMetrics metrics, int tabIndex, String title, Rectangle textRect, boolean isSelected) |
Modifier and Type | Method and Description |
---|---|
protected Font |
NimbusStyle.getFontForState(SynthContext ctx)
返回指定状态的字体。
|
Modifier and Type | Method and Description |
---|---|
Font |
SynthStyle.getFont(SynthContext context)
返回指定状态的字体。
|
protected abstract Font |
SynthStyle.getFontForState(SynthContext context)
返回指定状态的字体。
|
Modifier and Type | Method and Description |
---|---|
int |
SynthGraphicsUtils.computeStringWidth(SynthContext ss, Font font, FontMetrics metrics, String text)
返回字符串中传递的大小。
|
Dimension |
SynthGraphicsUtils.getMaximumSize(SynthContext ss, Font font, String text, Icon icon, int hAlign, int vAlign, int hTextPosition, int vTextPosition, int iconTextGap, int mnemonicIndex)
返回正确呈现图标和文本所需的最大大小。
|
Dimension |
SynthGraphicsUtils.getMinimumSize(SynthContext ss, Font font, String text, Icon icon, int hAlign, int vAlign, int hTextPosition, int vTextPosition, int iconTextGap, int mnemonicIndex)
返回正确呈现图标和文本所需的最小尺寸。
|
Dimension |
SynthGraphicsUtils.getPreferredSize(SynthContext ss, Font font, String text, Icon icon, int hAlign, int vAlign, int hTextPosition, int vTextPosition, int iconTextGap, int mnemonicIndex)
返回正确呈现图标和文本所需的首选大小。
|
Modifier and Type | Method and Description |
---|---|
Font |
JTableHeader.AccessibleJTableHeader.AccessibleJTableHeaderEntry.getFont() |
Modifier and Type | Method and Description |
---|---|
FontMetrics |
JTableHeader.AccessibleJTableHeader.AccessibleJTableHeaderEntry.getFontMetrics(Font f) |
void |
JTableHeader.AccessibleJTableHeader.AccessibleJTableHeaderEntry.setFont(Font f) |
Modifier and Type | Method and Description |
---|---|
Font |
GlyphView.getFont()
取字体,字形应根据。
|
Font |
LabelView.getFont()
取字体,字形应根据。
|
Font |
StyledDocument.getFont(AttributeSet attr)
需要一组属性,并将其变成一个字体规范。
|
Font |
DefaultStyledDocument.getFont(AttributeSet attr)
从属性集获取字体。
|
Font |
StyleContext.getFont(AttributeSet attr)
从属性集获取字体。
|
Font |
StyleContext.getFont(String family, int style, int size)
获取一个新字体。
|
Modifier and Type | Method and Description |
---|---|
FontMetrics |
StyleContext.getFontMetrics(Font f)
返回字体的字体度量。
|
Modifier and Type | Method and Description |
---|---|
Font |
StyleSheet.getFont(AttributeSet a)
取字体使用给定的属性。
|
Modifier and Type | Field and Description |
---|---|
protected Font |
DefaultTreeCellEditor.font
字体来画,
null 表示字体渲染器是用于。
|
Modifier and Type | Method and Description |
---|---|
Font |
DefaultTreeCellRenderer.getFont()
获取此组件的字体。
|
Font |
DefaultTreeCellEditor.getFont()
获取用于编辑的字体。
|
Font |
DefaultTreeCellEditor.DefaultTextField.getFont() |
Modifier and Type | Method and Description |
---|---|
void |
DefaultTreeCellRenderer.setFont(Font font)
子图的
FontUIResource s空。
|
void |
DefaultTreeCellEditor.setFont(Font font)
设置要编辑的字体。
|
Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.