script.html

来自「维信SDK文档。源码要求为至少5个C或Java源码」· HTML 代码 · 共 712 行 · 第 1/3 页

HTML
712
字号
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"><!--NewPage--><HTML><HEAD><!-- Generated by javadoc (build 1.5.0_11) on Tue Oct 23 19:38:42 EEST 2007 --><TITLE>Script (Widsets API)</TITLE><META NAME="keywords" CONTENT="Script interface"><LINK REL ="stylesheet" TYPE="text/css" HREF="../../stylesheet.css" TITLE="Style"><SCRIPT type="text/javascript">function windowTitle(){    parent.document.title="Script (Widsets API)";}</SCRIPT><NOSCRIPT></NOSCRIPT></HEAD><BODY BGCOLOR="white" onload="windowTitle();"><!-- ========= START OF TOP NAVBAR ======= --><A NAME="navbar_top"><!-- --></A><A HREF="#skip-navbar_top" title="Skip navigation links"></A><TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY=""><TR><TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1"><A NAME="navbar_top_firstrow"><!-- --></A><TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">  <TR ALIGN="center" VALIGN="top">  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../widsets/api/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="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-all.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></EM></TD></TR><TR><TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">&nbsp;<A HREF="../../widsets/api/Prompt.html" title="class in "><B>PREV CLASS</B></A>&nbsp;&nbsp;<A HREF="../../widsets/api/Scrollable.html" title="class in "><B>NEXT CLASS</B></A></FONT></TD><TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">  <A HREF="../../index.html?widsets/api/Script.html" target="_top"><B>FRAMES</B></A>  &nbsp;&nbsp;<A HREF="Script.html" target="_top"><B>NO FRAMES</B></A>  &nbsp;&nbsp;<SCRIPT type="text/javascript">  <!--  if(window==top) {    document.writeln('<A HREF="../../allclasses-noframe.html"><B>All Classes</B></A>');  }  //--></SCRIPT><NOSCRIPT>  <A HREF="../../allclasses-noframe.html"><B>All Classes</B></A></NOSCRIPT></FONT></TD></TR><TR><TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">  SUMMARY:&nbsp;NESTED&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><A NAME="skip-navbar_top"></A><!-- ========= END OF TOP NAVBAR ========= --><HR><!-- ======== START OF CLASS DATA ======== --><H2><FONT SIZE="-1"></FONT><BR>Interface Script</H2><HR><DL><DT><PRE>       interface <B>Script</B></DL></PRE><P>This interface specifies the callbacks that system may call on widget script. All callbacks are optional. <p> <font color="red">It is imperative that all callbacks  finish in timely manner as otherwise the normal application execution is severely crippled.</font><P><P><HR><P><!-- ========== METHOD SUMMARY =========== --><A NAME="method_summary"><!-- --></A><TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""><TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"><TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2"><B>Method Summary</B></FONT></TH></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="../../widsets/api/Script.html#actionPerformed(Shell, Component, int)">actionPerformed</A></B>(<A HREF="../../widsets/api/Shell.html" title="class in ">Shell</A>&nbsp;shell,                <A HREF="../../widsets/api/Component.html" title="class in ">Component</A>&nbsp;source,                int&nbsp;action)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Called when specified action has occurred.</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="../../widsets/api/Script.html#closeWidget()">closeWidget</A></B>()</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Called when last script-created maximized shell is popped.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;<A HREF="../../widsets/api/Component.html" title="class in ">Component</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../widsets/api/Script.html#createElement(String, String, Style, Object)">createElement</A></B>(<A HREF="../../widsets/api/String.html" title="class in ">String</A>&nbsp;viewName,              <A HREF="../../widsets/api/String.html" title="class in ">String</A>&nbsp;elementId,              <A HREF="../../widsets/api/Style.html" title="class in ">Style</A>&nbsp;style,              <A HREF="../../widsets/api/Object.html" title="class in ">Object</A>&nbsp;context)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Callback to create user interface element for view.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;<A HREF="../../widsets/api/Menu.html" title="class in ">Menu</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../widsets/api/Script.html#getMenu(Shell, Component)">getMenu</A></B>(<A HREF="../../widsets/api/Shell.html" title="class in ">Shell</A>&nbsp;shell,        <A HREF="../../widsets/api/Component.html" title="class in ">Component</A>&nbsp;focused)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Called when user has requested menu to be opened.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;<A HREF="../../widsets/api/MenuItem.html" title="class in ">MenuItem</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../widsets/api/Script.html#getSoftKey(Shell, Component, int)">getSoftKey</A></B>(<A HREF="../../widsets/api/Shell.html" title="class in ">Shell</A>&nbsp;shell,           <A HREF="../../widsets/api/Component.html" title="class in ">Component</A>&nbsp;focused,           int&nbsp;key)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Called when system wants to get a binding for soft key.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;<A HREF="../../widsets/api/Object.html" title="class in ">Object</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../widsets/api/Script.html#handleMessage(String, Object)">handleMessage</A></B>(<A HREF="../../widsets/api/String.html" title="class in ">String</A>&nbsp;service,              <A HREF="../../widsets/api/Object.html" title="class in ">Object</A>&nbsp;argument)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;This privileged operation is used when java code wishes to interact  with integrated "core" widget.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;boolean</CODE></FONT></TD><TD><CODE><B><A HREF="../../widsets/api/Script.html#keyAction(Component, int, int)">keyAction</A></B>(<A HREF="../../widsets/api/Component.html" title="class in ">Component</A>&nbsp;source,          int&nbsp;op,          int&nbsp;code)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Called when key event has occurred.</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="../../widsets/api/Script.html#messageReceived(String, Object, ResponseCallback)">messageReceived</A></B>(<A HREF="../../widsets/api/String.html" title="class in ">String</A>&nbsp;service,                <A HREF="../../widsets/api/Object.html" title="class in ">Object</A>&nbsp;argument,                ResponseCallback&nbsp;callback)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Called when inter widget communication request has been received.</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="../../widsets/api/Script.html#onFailure(Object, String)">onFailure</A></B>(<A HREF="../../widsets/api/Object.html" title="class in ">Object</A>&nbsp;state,          <A HREF="../../widsets/api/String.html" title="class in ">String</A>&nbsp;errorMessage)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Called when server call has failed.</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="../../widsets/api/Script.html#onSuccess(Object, Value)">onSuccess</A></B>(<A HREF="../../widsets/api/Object.html" title="class in ">Object</A>&nbsp;state,          <A HREF="../../widsets/api/Value.html" title="class in ">Value</A>&nbsp;returnValue)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Called when server call has finished successfully.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;<A HREF="../../widsets/api/Shell.html" title="class in ">Shell</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../widsets/api/Script.html#openWidget()">openWidget</A></B>()</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Called when the user opens the widget from the dashboard.</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="../../widsets/api/Script.html#paint(Component, Graphics, Style, int, int)">paint</A></B>(<A HREF="../../widsets/api/Component.html" title="class in ">Component</A>&nbsp;c,      <A HREF="../../widsets/api/Graphics.html" title="class in ">Graphics</A>&nbsp;g,      <A HREF="../../widsets/api/Style.html" title="class in ">Style</A>&nbsp;style,      int&nbsp;width,      int&nbsp;height)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Called when custom component should be painted.</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="../../widsets/api/Script.html#parametersChanged()">parametersChanged</A></B>()</CODE>

⌨️ 快捷键说明

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