\section{KJava\-Applet Class Reference}
\label{classKJavaApplet}\index{KJavaApplet@{KJavaApplet}}
A Java applet.  


{\tt \#include $<$kjavaapplet.h$>$}

Inheritance diagram for KJava\-Applet:\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=54pt]{classKJavaApplet__inherit__graph}
\end{center}
\end{figure}
Collaboration diagram for KJava\-Applet:\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=212pt]{classKJavaApplet__coll__graph}
\end{center}
\end{figure}
\subsection*{Public Types}
\begin{CompactItemize}
\item 
enum {\bf Applet\-State} \{ \par
{\bf UNKNOWN} =  0, 
{\bf CLASS\_\-LOADED} =  1, 
{\bf INSTANCIATED} =  2, 
{\bf INITIALIZED} =  3, 
\par
{\bf STARTED} =  4, 
{\bf STOPPED} =  5, 
{\bf DESTROYED} =  6
 \}
\end{CompactItemize}
\subsection*{Signals}
\begin{CompactItemize}
\item 
void {\bf js\-Event} (const {\bf QString\-List} \&args)\label{classKJavaApplet_l0}

\end{CompactItemize}
\subsection*{Public Member Functions}
\begin{CompactItemize}
\item 
{\bf KJava\-Applet} ({\bf KJava\-Applet\-Widget} $\ast$\_\-parent, {\bf KJava\-Applet\-Context} $\ast$\_\-context=0)\label{classKJavaApplet_a0}

\item 
void {\bf set\-Applet\-Context} ({\bf KJava\-Applet\-Context} $\ast$\_\-context)
\item 
void {\bf set\-Applet\-Class} (const {\bf QString} \&clazz\-Name)
\item 
{\bf QString} \& {\bf applet\-Class} ()
\item 
void {\bf set\-Base\-URL} (const {\bf QString} \&base)
\item 
{\bf QString} \& {\bf base\-URL} ()
\item 
void {\bf set\-Code\-Base} (const {\bf QString} \&code\-Base)
\item 
{\bf QString} \& {\bf code\-Base} ()
\item 
void {\bf set\-Archives} (const {\bf QString} \&\_\-archives)
\item 
{\bf QString} \& {\bf archives} ()
\item 
void {\bf set\-Applet\-Name} (const {\bf QString} \&{\bf name})
\item 
{\bf QString} \& {\bf applet\-Name} ()
\item 
void {\bf set\-Size} ({\bf QSize} size)
\item 
{\bf QSize} {\bf size} ()
\item 
void {\bf set\-Parameter} (const {\bf QString} \&{\bf name}, const {\bf QString} \&value)
\item 
{\bf QString} \& {\bf parameter} (const {\bf QString} \&{\bf name})
\item 
{\bf QMap}$<$ {\bf QString}, {\bf QString} $>$ \& {\bf get\-Params} ()
\item 
void {\bf set\-Window\-Name} (const {\bf QString} \&title)
\item 
{\bf QString} \& {\bf get\-Window\-Name} ()
\item 
void {\bf resize\-Applet\-Widget} (int width, int height)
\item 
void {\bf create} ()
\item 
void {\bf init} ()
\item 
bool {\bf is\-Created} ()
\item 
void {\bf start} ()
\item 
void {\bf stop} ()
\item 
int {\bf applet\-Id} ()
\item 
void {\bf set\-Applet\-Id} (int id)
\item 
{\bf KJava\-Applet\-Context} $\ast$ {\bf get\-Context} () const \label{classKJavaApplet_a28}

\item 
void {\bf set\-User} (const {\bf QString} \&\_\-user)
\item 
const {\bf QString} \& {\bf user} () const \label{classKJavaApplet_a30}

\item 
void {\bf set\-Password} (const {\bf QString} \&\_\-password)
\item 
const {\bf QString} \& {\bf password} () const \label{classKJavaApplet_a32}

\item 
void {\bf set\-Auth\-Name} (const {\bf QString} \&\_\-auth)
\item 
const {\bf QString} \& {\bf auth\-Name} () const \label{classKJavaApplet_a34}

\item 
void {\bf state\-Change} (const int new\-State)
\item 
void {\bf set\-Failed} ()\label{classKJavaApplet_a36}

\item 
Applet\-State {\bf state} () const \label{classKJavaApplet_a37}

\item 
bool {\bf failed} () const \label{classKJavaApplet_a38}

\item 
bool {\bf is\-Alive} () const \label{classKJavaApplet_a39}

\item 
void {\bf js\-Data} (const {\bf QString\-List} \&args)
\end{CompactItemize}


