dialog.html.svn-base

来自「j2me设计的界面包」· SVN-BASE 代码 · 共 1,004 行 · 第 1/5 页

SVN-BASE
1,004
字号
<HR>

<A NAME="show(int, int, int, int, boolean)"><!-- --></A><H3>
show</H3>
<PRE>
public <A HREF="../../../com/sun/lwuit/Command.html" title="class in com.sun.lwuit">Command</A> <B>show</B>(int&nbsp;top,
                    int&nbsp;bottom,
                    int&nbsp;left,
                    int&nbsp;right,
                    boolean&nbsp;includeTitle)</PRE>
<DL>
<DD>This method shows the form as a modal alert allowing us to produce a behavior of an alert/dialog box. This method will block the calling thread even if the calling thread is the EDT. Notice that this method will not release the block until dispose is called even if show() from another form is called! <p>Modal dialogs Allow the forms "content" to "hang in mid air" this is especially useful for dialogs where you would want the underlying form to "peek" from behind the  form.
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>top</CODE> - space in pixels between the top of the screen and the form<DD><CODE>bottom</CODE> - space in pixels between the bottom of the screen and the form<DD><CODE>left</CODE> - space in pixels between the left of the screen and the form<DD><CODE>right</CODE> - space in pixels between the right of the screen and the form<DD><CODE>includeTitle</CODE> - whether the title should hang in the top of the screen or be glued onto the content pane
<DT><B>Returns:</B><DD>the last command pressed by the user if such a command exists</DL>
</DD>
</DL>
<HR>

<A NAME="setTimeout(long)"><!-- --></A><H3>
setTimeout</H3>
<PRE>
public void <B>setTimeout</B>(long&nbsp;time)</PRE>
<DL>
<DD>Indicates the time (in milliseconds) afterwhich the dialog will be disposed  implicitly
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>time</CODE> - a milliseconds time used to dispose the dialog</DL>
</DD>
</DL>
<HR>

<A NAME="show(java.lang.String, java.lang.String, int, com.sun.lwuit.Image, java.lang.String, java.lang.String)"><!-- --></A><H3>
show</H3>
<PRE>
public static boolean <B>show</B>(java.lang.String&nbsp;title,
                           java.lang.String&nbsp;text,
                           int&nbsp;type,
                           <A HREF="../../../com/sun/lwuit/Image.html" title="class in com.sun.lwuit">Image</A>&nbsp;icon,
                           java.lang.String&nbsp;okText,
                           java.lang.String&nbsp;cancelText)</PRE>
<DL>
<DD>Shows a modal prompt dialog with the given title and text.
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>title</CODE> - The title for the dialog optionally null;<DD><CODE>text</CODE> - the text displayed in the dialog<DD><CODE>type</CODE> - the type of the alert one of TYPE_WARNING, TYPE_INFO,  TYPE_ERROR, TYPE_CONFIRMATION or TYPE_ALARM<DD><CODE>icon</CODE> - the icon for the dialog, can be null<DD><CODE>okText</CODE> - the text to appear in the command dismissing the dialog<DD><CODE>cancelText</CODE> - optionally null for a text to appear in the cancel command for canceling the dialog
<DT><B>Returns:</B><DD>true if the ok command was pressed or if cancelText is null. False otherwise.</DL>
</DD>
</DL>
<HR>

<A NAME="show(java.lang.String, java.lang.String, int, com.sun.lwuit.Image, java.lang.String, java.lang.String, long)"><!-- --></A><H3>
show</H3>
<PRE>
public static boolean <B>show</B>(java.lang.String&nbsp;title,
                           java.lang.String&nbsp;text,
                           int&nbsp;type,
                           <A HREF="../../../com/sun/lwuit/Image.html" title="class in com.sun.lwuit">Image</A>&nbsp;icon,
                           java.lang.String&nbsp;okText,
                           java.lang.String&nbsp;cancelText,
                           long&nbsp;timeout)</PRE>
<DL>
<DD>Shows a modal prompt dialog with the given title and text.
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>title</CODE> - The title for the dialog optionally null;<DD><CODE>text</CODE> - the text displayed in the dialog<DD><CODE>type</CODE> - the type of the alert one of TYPE_WARNING, TYPE_INFO,  TYPE_ERROR, TYPE_CONFIRMATION or TYPE_ALARM<DD><CODE>icon</CODE> - the icon for the dialog, can be null<DD><CODE>okText</CODE> - the text to appear in the command dismissing the dialog<DD><CODE>cancelText</CODE> - optionally null for a text to appear in the cancel command for canceling the dialog<DD><CODE>timeout</CODE> - a timeout after which null would be returned if timeout is 0 inifinite time is used
<DT><B>Returns:</B><DD>true if the ok command was pressed or if cancelText is null. False otherwise.</DL>
</DD>
</DL>
<HR>

