script.html
来自「维信SDK文档。源码要求为至少5个C或Java源码」· HTML 代码 · 共 712 行 · 第 1/3 页
HTML
712 行
<BR> Called when widget parameters are changed either from server side or client side.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> void</CODE></FONT></TD><TD><CODE><B><A HREF="../../widsets/api/Script.html#startWidget()">startWidget</A></B>()</CODE><BR> Called when the widget instance is created and started.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> void</CODE></FONT></TD><TD><CODE><B><A HREF="../../widsets/api/Script.html#stopWidget()">stopWidget</A></B>()</CODE><BR> Called when the widget execution is fully stopped.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> void</CODE></FONT></TD><TD><CODE><B><A HREF="../../widsets/api/Script.html#timerEvent(Timer)">timerEvent</A></B>(<A HREF="../../widsets/api/Timer.html" title="class in ">Timer</A> timer)</CODE><BR> Called then scheduled timer is executed.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> void</CODE></FONT></TD><TD><CODE><B><A HREF="../../widsets/api/Script.html#updateReceived(String, Value)">updateReceived</A></B>(<A HREF="../../widsets/api/String.html" title="class in ">String</A> service, <A HREF="../../widsets/api/Value.html" title="class in ">Value</A> argument)</CODE><BR> Called when asynchronous notification has been received from server indicating that something has changed on the service associated with this widget.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> void</CODE></FONT></TD><TD><CODE><B><A HREF="../../widsets/api/Script.html#updateWidget()">updateWidget</A></B>()</CODE><BR> Called when widget should update it's contents.</TD></TR></TABLE> <P><!-- ============ METHOD DETAIL ========== --><A NAME="method_detail"><!-- --></A><TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""><TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"><TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2"><B>Method Detail</B></FONT></TH></TR></TABLE><A NAME="actionPerformed(Shell, Component, int)"><!-- --></A><H3>actionPerformed</H3><PRE>void <B>actionPerformed</B>(<A HREF="../../widsets/api/Shell.html" title="class in ">Shell</A> shell, <A HREF="../../widsets/api/Component.html" title="class in ">Component</A> source, int action)</PRE><DL><DD>Called when specified action has occurred. Action is one of <ul> <li>Menu action <li>Component "fire" action <li>Implicit action (such as <code>FOCUS_CHANGED</code>) </ul><P><DD><DL><DT><B>Parameters:</B><DD><CODE>shell</CODE> - Source shell<DD><CODE>source</CODE> - Source component<DD><CODE>action</CODE> - Action code<DT><B>See Also:</B><DD><A HREF="../../widsets/api/Component.html#setAction(int)"><CODE>Component.setAction(int)</CODE></A>, <A HREF="../../widsets/api/Component.html#getAction()"><CODE>Component.getAction()</CODE></A>, <A HREF="../../widsets/api/Menu.html" title="class in "><CODE>Menu</CODE></A>, <A HREF="../../widsets/api/MenuItem.html" title="class in "><CODE>MenuItem</CODE></A>, <A HREF="../../widsets/api/API.html#OPEN_MENU"><CODE>OPEN_MENU</CODE></A>, <A HREF="../../widsets/api/API.html#FOCUS_CHANGED"><CODE>FOCUS_CHANGED</CODE></A>, <A HREF="../../widsets/api/API.html#ITEM_CHANGED"><CODE>ITEM_CHANGED</CODE></A>, <A HREF="../../widsets/api/API.html#OPEN_LINK"><CODE>OPEN_LINK</CODE></A>, <A HREF="../../widsets/api/API.html#SHELL_OPENED"><CODE>SHELL_OPENED</CODE></A>, <A HREF="../../widsets/api/API.html#SHELL_CLOSED"><CODE>SHELL_CLOSED</CODE></A>, <A HREF="../../widsets/api/API.html#VIEWPORT_CHANGED"><CODE>VIEWPORT_CHANGED</CODE></A>, <A HREF="../../widsets/api/API.html#FOCUSED"><CODE>FOCUSED</CODE></A>, <A HREF="../../widsets/api/API.html#BLURRED"><CODE>BLURRED</CODE></A>, <A HREF="../../widsets/api/ActionCallback.html" title="interface in "><CODE>ActionCallback</CODE></A></DL></DD></DL><HR><A NAME="getMenu(Shell, Component)"><!-- --></A><H3>getMenu</H3><PRE><A HREF="../../widsets/api/Menu.html" title="class in ">Menu</A> <B>getMenu</B>(<A HREF="../../widsets/api/Shell.html" title="class in ">Shell</A> shell, <A HREF="../../widsets/api/Component.html" title="class in ">Component</A> focused)</PRE><DL><DD>Called when user has requested menu to be opened.<P><DD><DL><DT><B>Parameters:</B><DD><CODE>shell</CODE> - Source shell<DD><CODE>focused</CODE> - Source component<DT><B>Returns:</B><DD><code>Menu</code> object, or null if no menu is available.<DT><B>See Also:</B><DD><A HREF="../../widsets/api/API.html#OPEN_MENU"><CODE>OPEN_MENU</CODE></A>, <A HREF="../../widsets/api/Menu.html" title="class in "><CODE>Menu</CODE></A>, <A HREF="../../widsets/api/MenuItem.html" title="class in "><CODE>MenuItem</CODE></A>, <A HREF="../../widsets/api/MenuCallback.html" title="interface in "><CODE>MenuCallback</CODE></A></DL></DD></DL><HR><A NAME="getSoftKey(Shell, Component, int)"><!-- --></A><H3>getSoftKey</H3><PRE><A HREF="../../widsets/api/MenuItem.html" title="class in ">MenuItem</A> <B>getSoftKey</B>(<A HREF="../../widsets/api/Shell.html" title="class in ">Shell</A> shell, <A HREF="../../widsets/api/Component.html" title="class in ">Component</A> focused, int key)</PRE><DL><DD>Called when system wants to get a binding for soft key.<P><DD><DL><DT><B>Parameters:</B><DD><CODE>shell</CODE> - Source shell<DD><CODE>focused</CODE> - Source component<DD><CODE>key</CODE> - Either <A HREF="../../widsets/api/API.html#SOFTKEY_OK"><CODE>SOFTKEY_OK</CODE></A>, <A HREF="../../widsets/api/API.html#SOFTKEY_MIDDLE"><CODE>SOFTKEY_MIDDLE</CODE></A> or <A HREF="../../widsets/api/API.html#SOFTKEY_BACK"><CODE>SOFTKEY_BACK</CODE></A><DT><B>See Also:</B><DD><A HREF="../../widsets/api/MenuItem.html" title="class in "><CODE>MenuItem</CODE></A>, <A HREF="../../widsets/api/SoftKeyCallback.html" title="interface in "><CODE>SoftKeyCallback</CODE></A></DL></DD></DL><HR><A NAME="keyAction(Component, int, int)"><!-- --></A><H3>keyAction</H3><PRE>boolean <B>keyAction</B>(<A HREF="../../widsets/api/Component.html" title="class in ">Component</A> source, int op, int code)</PRE><DL><DD>Called when key event has occurred.<P><DD><DL><DT><B>Parameters:</B><DD><CODE>source</CODE> - Currently focused component<DD><CODE>op</CODE> - Operation that has occurred: <A HREF="../../widsets/api/API.html#KEY_PRESSED"><CODE>KEY_PRESSED</CODE></A>, <A HREF="../../widsets/api/API.html#KEY_RELEASED"><CODE>KEY_RELEASED</CODE></A>, <A HREF="../../widsets/api/API.html#KEY_REPEATED"><CODE>KEY_REPEATED</CODE></A><DD><CODE>code</CODE> - unicode value of key (>=0) or special key code (<0) for other keys<DT><B>Returns:</B><DD><code>true</code> if key event was consumed and should not be processed anywhere else<DT><B>See Also:</B><DD><A HREF="../../widsets/api/API.html#KEY_UP"><CODE>KEY_UP</CODE></A>, <A HREF="../../widsets/api/API.html#KEY_DOWN"><CODE>KEY_DOWN</CODE></A>, <A HREF="../../widsets/api/API.html#KEY_LEFT"><CODE>KEY_LEFT</CODE></A>, <A HREF="../../widsets/api/API.html#KEY_RIGHT"><CODE>KEY_RIGHT</CODE></A>, <A HREF="../../widsets/api/API.html#KEY_FIRE"><CODE>KEY_FIRE</CODE></A>, <A HREF="../../widsets/api/API.html#KEY_ESC"><CODE>KEY_ESC</CODE></A>, <A HREF="../../widsets/api/API.html#KEY_ENTER"><CODE>KEY_ENTER</CODE></A>, <A HREF="../../widsets/api/API.html#KEY_CR"><CODE>KEY_CR</CODE></A>, <A HREF="../../widsets/api/API.html#KEY_DELETE"><CODE>KEY_DELETE</CODE></A>, <A HREF="../../widsets/api/API.html#KEY_BACKSPACE"><CODE>KEY_BACKSPACE</CODE></A>, <A HREF="../../widsets/api/API.html#KEY_TAB"><CODE>KEY_TAB</CODE></A>, <A HREF="../../widsets/api/API.html#KEY_OK"><CODE>KEY_OK</CODE></A>, <A HREF="../../widsets/api/API.html#KEY_BACK"><CODE>KEY_BACK</CODE></A></DL></DD></DL><HR><A NAME="createElement(String, String, Style, Object)"><!-- --></A><H3>createElement</H3><PRE><A HREF="../../widsets/api/Component.html" title="class in ">Component</A> <B>createElement</B>(<A HREF="../../widsets/api/String.html" title="class in ">String</A> viewName, <A HREF="../../widsets/api/String.html" title="class in ">String</A> elementId, <A HREF="../../widsets/api/Style.html" title="class in ">Style</A> style, <A HREF="../../widsets/api/Object.html" title="class in ">Object</A> context)</PRE><DL><DD>Callback to create user interface element for view. This function gets called when script calls <A HREF="../../widsets/api/API.html#createView(String, Object)"><CODE>createView(String, Object)</CODE></A> and referred view contains <code>script</code> actions.<P><DD><DL><DT><B>Parameters:</B><DD><CODE>viewName</CODE> - Name of view being created, same as <code>name</code> in <A HREF="../../widsets/api/API.html#createView(String, Object)"><CODE>createView(String, Object)</CODE></A><DD><CODE>elementId</CODE> - Id of element<DD><CODE>style</CODE> - Style for element<DD><CODE>context</CODE> - Same as parameter <code>context</code> passed to <A HREF="../../widsets/api/API.html#createView(String, Object)"><CODE>createView(String, Object)</CODE></A><DT><B>Returns:</B><DD>Created element - returning <code>null</code> is not recommended.</DL></DD></DL><HR><A NAME="startWidget()"><!-- --></A><H3>startWidget</H3><PRE>void <B>startWidget</B>()</PRE><DL><DD>Called when the widget instance is created and started. Here the widget should start it's (background) activity, such as timers<P><DD><DL></DL></DD></DL><HR><A NAME="stopWidget()"><!-- --></A><H3>stopWidget</H3><PRE>void <B>stopWidget</B>()</PRE><DL><DD>Called when the widget execution is fully stopped. Here the widget should stop it's (background) activity, such as timers.<P><DD><DL></DL></DD></DL><HR><A NAME="updateWidget()"><!-- --></A><H3>updateWidget</H3><PRE>void <B>updateWidget</B>()</PRE><DL><DD><p>Called when widget should update it's contents. Typically this might involve in call server and fetching some content. </p> <p>This function is always invoked after client has connected to server and widgets has been loaded and verified to be up-to-date. </p><P><DD><DL></DL></DD></DL><HR><A NAME="updateReceived(String, Value)"><!-- --></A><H3>updateReceived</H3>
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?