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

📄 propertyeditor.html

📁 API資料大全
💻 HTML
📖 第 1 页 / 共 2 页
字号:
<B>Method Detail</B></FONT></TD></TR></TABLE><A NAME="setValue(java.lang.Object)"><!-- --></A><H3>setValue</H3><PRE>public void <B>setValue</B>(<A HREF="../../java/lang/Object.html">Object</A>&nbsp;value)</PRE><DL><DD>Set (or change) the object that is to be edited.  Primitive types such as "int" must be wrapped as the corresponding object type such as "java.lang.Integer".<DD><DL><DT><B>Parameters:</B><DD><CODE>value</CODE> - The new target object to be edited.  Note that this     object should not be modified by the PropertyEditor, rather      the PropertyEditor should create a new object to hold any     modified value.</DL></DD></DL><HR><A NAME="getValue()"><!-- --></A><H3>getValue</H3><PRE>public <A HREF="../../java/lang/Object.html">Object</A> <B>getValue</B>()</PRE><DL><DD>Gets the property value.<DD><DL><DT><B>Returns:</B><DD>The value of the property.  Primitive types such as "int" will be wrapped as the corresponding object type such as "java.lang.Integer".</DL></DD></DL><HR><A NAME="isPaintable()"><!-- --></A><H3>isPaintable</H3><PRE>public boolean <B>isPaintable</B>()</PRE><DL><DD>Determines whether this property editor is paintable.<DD><DL><DT><B>Returns:</B><DD>True if the class will honor the paintValue method.</DL></DD></DL><HR><A NAME="paintValue(java.awt.Graphics, java.awt.Rectangle)"><!-- --></A><H3>paintValue</H3><PRE>public void <B>paintValue</B>(<A HREF="../../java/awt/Graphics.html">Graphics</A>&nbsp;gfx,                       <A HREF="../../java/awt/Rectangle.html">Rectangle</A>&nbsp;box)</PRE><DL><DD>Paint a representation of the value into a given area of screen real estate.  Note that the propertyEditor is responsible for doing its own clipping so that it fits into the given rectangle. <p> If the PropertyEditor doesn't honor paint requests (see isPaintable) this method should be a silent noop. <p> The given Graphics object will have the default font, color, etc of the parent container.  The PropertyEditor may change graphics attributes such as font and color and doesn't need to restore the old values.<DD><DL><DT><B>Parameters:</B><DD><CODE>gfx</CODE> - Graphics object to paint into.<DD><CODE>box</CODE> - Rectangle within graphics object into which we should paint.</DL></DD></DL><HR><A NAME="getJavaInitializationString()"><!-- --></A><H3>getJavaInitializationString</H3><PRE>public <A HREF="../../java/lang/String.html">String</A> <B>getJavaInitializationString</B>()</PRE><DL><DD>This method is intended for use when generating Java code to set the value of the property.  It should return a fragment of Java code that can be used to initialize a variable with the current property value. <p> Example results are "2", "new Color(127,127,34)", "Color.orange", etc.<DD><DL><DT><B>Returns:</B><DD>A fragment of Java code representing an initializer for the   	current value.</DL></DD></DL><HR><A NAME="getAsText()"><!-- --></A><H3>getAsText</H3><PRE>public <A HREF="../../java/lang/String.html">String</A> <B>getAsText</B>()</PRE><DL><DD>Gets the property value as text.<DD><DL><DT><B>Returns:</B><DD>The property value as a human editable string. <p>   Returns null if the value can't be expressed as an editable string. <p>   If a non-null value is returned, then the PropertyEditor should	     be prepared to parse that string back in setAsText().</DL></DD></DL><HR><A NAME="setAsText(java.lang.String)"><!-- --></A><H3>setAsText</H3><PRE>public void <B>setAsText</B>(<A HREF="../../java/lang/String.html">String</A>&nbsp;text)               throws <A HREF="../../java/lang/IllegalArgumentException.html">IllegalArgumentException</A></PRE><DL><DD>Set the property value by parsing a given String.  May raise java.lang.IllegalArgumentException if either the String is badly formatted or if this kind of property can't be expressed as text.<DD><DL><DT><B>Parameters:</B><DD><CODE>text</CODE> - The string to be parsed.</DL></DD></DL><HR><A NAME="getTags()"><!-- --></A><H3>getTags</H3><PRE>public <A HREF="../../java/lang/String.html">String</A>[] <B>getTags</B>()</PRE><DL><DD>If the property value must be one of a set of known tagged values,  then this method should return an array of the tags.  This can be used to represent (for example) enum values.  If a PropertyEditor supports tags, then it should support the use of setAsText with a tag value as a way of setting the value and the use of getAsText to identify the current value.<DD><DL><DT><B>Returns:</B><DD>The tag values for this property.  May be null if this    property cannot be represented as a tagged value.</DL></DD></DL><HR><A NAME="getCustomEditor()"><!-- --></A><H3>getCustomEditor</H3><PRE>public <A HREF="../../java/awt/Component.html">Component</A> <B>getCustomEditor</B>()</PRE><DL><DD>A PropertyEditor may choose to make available a full custom Component that edits its property value.  It is the responsibility of the PropertyEditor to hook itself up to its editor Component itself and to report property value changes by firing a PropertyChange event. <P> The higher-level code that calls getCustomEditor may either embed the Component in some larger property sheet, or it may put it in its own individual dialog, or ...<DD><DL><DT><B>Returns:</B><DD>A java.awt.Component that will allow a human to directly      edit the current property value.  May be null if this is	    not supported.</DL></DD></DL><HR><A NAME="supportsCustomEditor()"><!-- --></A><H3>supportsCustomEditor</H3><PRE>public boolean <B>supportsCustomEditor</B>()</PRE><DL><DD>Determines whether this property editor supports a custom editor.<DD><DL><DT><B>Returns:</B><DD>True if the propertyEditor can provide a custom editor.</DL></DD></DL><HR><A NAME="addPropertyChangeListener(java.beans.PropertyChangeListener)"><!-- --></A><H3>addPropertyChangeListener</H3><PRE>public void <B>addPropertyChangeListener</B>(<A HREF="../../java/beans/PropertyChangeListener.html">PropertyChangeListener</A>&nbsp;listener)</PRE><DL><DD>Register a listener for the PropertyChange event.  When a PropertyEditor changes its value it should fire a PropertyChange event on all registered PropertyChangeListeners, specifying the null value for the property name and itself as the source.<DD><DL><DT><B>Parameters:</B><DD><CODE>listener</CODE> - An object to be invoked when a PropertyChange		event is fired.</DL></DD></DL><HR><A NAME="removePropertyChangeListener(java.beans.PropertyChangeListener)"><!-- --></A><H3>removePropertyChangeListener</H3><PRE>public void <B>removePropertyChangeListener</B>(<A HREF="../../java/beans/PropertyChangeListener.html">PropertyChangeListener</A>&nbsp;listener)</PRE><DL><DD>Remove a listener for the PropertyChange event.<DD><DL><DT><B>Parameters:</B><DD><CODE>listener</CODE> - The PropertyChange listener to be removed.</DL></DD></DL><!-- ========= END OF CLASS DATA ========= --><HR><!-- ========== START OF NAVBAR ========== --><A NAME="navbar_bottom"><!-- --></A><TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0"><TR><TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1"><A NAME="navbar_bottom_firstrow"><!-- --></A><TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3">  <TR ALIGN="center" VALIGN="top">  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A>&nbsp;</TD>  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD>  <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT>&nbsp;</TD>  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="class-use/PropertyEditor.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A>&nbsp;</TD>  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../index-files/index-1.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A>&nbsp;</TD>  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD>  </TR></TABLE></TD><TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM><b>Java<sup><font size=-2>TM</font></sup>&nbsp;2&nbsp;Platform<br>Std.&nbsp;Ed. v1.3</b></EM></TD></TR><TR><TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">&nbsp;<A HREF="../../java/beans/PropertyChangeListener.html"><B>PREV CLASS</B></A>&nbsp;&nbsp;<A HREF="../../java/beans/VetoableChangeListener.html"><B>NEXT CLASS</B></A></FONT></TD><TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">  <A HREF="../../index.html" TARGET="_top"><B>FRAMES</B></A>  &nbsp;&nbsp;<A HREF="PropertyEditor.html" TARGET="_top"><B>NO FRAMES</B></A></FONT></TD></TR><TR><TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">  SUMMARY: &nbsp;INNER&nbsp;|&nbsp;FIELD&nbsp;|&nbsp;CONSTR&nbsp;|&nbsp;<A HREF="#method_summary">METHOD</A></FONT></TD><TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">DETAIL: &nbsp;FIELD&nbsp;|&nbsp;CONSTR&nbsp;|&nbsp;<A HREF="#method_detail">METHOD</A></FONT></TD></TR></TABLE><!-- =========== END OF NAVBAR =========== --><HR><font size="-1"><a href="http://java.sun.com/cgi-bin/bugreport.cgi">Submit a bug or feature</a><br>For further API reference and developer documentation, see <a href="http://java.sun.com/products/jdk/1.3/devdocs-vs-specs.html">Java 2 SDK SE Developer Documentation</a>. That documentation  contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples. <p>Java, Java 2D, and JDBC are trademarks or registered trademarks of Sun Microsystems, Inc. in the US and other countries.<br>Copyright 1993-2000 Sun Microsystems, Inc. 901 San Antonio Road<br>Palo Alto, California, 94303, U.S.A.  All Rights Reserved.</font></BODY></HTML>

⌨️ 快捷键说明

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