<A NAME="show(java.lang.String, java.lang.String, com.sun.lwuit.Command[], int, com.sun.lwuit.Image, long)"><!-- --></A><H3>
show</H3>
<PRE>
public static <A HREF="../../../com/sun/lwuit/Command.html" title="class in com.sun.lwuit">Command</A> <B>show</B>(java.lang.String&nbsp;title,
                           java.lang.String&nbsp;text,
                           <A HREF="../../../com/sun/lwuit/Command.html" title="class in com.sun.lwuit">Command</A>[]&nbsp;cmds,
                           int&nbsp;type,
                           <A HREF="../../../com/sun/lwuit/Image.html" title="class in com.sun.lwuit">Image</A>&nbsp;icon,
                           long&nbsp;timeout)</PRE>
<DL>
<DD>Shows a modal prompt dialog with the given title and text.
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>title</CODE> - The title for the dialog optionally null;<DD><CODE>text</CODE> - the text displayed in the dialog<DD><CODE>cmds</CODE> - commands that are added to the form any click on any command will dispose the form<DD><CODE>type</CODE> - the type of the alert one of TYPE_WARNING, TYPE_INFO,  TYPE_ERROR, TYPE_CONFIRMATION or TYPE_ALARM<DD><CODE>icon</CODE> - the icon for the dialog, can be null<DD><CODE>timeout</CODE> - a timeout after which null would be returned if timeout is 0 inifinite time is used
<DT><B>Returns:</B><DD>the command pressed by the user</DL>
</DD>
</DL>
<HR>

<A NAME="show(java.lang.String, java.lang.String, com.sun.lwuit.Command[], int, com.sun.lwuit.Image, long, com.sun.lwuit.animations.Transition)"><!-- --></A><H3>
show</H3>
<PRE>
public static <A HREF="../../../com/sun/lwuit/Command.html" title="class in com.sun.lwuit">Command</A> <B>show</B>(java.lang.String&nbsp;title,
                           java.lang.String&nbsp;text,
                           <A HREF="../../../com/sun/lwuit/Command.html" title="class in com.sun.lwuit">Command</A>[]&nbsp;cmds,
                           int&nbsp;type,
                           <A HREF="../../../com/sun/lwuit/Image.html" title="class in com.sun.lwuit">Image</A>&nbsp;icon,
                           long&nbsp;timeout,
                           <A HREF="../../../com/sun/lwuit/animations/Transition.html" title="class in com.sun.lwuit.animations">Transition</A>&nbsp;transition)</PRE>
<DL>
<DD>Shows a modal prompt dialog with the given title and text.
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>title</CODE> - The title for the dialog optionally null;<DD><CODE>text</CODE> - the text displayed in the dialog<DD><CODE>cmds</CODE> - commands that are added to the form any click on any command will dispose the form<DD><CODE>type</CODE> - the type of the alert one of TYPE_WARNING, TYPE_INFO,  TYPE_ERROR, TYPE_CONFIRMATION or TYPE_ALARM<DD><CODE>icon</CODE> - the icon for the dialog, can be null<DD><CODE>timeout</CODE> - a timeout after which null would be returned if timeout is 0 inifinite time is used<DD><CODE>transition</CODE> - the transition installed when the dialog enters/leaves
<DT><B>Returns:</B><DD>the command pressed by the user</DL>
</DD>
</DL>
<HR>

<A NAME="show(java.lang.String, java.lang.String, java.lang.String, java.lang.String)"><!-- --></A><H3>
show</H3>
<PRE>
public static boolean <B>show</B>(java.lang.String&nbsp;title,
                           java.lang.String&nbsp;text,
                           java.lang.String&nbsp;okText,
                           java.lang.String&nbsp;cancelText)</PRE>