\subsection{Detailed Description}
A Java applet. 

This class encapsulates the data the Applet Server needs to load the Applet class files, and set the proper size of the Applet. It also has an interface for applets to resize themselves.

\begin{Desc}
\item[Author:]Richard J. Moore, {\tt rich@kde.org} 

Wynn Wilkes, {\tt wynnw@kde.org} \end{Desc}




Definition at line 50 of file kjavaapplet.h.

\subsection{Member Function Documentation}
\index{KJavaApplet@{KJava\-Applet}!setAppletContext@{setAppletContext}}
\index{setAppletContext@{setAppletContext}!KJavaApplet@{KJava\-Applet}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void KJava\-Applet::set\-Applet\-Context ({\bf KJava\-Applet\-Context} $\ast$ {\em \_\-context})}\label{classKJavaApplet_a2}


Set the applet context'. 



Definition at line 78 of file kjavaapplet.cpp.

References KJava\-Applet\-Context::register\-Applet().\index{KJavaApplet@{KJava\-Applet}!setAppletClass@{setAppletClass}}
\index{setAppletClass@{setAppletClass}!KJavaApplet@{KJava\-Applet}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void KJava\-Applet::set\-Applet\-Class (const {\bf QString} \& {\em clazz\-Name})}\label{classKJavaApplet_a3}


Specify the name of the class file to run. 

For example 'Lake.class'. 

Definition at line 84 of file kjavaapplet.cpp.

References QObject::class\-Name().\index{KJavaApplet@{KJava\-Applet}!appletClass@{appletClass}}
\index{appletClass@{appletClass}!KJavaApplet@{KJava\-Applet}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}{\bf QString} \& KJava\-Applet::applet\-Class ()}\label{classKJavaApplet_a4}


Get the name of the Class file the applet should run. 



Definition at line 89 of file kjavaapplet.cpp.\index{KJavaApplet@{KJava\-Applet}!setBaseURL@{setBaseURL}}
\index{setBaseURL@{setBaseURL}!KJavaApplet@{KJava\-Applet}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void KJava\-Applet::set\-Base\-URL (const {\bf QString} \& {\em base})}\label{classKJavaApplet_a5}


Set the URL of the document embedding the applet. 



Definition at line 109 of file kjavaapplet.cpp.

References base\-URL().\index{KJavaApplet@{KJava\-Applet}!baseURL@{baseURL}}
\index{baseURL@{baseURL}!KJavaApplet@{KJava\-Applet}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}{\bf QString} \& KJava\-Applet::base\-URL ()}\label{classKJavaApplet_a6}


get the Base URL of the document embedding the applet 



Definition at line 114 of file kjavaapplet.cpp.

Referenced by set\-Base\-URL().\index{KJavaApplet@{KJava\-Applet}!setCodeBase@{setCodeBase}}
\index{setCodeBase@{setCodeBase}!KJavaApplet@{KJava\-Applet}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void KJava\-Applet::set\-Code\-Base (const {\bf QString} \& {\em code\-Base})}\label{classKJavaApplet_a7}


Set the codebase of the applet classes. 



Definition at line 119 of file kjavaapplet.cpp.

References code\-Base().\index{KJavaApplet@{KJava\-Applet}!codeBase@{codeBase}}
\index{codeBase@{codeBase}!KJavaApplet@{KJava\-Applet}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}{\bf QString} \& KJava\-Applet::code\-Base ()}\label{classKJavaApplet_a8}


Get the codebase of the applet classes. 



Definition at line 124 of file kjavaapplet.cpp.

Referenced by set\-Code\-Base().\index{KJavaApplet@{KJava\-Applet}!setArchives@{setArchives}}
\index{setArchives@{setArchives}!KJavaApplet@{KJava\-Applet}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void KJava\-Applet::set\-Archives (const {\bf QString} \& {\em \_\-archives})}\label{classKJavaApplet_a9}


Set the list of archives at the Applet's codebase to search in for class files and other resources. 



Definition at line 139 of file kjavaapplet.cpp.\index{KJavaApplet@{KJava\-Applet}!archives@{archives}}
\index{archives@{archives}!KJavaApplet@{KJava\-Applet}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}{\bf QString} \& KJava\-Applet::archives ()}\label{classKJavaApplet_a10}


Get the list of Archives that should be searched for class files and other resources. 



Definition at line 144 of file kjavaapplet.cpp.\index{KJavaApplet@{KJava\-Applet}!setAppletName@{setAppletName}}
\index{setAppletName@{setAppletName}!KJavaApplet@{KJava\-Applet}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void KJava\-Applet::set\-Applet\-Name (const {\bf QString} \& {\em name})}\label{classKJavaApplet_a11}


