⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 uidefaults.html

📁 API資料大全
💻 HTML
📖 第 1 页 / 共 3 页
字号:
<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;If the value of <code>key</code> is an <code>Icon</code> return it, otherwise return <code>null</code>.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;<A HREF="../../java/awt/Insets.html">Insets</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../javax/swing/UIDefaults.html#getInsets(java.lang.Object)">getInsets</A></B>(<A HREF="../../java/lang/Object.html">Object</A>&nbsp;key)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;If the value of <code>key</code> is an <code>Insets</code> return it, otherwise return <code>null</code>.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;int</CODE></FONT></TD><TD><CODE><B><A HREF="../../javax/swing/UIDefaults.html#getInt(java.lang.Object)">getInt</A></B>(<A HREF="../../java/lang/Object.html">Object</A>&nbsp;key)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;If the value of <code>key</code> is an <code>Integer</code> return its integer value, otherwise return 0.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;<A HREF="../../java/lang/String.html">String</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../javax/swing/UIDefaults.html#getString(java.lang.Object)">getString</A></B>(<A HREF="../../java/lang/Object.html">Object</A>&nbsp;key)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;If the value of <code>key</code> is a <code>String</code> return it, otherwise return <code>null</code>.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;<A HREF="../../javax/swing/plaf/ComponentUI.html">ComponentUI</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../javax/swing/UIDefaults.html#getUI(javax.swing.JComponent)">getUI</A></B>(<A HREF="../../javax/swing/JComponent.html">JComponent</A>&nbsp;target)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Creates an <code>ComponentUI</code> implementation for the specified component.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;<A HREF="../../java/lang/Class.html">Class</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../javax/swing/UIDefaults.html#getUIClass(java.lang.String)">getUIClass</A></B>(<A HREF="../../java/lang/String.html">String</A>&nbsp;uiClassID)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns the L&F class that renders this component.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;<A HREF="../../java/lang/Class.html">Class</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../javax/swing/UIDefaults.html#getUIClass(java.lang.String, java.lang.ClassLoader)">getUIClass</A></B>(<A HREF="../../java/lang/String.html">String</A>&nbsp;uiClassID,           <A HREF="../../java/lang/ClassLoader.html">ClassLoader</A>&nbsp;uiClassLoader)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;The value of <code>get(uidClassID)</code> must be the <code>String</code> name of a class that implements the corresponding <code>ComponentUI</code> class.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>protected &nbsp;void</CODE></FONT></TD><TD><CODE><B><A HREF="../../javax/swing/UIDefaults.html#getUIError(java.lang.String)">getUIError</A></B>(<A HREF="../../java/lang/String.html">String</A>&nbsp;msg)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;If <code>getUI()</code> fails for any reason, it calls this method before returning <code>null</code>.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;<A HREF="../../java/lang/Object.html">Object</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../javax/swing/UIDefaults.html#put(java.lang.Object, java.lang.Object)">put</A></B>(<A HREF="../../java/lang/Object.html">Object</A>&nbsp;key,    <A HREF="../../java/lang/Object.html">Object</A>&nbsp;value)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Sets the value of <code>key</code> to <code>value</code>.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;void</CODE></FONT></TD><TD><CODE><B><A HREF="../../javax/swing/UIDefaults.html#putDefaults(java.lang.Object[])">putDefaults</A></B>(<A HREF="../../java/lang/Object.html">Object</A>[]&nbsp;keyValueList)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Puts all of the key/value pairs in the database and unconditionally generates one <code>PropertyChangeEvent</code>.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;void</CODE></FONT></TD><TD><CODE><B><A HREF="../../javax/swing/UIDefaults.html#removePropertyChangeListener(java.beans.PropertyChangeListener)">removePropertyChangeListener</A></B>(<A HREF="../../java/beans/PropertyChangeListener.html">PropertyChangeListener</A>&nbsp;listener)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Removes a <code>PropertyChangeListener</code> from the listener list.</TD></TR></TABLE>&nbsp;<A NAME="methods_inherited_from_class_java.util.Hashtable"><!-- --></A><TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%"><TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor"><TD><B>Methods inherited from class java.util.<A HREF="../../java/util/Hashtable.html">Hashtable</A></B></TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD><CODE><A HREF="../../java/util/Hashtable.html#clear()">clear</A>, <A HREF="../../java/util/Hashtable.html#clone()">clone</A>, <A HREF="../../java/util/Hashtable.html#contains(java.lang.Object)">contains</A>, <A HREF="../../java/util/Hashtable.html#containsKey(java.lang.Object)">containsKey</A>, <A HREF="../../java/util/Hashtable.html#containsValue(java.lang.Object)">containsValue</A>, <A HREF="../../java/util/Hashtable.html#elements()">elements</A>, <A HREF="../../java/util/Hashtable.html#entrySet()">entrySet</A>, <A HREF="../../java/util/Hashtable.html#equals(java.lang.Object)">equals</A>, <A HREF="../../java/util/Hashtable.html#hashCode()">hashCode</A>, <A HREF="../../java/util/Hashtable.html#isEmpty()">isEmpty</A>, <A HREF="../../java/util/Hashtable.html#keys()">keys</A>, <A HREF="../../java/util/Hashtable.html#keySet()">keySet</A>, <A HREF="../../java/util/Hashtable.html#putAll(java.util.Map)">putAll</A>, <A HREF="../../java/util/Hashtable.html#rehash()">rehash</A>, <A HREF="../../java/util/Hashtable.html#remove(java.lang.Object)">remove</A>, <A HREF="../../java/util/Hashtable.html#size()">size</A>, <A HREF="../../java/util/Hashtable.html#toString()">toString</A>, <A HREF="../../java/util/Hashtable.html#values()">values</A></CODE></TD></TR></TABLE>&nbsp;<A NAME="methods_inherited_from_class_java.lang.Object"><!-- --></A><TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%"><TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor"><TD><B>Methods inherited from class java.lang.<A HREF="../../java/lang/Object.html">Object</A></B></TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD><CODE><A HREF="../../java/lang/Object.html#finalize()">finalize</A>, <A HREF="../../java/lang/Object.html#getClass()">getClass</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#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></TD></TR></TABLE>&nbsp;<P><!-- ============ FIELD DETAIL =========== --><!-- ========= CONSTRUCTOR DETAIL ======== --><A NAME="constructor_detail"><!-- --></A><TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%"><TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"><TD COLSPAN=1><FONT SIZE="+2"><B>Constructor Detail</B></FONT></TD></TR></TABLE><A NAME="UIDefaults()"><!-- --></A><H3>UIDefaults</H3><PRE>public <B>UIDefaults</B>()</PRE><DL><DD>Create an empty defaults table.</DL><HR><A NAME="UIDefaults(java.lang.Object[])"><!-- --></A><H3>UIDefaults</H3><PRE>public <B>UIDefaults</B>(<A HREF="../../java/lang/Object.html">Object</A>[]&nbsp;keyValueList)</PRE><DL><DD>Create a defaults table initialized with the specified key/value pairs.  For example: <pre>Object[] uiDefaults = {"Font", new Font("Dialog", Font.BOLD, 12),"Color", Color.red,"five", new Integer(5)}UIDefaults myDefaults = new UIDefaults(uiDefaults); </pre><DD><DL><DT><B>Parameters:</B><DD><CODE>keyValueList</CODE> - an array of objects containing the key/value		pairs</DL></DD></DL><!-- ============ METHOD DETAIL ========== --><A NAME="method_detail"><!-- --></A><TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%"><TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"><TD COLSPAN=1><FONT SIZE="+2"><B>Method Detail</B></FONT></TD></TR></TABLE><A NAME="get(java.lang.Object)"><!-- --></A><H3>get</H3><PRE>public <A HREF="../../java/lang/Object.html">Object</A> <B>get</B>(<A HREF="../../java/lang/Object.html">Object</A>&nbsp;key)</PRE><DL><DD>Returns the value for key.  If the value is a <code>UIDefaults.LazyValue</code> then the real value is computed with <code>LazyValue.createValue()</code>, the table entry is replaced, and the real value is returned. If the value is an <code>UIDefaults.ActiveValue</code> the table entry is not replaced - the value is computed with <code>ActiveValue.createValue()</code> for each <code>get()</code> call.<DD><DL><DT><B>Overrides:</B><DD><CODE><A HREF="../../java/util/Hashtable.html#get(java.lang.Object)">get</A></CODE> in class <CODE><A HREF="../../java/util/Hashtable.html">Hashtable</A></CODE></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>key</CODE> - the desired key<DT><B>Returns:</B><DD>the value for <code>key</code><DT><B>See Also: </B><DD><A HREF="../../javax/swing/UIDefaults.LazyValue.html"><CODE>UIDefaults.LazyValue</CODE></A>, <A HREF="../../javax/swing/UIDefaults.ActiveValue.html"><CODE>UIDefaults.ActiveValue</CODE></A>, <A HREF="../../java/util/Hashtable.html#get(java.lang.Object)"><CODE>Hashtable.get(java.lang.Object)</CODE></A></DL></DD></DL><HR><A NAME="put(java.lang.Object, java.lang.Object)"><!-- --></A><H3>put</H3><PRE>public <A HREF="../../java/lang/Object.html">Object</A> <B>put</B>(<A HREF="../../java/lang/Object.html">Object</A>&nbsp;key,                  <A HREF="../../java/lang/Object.html">Object</A>&nbsp;value)</PRE><DL><DD>Sets the value of <code>key</code> to <code>value</code>. If <code>key</code> is a string and the new value isn't equal to the old one, fire a <code>PropertyChangeEvent</code>. If value is <code>null</code>, the key is removed from the table.<DD><DL><DT><B>Overrides:</B><DD><CODE><A HREF="../../java/util/Hashtable.html#put(java.lang.Object, java.lang.Object)">put</A></CODE> in class <CODE><A HREF="../../java/util/Hashtable.html">Hashtable</A></CODE></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>key</CODE> - the unique <code>Object</code> who's value will be used          to retrieve the data value associated with it<DD><CODE>value</CODE> - the new <code>Object</code> to store as data under		that key<DT><B>Returns:</B><DD>the previous <code>Object</code> value, or <code>null</code><DT><B>See Also: </B><DD><A HREF="../../javax/swing/UIDefaults.html#putDefaults(java.lang.Object[])"><CODE>putDefaults(java.lang.Object[])</CODE></A>, <A HREF="../../java/util/Hashtable.html#put(java.lang.Object, java.lang.Object)"><CODE>Hashtable.put(java.lang.Object, java.lang.Object)</CODE></A></DL></DD></DL><HR><A NAME="putDefaults(java.lang.Object[])"><!-- --></A><H3>putDefaults</H3><PRE>public void <B>putDefaults</B>(<A HREF="../../java/lang/Object.html">Object</A>[]&nbsp;keyValueList)</PRE><DL><DD>Puts all of the key/value pairs in the database and unconditionally generates one <code>PropertyChangeEvent</code>. The events oldValue and newValue will be <code>null</code> and its <code>propertyName</code> will be "UIDefaults".<DD><DL><DT><B>Parameters:</B><DD><CODE>keyValueList</CODE> - an array of key/value pairs<DT><B>See Also: </B><DD><A HREF="../../javax/swing/UIDefaults.html#put(java.lang.Object, java.lang.Object)"><CODE>put(java.lang.Object, java.lang.Object)</CODE></A>, <A HREF="../../java/util/Hashtable.html#put(java.lang.Object, java.lang.Object)"><CODE>Hashtable.put(java.lang.Object, java.lang.Object)</CODE></A></DL></DD></DL><HR><A NAME="getFont(java.lang.Object)"><!-- --></A><H3>getFont</H3><PRE>public <A HREF="../../java/awt/Font.html">Font</A> <B>getFont</B>(<A HREF="../../java/lang/Object.html">Object</A>&nbsp;key)</PRE><DL><DD>If the value of <code>key</code> is a <code>Font</code> return it, otherwise return <code>null</code>.<DD><DL><DT><B>Parameters:</B><DD><CODE>key</CODE> - the desired key<DT><B>Returns:</B><DD>if the value for <code>key</code> is a <code>Font</code>, 		return the <code>Font</code> object; otherwise return		<code>null</code></DL></DD></DL><HR><A NAME="getColor(java.lang.Object)"><!-- --></A><H3>getColor</H3><PRE>public <A HREF="../../java/awt/Color.html">Color</A> <B>getColor</B>(<A HREF="../../java/lang/Object.html">Object</A>&nbsp;key)</PRE><DL><DD>If the value of <code>key</code> is a <code>Color</code> return it, otherwise return <code>null</code>.<DD><DL><DT><B>Parameters:</B><DD><CODE>key</CODE> - the desired key<DT><B>Returns:</B><DD>if the value for <code>key</code> is a <code>Color</code>,		return the <code>Color</code> object; otherwise return

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -