软件包 | 描述 |
---|---|
java.text |
提供用于处理独立于自然语言的方式处理文本、日期、数字和消息的类和接口。
|
java.time.format |
提供打印和解析日期和时间的类。
|
javax.swing |
提供了一套“轻量级”(所有的java语言)组件,以最大可能的程度,在所有平台上工作。
|
javax.swing.text |
提供类和接口处理编辑和不可编辑的文本组件。
|
Modifier and Type | Class and Description |
---|---|
class |
ChoiceFormat
一个
ChoiceFormat 允许你附加格式的数字范围。
|
class |
DateFormat
DateFormat 是一个抽象类的子类格式的日期/时间格式化和解析日期或独立于语言的方式时间。
|
class |
DecimalFormat
DecimalFormat 是
NumberFormat 格式小数的一个具体的子类。
|
class |
MessageFormat
MessageFormat 提供了一种方法,在一个中性的语言方式产生级联邮件。
|
class |
NumberFormat
NumberFormat 是抽象基类的所有数字格式。
|
class |
SimpleDateFormat
SimpleDateFormat 是格式和语言环境敏感的方式解析一个类的具体日期。
|
Modifier and Type | Method and Description |
---|---|
Format[] |
MessageFormat.getFormats()
获取先前设置的模式字符串中的格式元素的格式。
|
Format[] |
MessageFormat.getFormatsByArgumentIndex()
获取用于值传递到
format 方法或从
parse 方法返回的格式。
|
Modifier and Type | Method and Description |
---|---|
void |
MessageFormat.setFormat(int formatElementIndex, Format newFormat)
设置先前设置的模式字符串中给定的格式元素索引的格式元素的格式。
|
void |
MessageFormat.setFormatByArgumentIndex(int argumentIndex, Format newFormat)
设置用于在使用给定参数索引的先前设置的模式字符串中的格式元素的格式。
|
void |
MessageFormat.setFormats(Format[] newFormats)
设置先前设置的模式字符串中的格式元素的格式。
|
void |
MessageFormat.setFormatsByArgumentIndex(Format[] newFormats)
设置格式使用值传递到
format 方法或从
parse 方法返回。
|
Modifier and Type | Method and Description |
---|---|
Format |
DateTimeFormatter.toFormat()
作为一个
java.text.Format 实例返回此格式化程序。
|
Format |
DateTimeFormatter.toFormat(TemporalQuery<?> parseQuery)
作为一个
java.text.Format 实例解析,将使用指定的查询将返回此格式化程序。
|
Constructor and Description |
---|
JFormattedTextField(Format format)
创建一个
JFormattedTextField 。
|
Modifier and Type | Method and Description |
---|---|
Format |
InternationalFormatter.getFormat()
返回指定可以编辑和显示的合法值的格式。
|
Modifier and Type | Method and Description |
---|---|
void |
NumberFormatter.setFormat(Format format)
设置决定可以编辑和显示的法律价值的格式。
|
void |
InternationalFormatter.setFormat(Format format)
设置决定可以编辑和显示的法律价值的格式。
|
Constructor and Description |
---|
InternationalFormatter(Format format)
创建具有指定
Format 实例
InternationalFormatter 。
|
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.