Set the name the applet should be called in its context. 



Definition at line 161 of file kjavaapplet.cpp.\index{KJavaApplet@{KJava\-Applet}!appletName@{appletName}}
\index{appletName@{appletName}!KJavaApplet@{KJava\-Applet}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}{\bf QString} \& KJava\-Applet::applet\-Name ()}\label{classKJavaApplet_a12}


Get the name the applet should be called in its context. 



Definition at line 176 of file kjavaapplet.cpp.

Referenced by state\-Change().\index{KJavaApplet@{KJava\-Applet}!setSize@{setSize}}
\index{setSize@{setSize}!KJavaApplet@{KJava\-Applet}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void KJava\-Applet::set\-Size ({\bf QSize} {\em size})}\label{classKJavaApplet_a13}


Set the size of the applet. 



Definition at line 129 of file kjavaapplet.cpp.\index{KJavaApplet@{KJava\-Applet}!size@{size}}
\index{size@{size}!KJavaApplet@{KJava\-Applet}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}{\bf QSize} KJava\-Applet::size ()}\label{classKJavaApplet_a14}


Get the size of the applet. 



Definition at line 134 of file kjavaapplet.cpp.\index{KJavaApplet@{KJava\-Applet}!setParameter@{setParameter}}
\index{setParameter@{setParameter}!KJavaApplet@{KJava\-Applet}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void KJava\-Applet::set\-Parameter (const {\bf QString} \& {\em name}, const {\bf QString} \& {\em value})}\label{classKJavaApplet_a15}


Specify a parameter to be passed to the applet. 



Definition at line 99 of file kjavaapplet.cpp.

References QMap::insert().\index{KJavaApplet@{KJava\-Applet}!parameter@{parameter}}
\index{parameter@{parameter}!KJavaApplet@{KJava\-Applet}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}{\bf QString} \& KJava\-Applet::parameter (const {\bf QString} \& {\em name})}\label{classKJavaApplet_a16}


Look up the parameter value for the given Parameter. 

Returns QString::null if the name has not been set. 

Definition at line 94 of file kjavaapplet.cpp.\index{KJavaApplet@{KJava\-Applet}!getParams@{getParams}}
\index{getParams@{getParams}!KJavaApplet@{KJava\-Applet}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}{\bf QMap}$<$ {\bf QString}, {\bf QString} $>$ \& KJava\-Applet::get\-Params ()}\label{classKJavaApplet_a17}


Get a reference to the Paramaters and their values. 



Definition at line 104 of file kjavaapplet.cpp.\index{KJavaApplet@{KJava\-Applet}!setWindowName@{setWindowName}}
\index{setWindowName@{setWindowName}!KJavaApplet@{KJava\-Applet}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void KJava\-Applet::set\-Window\-Name (const {\bf QString} \& {\em title})}\label{classKJavaApplet_a18}


Set the window title for swallowing. 



Definition at line 166 of file kjavaapplet.cpp.\index{KJavaApplet@{KJava\-Applet}!getWindowName@{getWindowName}}
\index{getWindowName@{getWindowName}!KJavaApplet@{KJava\-Applet}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}{\bf QString} \& KJava\-Applet::get\-Window\-Name ()}\label{classKJavaApplet_a19}


Get the window title this applet should use. 



Definition at line 171 of file kjavaapplet.cpp.\index{KJavaApplet@{KJava\-Applet}!resizeAppletWidget@{resizeAppletWidget}}
\index{resizeAppletWidget@{resizeAppletWidget}!KJavaApplet@{KJava\-Applet}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void KJava\-Applet::resize\-Applet\-Widget (int {\em width}, int {\em height})}\label{classKJavaApplet_a20}


Interface for applets to resize themselves. 



Definition at line 149 of file kjavaapplet.cpp.

References endl(), js\-Data(), and kd\-Debug().\index{KJavaApplet@{KJava\-Applet}!create@{create}}
\index{create@{create}!KJavaApplet@{KJava\-Applet}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void KJava\-Applet::create ()}\label{classKJavaApplet_a21}


Send message to Applet\-Server to create this applet's frame to be swallowed and download the applet classes. 



Definition at line 181 of file kjavaapplet.cpp.

References KJava\-Applet\-Context::create().

Referenced by KJava\-Applet\-Widget::show\-Applet().\index{KJavaApplet@{KJava\-Applet}!init@{init}}
\index{init@{init}!KJavaApplet@{KJava\-Applet}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void KJava\-Applet::init ()}\label{classKJavaApplet_a22}


