uTools-Manuals/docs/java/javax/swing/text/DateFormatter.html

192 lines
12 KiB
HTML
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<div class="header">
<div class="subTitle">
javax.swing.text
</div>
<h2 class="title" title="Class DateFormatter">Class DateFormatter</h2>
</div><div class="contentContainer">
<ul class="inheritance">
<li><a href="../../../java/lang/Object.html" title="class in java.lang">java.lang.Object</a></li>
<li>
<ul class="inheritance">
<li><a href="../../../javax/swing/JFormattedTextField.AbstractFormatter.html" title="class in javax.swing">javax.swing.JFormattedTextField.AbstractFormatter</a></li>
<li>
<ul class="inheritance">
<li><a href="../../../javax/swing/text/DefaultFormatter.html" title="class in javax.swing.text">javax.swing.text.DefaultFormatter</a></li>
<li>
<ul class="inheritance">
<li><a href="../../../javax/swing/text/InternationalFormatter.html" title="class in javax.swing.text">javax.swing.text.InternationalFormatter</a></li>
<li>
<ul class="inheritance">
<li>javax.swing.text.DateFormatter</li>
</ul> </li>
</ul> </li>
</ul> </li>
</ul> </li>
</ul>
<div class="description">
<ul class="blockList">
<li class="blockList">
<dl>
<dt>
All Implemented Interfaces:
</dt>
<dd>
<span><a href="../../../java/io/Serializable.html" title="java.io中的接口">Serializable</a> <a href="../../../java/lang/Cloneable.html" title="java.lang中的接口">Cloneable</a></span>
</dd>
</dl>
<hr/> <br/> <pre>public class <span class="typeNameLabel">DateFormatter</span>
extends <a href="../../../javax/swing/text/InternationalFormatter.html" title="class in javax.swing.text">InternationalFormatter</a></pre>
<div class="block">
<span>DateFormatter是一个<code>InternationalFormatter</code> 它通过java.text.DateFormat的实例进行<code>java.text.DateFormat</code></span>
<p> <span><strong>警告:</strong>此类的序列化对象与将来的Swing版本不兼容。</span> <span>当前的序列化支持适用于运行相同版本的Swing的应用程序之间的短期存储或RMI。</span> <span>从1.4开始对所有JavaBeans的长期存储的支持已被添加到<code>java.beans</code>包中。</span> <span>请参阅<a href="../../../java/beans/XMLEncoder.html" title="java.beans中的类"><code>XMLEncoder</code></a></span> </p>
</div>
<dl>
<dt>
<span class="simpleTagLabel">从以下版本开始:</span>
</dt>
<dd>
1.4
</dd>
<dt>
<span class="seeLabel">另请参见:</span>
</dt>
<dd>
<span><a href="../../../java/text/DateFormat.html" title="java.text中的类"><code>DateFormat</code></a></span>
</dd>
</dl> </li>
</ul>
</div>
<div class="summary">
<ul class="blockList">
<li class="blockList">
<!-- ======== CONSTRUCTOR SUMMARY ======== -->
<ul class="blockList">
<li class="blockList"><a name="constructor.summary">
<!-- --> </a> <h3>构造方法摘要</h3>
<table border="0" cellpadding="3" cellspacing="0" class="memberSummary" summary="Constructor Summary table, listing constructors, and an explanation">
<caption>
<span>构造方法</span>
<span class="tabEnd"> </span>
</caption>
<tbody>
<tr>
<th class="colOne" scope="col">Constructor and Description</th>
</tr>
<tr class="altColor">
<td class="colOne"><code><span class="memberNameLink"><a href="../../../javax/swing/text/DateFormatter.html#DateFormatter--">DateFormatter</a></span>()</code>
<div class="block">
这是new DateFormatter(DateFormat.getDateInstance())的
<code>new DateFormatter(DateFormat.getDateInstance())</code>
</div> </td>
</tr>
<tr class="rowColor">
<td class="colOne"><code><span class="memberNameLink"><a href="../../../javax/swing/text/DateFormatter.html#DateFormatter-java.text.DateFormat-">DateFormatter</a></span>(<a href="../../../java/text/DateFormat.html" title="class in java.text">DateFormat</a> format)</code>
<div class="block">
返回使用指定的
<code>Format</code>实例配置的
<code>Format</code>
</div> </td>
</tr>
</tbody>
</table> </li>
</ul>
<!-- ========== METHOD SUMMARY =========== -->
<ul class="blockList">
<li class="blockList"><a name="method.summary">
<!-- --> </a> <h3>方法摘要</h3>
<table border="0" cellpadding="3" cellspacing="0" class="memberSummary" summary="Method Summary table, listing methods, and an explanation">
<caption>
<span class="activeTableTab" id="t0"><span>所有方法</span><span class="tabEnd"> </span></span>
<span class="tableTab" id="t2"><span><a href="javascript:show(2);">接口方法</a></span><span class="tabEnd"> </span></span>
<span class="tableTab" id="t4"><span><a href="javascript:show(8);">具体的方法</a></span><span class="tabEnd"> </span></span>
</caption>
<tbody>
<tr>
<th class="colFirst" scope="col">Modifier and Type</th>
<th class="colLast" scope="col">Method and Description</th>
</tr>
<tr class="altColor" id="i0">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../javax/swing/text/DateFormatter.html#setFormat-java.text.DateFormat-">setFormat</a></span>(<a href="../../../java/text/DateFormat.html" title="class in java.text">DateFormat</a> format)</code>
<div class="block">
设置指定可编辑和显示的合法值的格式。
</div> </td>
</tr>
</tbody>
</table>
<ul class="blockList">
<li class="blockList"><a name="methods.inherited.from.class.javax.swing.text.InternationalFormatter">
<!-- --> </a> <h3>Methods inherited from class javax.swing.text.<a href="../../../javax/swing/text/InternationalFormatter.html" title="class in javax.swing.text">InternationalFormatter</a></h3> <code><a href="../../../javax/swing/text/InternationalFormatter.html#clone--">clone</a>, <a href="../../../javax/swing/text/InternationalFormatter.html#getActions--">getActions</a>, <a href="../../../javax/swing/text/InternationalFormatter.html#getFields-int-">getFields</a>, <a href="../../../javax/swing/text/InternationalFormatter.html#getFormat--">getFormat</a>, <a href="../../../javax/swing/text/InternationalFormatter.html#getMaximum--">getMaximum</a>, <a href="../../../javax/swing/text/InternationalFormatter.html#getMinimum--">getMinimum</a>, <a href="../../../javax/swing/text/InternationalFormatter.html#install-javax.swing.JFormattedTextField-">install</a>, <a href="../../../javax/swing/text/InternationalFormatter.html#setFormat-java.text.Format-">setFormat</a>, <a href="../../../javax/swing/text/InternationalFormatter.html#setMaximum-java.lang.Comparable-">setMaximum</a>, <a href="../../../javax/swing/text/InternationalFormatter.html#setMinimum-java.lang.Comparable-">setMinimum</a>, <a href="../../../javax/swing/text/InternationalFormatter.html#stringToValue-java.lang.String-">stringToValue</a>, <a href="../../../javax/swing/text/InternationalFormatter.html#valueToString-java.lang.Object-">valueToString</a></code></li>
</ul>
<ul class="blockList">
<li class="blockList"><a name="methods.inherited.from.class.javax.swing.text.DefaultFormatter">
<!-- --> </a> <h3>Methods inherited from class javax.swing.text.<a href="../../../javax/swing/text/DefaultFormatter.html" title="class in javax.swing.text">DefaultFormatter</a></h3> <code><a href="../../../javax/swing/text/DefaultFormatter.html#getAllowsInvalid--">getAllowsInvalid</a>, <a href="../../../javax/swing/text/DefaultFormatter.html#getCommitsOnValidEdit--">getCommitsOnValidEdit</a>, <a href="../../../javax/swing/text/DefaultFormatter.html#getDocumentFilter--">getDocumentFilter</a>, <a href="../../../javax/swing/text/DefaultFormatter.html#getNavigationFilter--">getNavigationFilter</a>, <a href="../../../javax/swing/text/DefaultFormatter.html#getOverwriteMode--">getOverwriteMode</a>, <a href="../../../javax/swing/text/DefaultFormatter.html#getValueClass--">getValueClass</a>, <a href="../../../javax/swing/text/DefaultFormatter.html#setAllowsInvalid-boolean-">setAllowsInvalid</a>, <a href="../../../javax/swing/text/DefaultFormatter.html#setCommitsOnValidEdit-boolean-">setCommitsOnValidEdit</a>, <a href="../../../javax/swing/text/DefaultFormatter.html#setOverwriteMode-boolean-">setOverwriteMode</a>, <a href="../../../javax/swing/text/DefaultFormatter.html#setValueClass-java.lang.Class-">setValueClass</a></code></li>
</ul>
<ul class="blockList">
<li class="blockList"><a name="methods.inherited.from.class.javax.swing.JFormattedTextField.AbstractFormatter">
<!-- --> </a> <h3>Methods inherited from class javax.swing.<a href="../../../javax/swing/JFormattedTextField.AbstractFormatter.html" title="class in javax.swing">JFormattedTextField.AbstractFormatter</a></h3> <code><a href="../../../javax/swing/JFormattedTextField.AbstractFormatter.html#getFormattedTextField--">getFormattedTextField</a>, <a href="../../../javax/swing/JFormattedTextField.AbstractFormatter.html#invalidEdit--">invalidEdit</a>, <a href="../../../javax/swing/JFormattedTextField.AbstractFormatter.html#setEditValid-boolean-">setEditValid</a>, <a href="../../../javax/swing/JFormattedTextField.AbstractFormatter.html#uninstall--">uninstall</a></code></li>
</ul>
<ul class="blockList">
<li class="blockList"><a name="methods.inherited.from.class.java.lang.Object">
<!-- --> </a> <h3>Methods inherited from class java.lang.<a href="../../../java/lang/Object.html" title="class in java.lang">Object</a></h3> <code><a href="../../../java/lang/Object.html#equals-java.lang.Object-">equals</a>, <a href="../../../java/lang/Object.html#finalize--">finalize</a>, <a href="../../../java/lang/Object.html#getClass--">getClass</a>, <a href="../../../java/lang/Object.html#hashCode--">hashCode</a>, <a href="../../../java/lang/Object.html#notify--">notify</a>, <a href="../../../java/lang/Object.html#notifyAll--">notifyAll</a>, <a href="../../../java/lang/Object.html#toString--">toString</a>, <a href="../../../java/lang/Object.html#wait--">wait</a>, <a href="../../../java/lang/Object.html#wait-long-">wait</a>, <a href="../../../java/lang/Object.html#wait-long-int-">wait</a></code></li>
</ul> </li>
</ul> </li>
</ul>
</div>
<div class="details">
<ul class="blockList">
<li class="blockList">
<!-- ========= CONSTRUCTOR DETAIL ======== -->
<ul class="blockList">
<li class="blockList"><a name="constructor.detail">
<!-- --> </a> <h3>构造方法详细信息</h3> <a name="DateFormatter--">
<!-- --> </a>
<ul class="blockList">
<li class="blockList"> <h4>DateFormatter</h4> <pre>public DateFormatter()</pre>
<div class="block">
这是new DateFormatter(DateFormat.getDateInstance())的
<code>new DateFormatter(DateFormat.getDateInstance())</code>
</div> </li>
</ul> <a name="DateFormatter-java.text.DateFormat-">
<!-- --> </a>
<ul class="blockListLast">
<li class="blockList"> <h4>DateFormatter</h4> <pre>public DateFormatter(<a href="../../../java/text/DateFormat.html" title="class in java.text">DateFormat</a> format)</pre>
<div class="block">
返回使用指定的
<code>Format</code>实例配置的
<code>Format</code>
</div>
<dl>
<dt>
<span class="paramLabel">参数</span>
</dt>
<dd>
<code>format</code> - 用于规定合法价值的格式
</dd>
</dl> </li>
</ul> </li>
</ul>
<!-- ============ METHOD DETAIL ========== -->
<ul class="blockList">
<li class="blockList"><a name="method.detail">
<!-- --> </a> <h3>方法详细信息</h3> <a name="setFormat-java.text.DateFormat-">
<!-- --> </a>
<ul class="blockListLast">
<li class="blockList"> <h4>setFormat</h4> <pre>public void setFormat(<a href="../../../java/text/DateFormat.html" title="class in java.text">DateFormat</a> format)</pre>
<div class="block">
<span>设置指定可编辑和显示的合法值的格式。</span>
<p> <span>如果你已经使用了默认构造将会由的方式当前语言环境确定此属性的值<code>Dateformat.getDateInstance()</code>方法。</span> </p>
</div>
<dl>
<dt>
<span class="paramLabel">参数</span>
</dt>
<dd>
<code>format</code> - 用于从/转换为字符串的DateFormat实例
</dd>
</dl> </li>
</ul> </li>
</ul> </li>
</ul>
</div>
</div>