<DL>
<DD>Shows a modal prompt dialog with the given title and text.
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>title</CODE> - The title for the dialog optionally null;<DD><CODE>text</CODE> - the text displayed in the dialog<DD><CODE>okText</CODE> - the text to appear in the command dismissing the dialog<DD><CODE>cancelText</CODE> - optionally null for a text to appear in the cancel command for canceling the dialog
<DT><B>Returns:</B><DD>true if the ok command was pressed or if cancelText is null. False otherwise.</DL>
</DD>
</DL>
<HR>

<A NAME="show(java.lang.String, com.sun.lwuit.Component, com.sun.lwuit.Command[])"><!-- --></A><H3>
show</H3>
<PRE>
public static <A HREF="../../../com/sun/lwuit/Command.html" title="class in com.sun.lwuit">Command</A> <B>show</B>(java.lang.String&nbsp;title,
                           <A HREF="../../../com/sun/lwuit/Component.html" title="class in com.sun.lwuit">Component</A>&nbsp;body,
                           <A HREF="../../../com/sun/lwuit/Command.html" title="class in com.sun.lwuit">Command</A>[]&nbsp;cmds)</PRE>
<DL>
<DD>Shows a modal dialog with the given component as its "body" placed in the center.
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>title</CODE> - title for the dialog<DD><CODE>body</CODE> - component placed in the center of the dialog<DD><CODE>cmds</CODE> - commands that are added to the form any click on any command will dispose the form
<DT><B>Returns:</B><DD>the command pressed by the user</DL>
</DD>
</DL>
<HR>

<A NAME="show(java.lang.String, com.sun.lwuit.Component, com.sun.lwuit.Command[], int, com.sun.lwuit.Image)"><!-- --></A><H3>
show</H3>
<PRE>
public static <A HREF="../../../com/sun/lwuit/Command.html" title="class in com.sun.lwuit">Command</A> <B>show</B>(java.lang.String&nbsp;title,
                           <A HREF="../../../com/sun/lwuit/Component.html" title="class in com.sun.lwuit">Component</A>&nbsp;body,
                           <A HREF="../../../com/sun/lwuit/Command.html" title="class in com.sun.lwuit">Command</A>[]&nbsp;cmds,
                           int&nbsp;type,
                           <A HREF="../../../com/sun/lwuit/Image.html" title="class in com.sun.lwuit">Image</A>&nbsp;icon)</PRE>
<DL>
<DD>Shows a modal dialog with the given component as its "body" placed in the center.
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>title</CODE> - title for the dialog<DD><CODE>body</CODE> - component placed in the center of the dialog<DD><CODE>cmds</CODE> - commands that are added to the form any click on any command will dispose the form<DD><CODE>type</CODE> - the type of the alert one of TYPE_WARNING, TYPE_INFO,  TYPE_ERROR, TYPE_CONFIRMATION or TYPE_ALARM<DD><CODE>icon</CODE> - the icon for the dialog, can be null
<DT><B>Returns:</B><DD>the command pressed by the user</DL>
</DD>
</DL>
<HR>

<A NAME="show(java.lang.String, com.sun.lwuit.Component, com.sun.lwuit.Command[], int, com.sun.lwuit.Image, long)"><!-- --></A><H3>
show</H3>
<PRE>
public static <A HREF="../../../com/sun/lwuit/Command.html" title="class in com.sun.lwuit">Command</A> <B>show</B>(java.lang.String&nbsp;title,
                           <A HREF="../../../com/sun/lwuit/Component.html" title="class in com.sun.lwuit">Component</A>&nbsp;body,
                           <A HREF="../../../com/sun/lwuit/Command.html" title="class in com.sun.lwuit">Command</A>[]&nbsp;cmds,
                           int&nbsp;type,
                           <A HREF="../../../com/sun/lwuit/Image.html" title="class in com.sun.lwuit">Image</A>&nbsp;icon,
                           long&nbsp;timeout)</PRE>
<DL>
<DD>Shows a modal dialog with the given component as its "body" placed in the center.
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>title</CODE> - title for the dialog<DD><CODE>body</CODE> - component placed in the center of the dialog<DD><CODE>cmds</CODE> - commands that are added to the form any click on any command will dispose the form<DD><CODE>type</CODE> - the type of the alert one of TYPE_WARNING, TYPE_INFO,  TYPE_ERROR, TYPE_CONFIRMATION or TYPE_ALARM<DD><CODE>icon</CODE> - the icon for the dialog, can be null<DD><CODE>timeout</CODE> - a timeout after which null would be returned if timeout is 0 inifinite time is used

⌨️ 快捷键说明

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