Send message to Applet\-Server to Initialize and show this applet. 



Definition at line 188 of file kjavaapplet.cpp.

References KJava\-Applet\-Context::init().\index{KJavaApplet@{KJava\-Applet}!isCreated@{isCreated}}
\index{isCreated@{isCreated}!KJavaApplet@{KJava\-Applet}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}bool KJava\-Applet::is\-Created ()}\label{classKJavaApplet_a23}


Returns status of applet- whether it's been created or not. 



Definition at line 73 of file kjavaapplet.cpp.

Referenced by KJava\-Applet\-Widget::show\-Applet().\index{KJavaApplet@{KJava\-Applet}!start@{start}}
\index{start@{start}!KJavaApplet@{KJava\-Applet}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void KJava\-Applet::start ()}\label{classKJavaApplet_a24}


Run the applet. 



Definition at line 193 of file kjavaapplet.cpp.

References KJava\-Applet\-Context::start().

Referenced by state\-Change().\index{KJavaApplet@{KJava\-Applet}!stop@{stop}}
\index{stop@{stop}!KJavaApplet@{KJava\-Applet}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void KJava\-Applet::stop ()}\label{classKJavaApplet_a25}


Pause the applet. 



Definition at line 198 of file kjavaapplet.cpp.

References KJava\-Applet\-Context::stop().\index{KJavaApplet@{KJava\-Applet}!appletId@{appletId}}
\index{appletId@{appletId}!KJavaApplet@{KJava\-Applet}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}int KJava\-Applet::applet\-Id ()}\label{classKJavaApplet_a26}


Returns the unique ID this applet is given. 



Definition at line 203 of file kjavaapplet.cpp.\index{KJavaApplet@{KJava\-Applet}!setAppletId@{setAppletId}}
\index{setAppletId@{setAppletId}!KJavaApplet@{KJava\-Applet}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void KJava\-Applet::set\-Applet\-Id (int {\em id})}\label{classKJavaApplet_a27}


Set the applet ID. 



Definition at line 208 of file kjavaapplet.cpp.\index{KJavaApplet@{KJava\-Applet}!setUser@{setUser}}
\index{setUser@{setUser}!KJavaApplet@{KJava\-Applet}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void KJava\-Applet::set\-User (const {\bf QString} \& {\em \_\-user})\hspace{0.3cm}{\tt  [inline]}}\label{classKJavaApplet_a29}


Get/Set the user name. 



Definition at line 209 of file kjavaapplet.h.\index{KJavaApplet@{KJava\-Applet}!setPassword@{setPassword}}
\index{setPassword@{setPassword}!KJavaApplet@{KJava\-Applet}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void KJava\-Applet::set\-Password (const {\bf QString} \& {\em \_\-password})\hspace{0.3cm}{\tt  [inline]}}\label{classKJavaApplet_a31}


Get/Set the user password. 



Definition at line 215 of file kjavaapplet.h.\index{KJavaApplet@{KJava\-Applet}!setAuthName@{setAuthName}}
\index{setAuthName@{setAuthName}!KJavaApplet@{KJava\-Applet}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void KJava\-Applet::set\-Auth\-Name (const {\bf QString} \& {\em \_\-auth})\hspace{0.3cm}{\tt  [inline]}}\label{classKJavaApplet_a33}


Get/Set the auth name. 



Definition at line 221 of file kjavaapplet.h.\index{KJavaApplet@{KJava\-Applet}!stateChange@{stateChange}}
\index{stateChange@{stateChange}!KJavaApplet@{KJava\-Applet}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void KJava\-Applet::state\-Change (const int {\em new\-State})}\label{classKJavaApplet_a35}


called from the protocol engine changes the status according to the one on the java side. 

Do not call this yourself! 

Definition at line 213 of file kjavaapplet.cpp.

References applet\-Name(), endl(), kd\-Error(), and start().\index{KJavaApplet@{KJava\-Applet}!jsData@{jsData}}
\index{jsData@{jsData}!KJavaApplet@{KJava\-Applet}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void KJava\-Applet::js\-Data (const {\bf QString\-List} \& {\em args})\hspace{0.3cm}{\tt  [inline]}}\label{classKJavaApplet_a40}


Java\-Script coming from Java. 



Definition at line 237 of file kjavaapplet.h.

Referenced by resize\-Applet\-Widget().

The documentation for this class was generated from the following files:\begin{CompactItemize}
\item 
kjavaapplet.h\item 
kjavaapplet.cpp\end{CompactItemize}
