• Skip to content
  • Skip to link menu
  • KDE API Reference
  • kdelibs-4.14.38 API Reference
  • KDE Home
  • Contact Us
 

KHTML

  • khtml
  • java
kjavaapplet.h
Go to the documentation of this file.
1// -*- c++ -*-
2/* This file is part of the KDE project
3 *
4 * Copyright (C) 2000 Richard Moore <rich@kde.org>
5 * 2000 Wynn Wilkes <wynnw@caldera.com>
6 *
7 * This library is free software; you can redistribute it and/or
8 * modify it under the terms of the GNU Library General Public
9 * License as published by the Free Software Foundation; either
10 * version 2 of the License, or (at your option) any later version.
11 *
12 * This library is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15 * Library General Public License for more details.
16 *
17 * You should have received a copy of the GNU Library General Public License
18 * along with this library; see the file COPYING.LIB. If not, write to
19 * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
20 * Boston, MA 02110-1301, USA.
21 */
22
23
24#ifndef KJAVAAPPLET_H
25#define KJAVAAPPLET_H
26
27#include <kurl.h>
28
29#include <QtCore/QObject>
30#include <QtCore/QStringList>
31#include <QtCore/QMap>
32
44class KJavaApplet;
45class KJavaAppletWidget;
46class KJavaAppletContext;
47class KJavaAppletPrivate;
48
49
50class KJavaApplet : public QObject
51{
52Q_OBJECT
53
54public:
55 // states describing the life cycle of an applet.
56 // keep in sync with applet state in KJASAppletStub.java !
57 typedef enum {
58 UNKNOWN = 0,
59 CLASS_LOADED = 1,
60 INSTANCIATED = 2,
61 INITIALIZED = 3,
62 STARTED = 4,
63 STOPPED = 5,
64 DESTROYED = 6
65 } AppletState;
66 KJavaApplet( KJavaAppletWidget* _parent, KJavaAppletContext* _context = 0 );
67 ~KJavaApplet();
68
72 void setAppletContext( KJavaAppletContext* _context );
73
77 void setAppletClass( const QString& clazzName );
78
82 QString& appletClass();
83
87 void setBaseURL( const QString& base );
88
92 QString& baseURL();
93
97 void setCodeBase( const QString& codeBase );
98
102 QString& codeBase();
103
108 void setArchives( const QString& _archives );
109
114 QString& archives();
115
119 void setAppletName( const QString& name );
120
124 QString& appletName();
125
129 void setSize( QSize size );
130
134 QSize size();
135
139 void setParameter( const QString& name, const QString& value );
140
145 QString& parameter( const QString& name );
146
150 QMap<QString,QString>& getParams();
151
155 void setWindowName( const QString& title );
156
160 QString& getWindowName();
161
165 void resizeAppletWidget( int width, int height );
166
171 void create();
172
177 void init();
178
182 bool isCreated();
183
187 void start();
188
192 void stop();
193
197 int appletId();
198
202 void setAppletId( int id );
203
204 KJavaAppletContext* getContext() const { return context; }
205
209 void setUser(const QString & _user) { username = _user; }
210 const QString & user () const { return username; }
211
215 void setPassword(const QString & _password) { userpassword = _password; }
216 const QString & password () const { return userpassword; }
217
221 void setAuthName(const QString & _auth) { authname = _auth; }
222 const QString & authName () const { return authname; }
223
229 void stateChange ( const int newState );
230 void setFailed ();
231 AppletState state() const;
232 bool failed() const;
233 bool isAlive() const;
237 void jsData (const QStringList & args) { emit jsEvent (args); }
238Q_SIGNALS:
239 void jsEvent (const QStringList & args);
240private:
241 void showStatus( const QString &msg);
242 KJavaAppletPrivate* const d;
243 QMap<QString, QString> params;
244 KJavaAppletContext* context;
245 int id;
246 QString username;
247 QString userpassword;
248 QString authname;
249};
250
251#endif // KJAVAAPPLET_H
KJavaAppletContext
Definition: kjavaappletcontext.h:46
KJavaAppletWidget
Definition: kjavaappletwidget.h:83
KJavaApplet
Definition: kjavaapplet.h:51
KJavaApplet::authName
const QString & authName() const
Definition: kjavaapplet.h:222
KJavaApplet::setAuthName
void setAuthName(const QString &_auth)
Get/Set the auth name.
Definition: kjavaapplet.h:221
KJavaApplet::resizeAppletWidget
void resizeAppletWidget(int width, int height)
Interface for applets to resize themselves.
Definition: kjavaapplet.cpp:148
KJavaApplet::setAppletContext
void setAppletContext(KJavaAppletContext *_context)
Set the applet context'.
Definition: kjavaapplet.cpp:77
KJavaApplet::parameter
QString & parameter(const QString &name)
Look up the parameter value for the given Parameter.
Definition: kjavaapplet.cpp:93
KJavaApplet::setBaseURL
void setBaseURL(const QString &base)
Set the URL of the document embedding the applet.
Definition: kjavaapplet.cpp:108
KJavaApplet::isCreated
bool isCreated()
Returns status of applet- whether it's been created or not.
Definition: kjavaapplet.cpp:72
KJavaApplet::failed
bool failed() const
Definition: kjavaapplet.cpp:283
KJavaApplet::password
const QString & password() const
Definition: kjavaapplet.h:216
KJavaApplet::start
void start()
Run the applet.
Definition: kjavaapplet.cpp:192
KJavaApplet::stop
void stop()
Pause the applet.
Definition: kjavaapplet.cpp:197
KJavaApplet::user
const QString & user() const
Definition: kjavaapplet.h:210
KJavaApplet::setWindowName
void setWindowName(const QString &title)
Set the window title for swallowing.
Definition: kjavaapplet.cpp:165
KJavaApplet::setSize
void setSize(QSize size)
Set the size of the applet.
Definition: kjavaapplet.cpp:128
KJavaApplet::setAppletClass
void setAppletClass(const QString &clazzName)
Specify the name of the class file to run.
Definition: kjavaapplet.cpp:83
KJavaApplet::archives
QString & archives()
Get the list of Archives that should be searched for class files and other resources.
Definition: kjavaapplet.cpp:143
KJavaApplet::state
AppletState state() const
Definition: kjavaapplet.cpp:279
KJavaApplet::getWindowName
QString & getWindowName()
Get the window title this applet should use.
Definition: kjavaapplet.cpp:170
KJavaApplet::appletClass
QString & appletClass()
Get the name of the Class file the applet should run.
Definition: kjavaapplet.cpp:88
KJavaApplet::setCodeBase
void setCodeBase(const QString &codeBase)
Set the codebase of the applet classes.
Definition: kjavaapplet.cpp:118
KJavaApplet::create
void create()
Send message to AppletServer to create this applet's frame to be swallowed and download the applet cl...
Definition: kjavaapplet.cpp:180
KJavaApplet::setPassword
void setPassword(const QString &_password)
Get/Set the user password.
Definition: kjavaapplet.h:215
KJavaApplet::init
void init()
Send message to AppletServer to Initialize and show this applet.
Definition: kjavaapplet.cpp:187
KJavaApplet::jsData
void jsData(const QStringList &args)
JavaScript coming from Java.
Definition: kjavaapplet.h:237
KJavaApplet::getContext
KJavaAppletContext * getContext() const
Definition: kjavaapplet.h:204
KJavaApplet::setAppletName
void setAppletName(const QString &name)
Set the name the applet should be called in its context.
Definition: kjavaapplet.cpp:160
KJavaApplet::setArchives
void setArchives(const QString &_archives)
Set the list of archives at the Applet's codebase to search in for class files and other resources.
Definition: kjavaapplet.cpp:138
KJavaApplet::~KJavaApplet
~KJavaApplet()
Definition: kjavaapplet.cpp:64
KJavaApplet::appletId
int appletId()
Returns the unique ID this applet is given.
Definition: kjavaapplet.cpp:202
KJavaApplet::size
QSize size()
Get the size of the applet.
Definition: kjavaapplet.cpp:133
KJavaApplet::setParameter
void setParameter(const QString &name, const QString &value)
Specify a parameter to be passed to the applet.
Definition: kjavaapplet.cpp:98
KJavaApplet::setFailed
void setFailed()
Definition: kjavaapplet.cpp:267
KJavaApplet::baseURL
QString & baseURL()
get the Base URL of the document embedding the applet
Definition: kjavaapplet.cpp:113
KJavaApplet::setUser
void setUser(const QString &_user)
Get/Set the user name.
Definition: kjavaapplet.h:209
KJavaApplet::isAlive
bool isAlive() const
Definition: kjavaapplet.cpp:271
KJavaApplet::AppletState
AppletState
Definition: kjavaapplet.h:57
KJavaApplet::STOPPED
@ STOPPED
Definition: kjavaapplet.h:63
KJavaApplet::CLASS_LOADED
@ CLASS_LOADED
Definition: kjavaapplet.h:59
KJavaApplet::DESTROYED
@ DESTROYED
Definition: kjavaapplet.h:64
KJavaApplet::INITIALIZED
@ INITIALIZED
Definition: kjavaapplet.h:61
KJavaApplet::INSTANCIATED
@ INSTANCIATED
Definition: kjavaapplet.h:60
KJavaApplet::STARTED
@ STARTED
Definition: kjavaapplet.h:62
KJavaApplet::UNKNOWN
@ UNKNOWN
Definition: kjavaapplet.h:58
KJavaApplet::jsEvent
void jsEvent(const QStringList &args)
KJavaApplet::stateChange
void stateChange(const int newState)
called from the protocol engine changes the status according to the one on the java side.
Definition: kjavaapplet.cpp:212
KJavaApplet::appletName
QString & appletName()
Get the name the applet should be called in its context.
Definition: kjavaapplet.cpp:175
KJavaApplet::getParams
QMap< QString, QString > & getParams()
Get a reference to the Parameters and their values.
Definition: kjavaapplet.cpp:103
KJavaApplet::codeBase
QString & codeBase()
Get the codebase of the applet classes.
Definition: kjavaapplet.cpp:123
KJavaApplet::setAppletId
void setAppletId(int id)
Set the applet ID.
Definition: kjavaapplet.cpp:207
QMap
QObject
kurl.h
This file is part of the KDE documentation.
Documentation copyright © 1996-2023 The KDE developers.
Generated on Mon Feb 20 2023 00:00:00 by doxygen 1.9.6 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.

KHTML

Skip menu "KHTML"
  • Main Page
  • Namespace List
  • Namespace Members
  • Alphabetical List
  • Class List
  • Class Hierarchy
  • Class Members
  • File List
  • File Members
  • Related Pages

kdelibs-4.14.38 API Reference

Skip menu "kdelibs-4.14.38 API Reference"
  • DNSSD
  • Interfaces
  •   KHexEdit
  •   KMediaPlayer
  •   KSpeech
  •   KTextEditor
  • kconf_update
  • KDE3Support
  •   KUnitTest
  • KDECore
  • KDED
  • KDEsu
  • KDEUI
  • KDEWebKit
  • KDocTools
  • KFile
  • KHTML
  • KImgIO
  • KInit
  • kio
  • KIOSlave
  • KJS
  •   KJS-API
  •   WTF
  • kjsembed
  • KNewStuff
  • KParts
  • KPty
  • Kross
  • KUnitConversion
  • KUtils
  • Nepomuk
  • Plasma
  • Solid
  • Sonnet
  • ThreadWeaver
Report problems with this website to our bug tracking system.
Contact the specific authors with questions and comments about the page contents.

KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal