org.kde.koala
Class KHTMLPart

java.lang.Object
  extended by org.kde.qt.Qt
      extended by org.kde.qt.QObject
          extended by org.kde.koala.Part
              extended by org.kde.koala.ReadOnlyPart
                  extended by org.kde.koala.KHTMLPart
All Implemented Interfaces:
PartBaseInterface, org.kde.qt.QtSupport

public class KHTMLPart
extends ReadOnlyPart

This class is khtml's main class. It features an almost complete web browser, and html renderer. The easiest way to use this class (if you just want to display an HTML page at some URL) is the following:

 KURL url = "http://www.kde.org";
 KHTMLPart w = new KHTMLPart();
 w.openURL(url);
 w.view().resize(500, 400);
 w.show();
 
Java and JavaScript are enabled by default depending on the user's settings. If you do not need them, and especially if you display unfiltered data from untrusted sources, it is strongly recommended to turn them off. In that case, you should also turn off the automatic redirect and plugins:
 w.setJScriptEnabled(false);
 w.setJavaEnabled(false);
 w.setMetaRefreshEnabled(false);
 w.setPluginsEnabled(false);
 
You may also wish to disable external references. This will prevent KHTML from loading images, frames, etc, or redirecting to external sites.
 w.setOnlyLocalReferences(true);
 
Some apps want to write their HTML code directly into the widget instead of opening an url. You can do this in the following way:
 String myHTMLCode = ...;
 KHTMLPart w = new KHTMLPart();
 w.begin();
 w.write(myHTMLCode);
 ...
 w.end();
 
You can do as many calls to write() as you wish. There are two write() methods, one accepting a String and one accepting a char argument. You should use one or the other (but not both) since the method using the char argument does an additional decoding step to convert the written data to Unicode. It is also possible to write content to the HTML part using the standard streaming API from KParts.ReadOnlyPart. The usage of the API is similar to that of the begin(), write(), end() process described above as the following example shows:
 KHTMLPart doc = new KHTMLPart();
 doc.openStream( "text/html", KURL() );
 doc.writeStream( String( "

KHTML Rocks!

" ) ); doc.closeStream();
See KHTMLPartSignals for signals emitted by KHTMLPart

Author:
Lars Knoll (knoll@kde.org)

Field Summary
static int Before
           
static int BrowserViewGUI
           
static int CaretBlink
           
static int CaretInvisible
           
static int CaretVisible
          Enumeration for displaying the caret.
static int DefaultGUI
           
static int Encrypted
           
static int FindLinksOnly
          Extra Find options that can be used when calling the extended findText().
static int FindNoPopups
           
static int Mixed
           
static int NoNotification
           
static int NotCrypted
           
static int Only
           
static int Unused
           
 
Fields inherited from class org.kde.qt.Qt
AlignAuto, AlignBottom, AlignCenter, AlignHCenter, AlignHorizontal_Mask, AlignJustify, AlignLeft, AlignRight, AlignTop, AlignVCenter, AlignVertical_Mask, AlphaDither_Mask, ALT, AltButton, AnchorHref, AnchorName, AndNotROP, AndROP, ArrowCursor, Ascending, ASCII_ACCEL, AutoColor, AutoDither, AutoText, AvoidDither, BDiagPattern, BeginsWith, BevelJoin, BitmapCursor, BlankCursor, Bottom, BottomLeft, BottomRight, BreakAnywhere, BusyCursor, CaseSensitive, ClearROP, ColorMode_Mask, ColorOnly, Contains, ControlButton, CopyROP, CrossCursor, CrossPattern, CTRL, CustomPattern, DashDotDotLine, DashDotLine, DashLine, Dense1Pattern, Dense2Pattern, Dense3Pattern, Dense4Pattern, Dense5Pattern, Dense6Pattern, Dense7Pattern, Descending, DiagCrossPattern, DiffuseAlphaDither, DiffuseDither, Dither_Mask, DitherMode_Mask, DockBottom, DockLeft, DockMinimized, DockRight, DockTop, DockTornOff, DockUnmanaged, DontClip, DontPrint, DotLine, DownArrow, EndsWith, EraseROP, ExactMatch, ExpandTabs, FDiagPattern, FixedColor, FixedPixmap, FlatCap, ForbiddenCursor, HiEnglishUnit, HiMetricUnit, Horizontal, HorPattern, IbeamCursor, Identical, IncludeTrailingSpaces, ISODate, Key_0, Key_1, Key_2, Key_3, Key_4, Key_5, Key_6, Key_7, Key_8, Key_9, Key_A, Key_aacute, Key_Aacute, Key_acircumflex, Key_Acircumflex, Key_acute, Key_adiaeresis, Key_Adiaeresis, Key_ae, Key_AE, Key_agrave, Key_Agrave, Key_Alt, Key_Ampersand, Key_Any, Key_Apostrophe, Key_aring, Key_Aring, Key_AsciiCircum, Key_AsciiTilde, Key_Asterisk, Key_At, Key_atilde, Key_Atilde, Key_B, Key_Back, Key_Backslash, Key_Backspace, Key_BackSpace, Key_Backtab, Key_BackTab, Key_Bar, Key_BassBoost, Key_BassDown, Key_BassUp, Key_BraceLeft, Key_BraceRight, Key_BracketLeft, Key_BracketRight, Key_brokenbar, Key_C, Key_CapsLock, Key_ccedilla, Key_Ccedilla, Key_cedilla, Key_cent, Key_Clear, Key_Colon, Key_Comma, Key_Control, Key_copyright, Key_currency, Key_D, Key_degree, Key_Delete, Key_diaeresis, Key_Direction_L, Key_Direction_R, Key_division, Key_Dollar, Key_Down, Key_E, Key_eacute, Key_Eacute, Key_ecircumflex, Key_Ecircumflex, Key_ediaeresis, Key_Ediaeresis, Key_egrave, Key_Egrave, Key_End, Key_Enter, Key_Equal, Key_Escape, Key_eth, Key_ETH, Key_Exclam, Key_exclamdown, Key_F, Key_F1, Key_F10, Key_F11, Key_F12, Key_F13, Key_F14, Key_F15, Key_F16, Key_F17, Key_F18, Key_F19, Key_F2, Key_F20, Key_F21, Key_F22, Key_F23, Key_F24, Key_F25, Key_F26, Key_F27, Key_F28, Key_F29, Key_F3, Key_F30, Key_F31, Key_F32, Key_F33, Key_F34, Key_F35, Key_F4, Key_F5, Key_F6, Key_F7, Key_F8, Key_F9, Key_Favorites, Key_Forward, Key_G, Key_Greater, Key_guillemotleft, Key_guillemotright, Key_H, Key_Help, Key_Home, Key_HomePage, Key_Hyper_L, Key_Hyper_R, Key_hyphen, Key_I, Key_iacute, Key_Iacute, Key_icircumflex, Key_Icircumflex, Key_idiaeresis, Key_Idiaeresis, Key_igrave, Key_Igrave, Key_Insert, Key_J, Key_K, Key_L, Key_Launch0, Key_Launch1, Key_Launch2, Key_Launch3, Key_Launch4, Key_Launch5, Key_Launch6, Key_Launch7, Key_Launch8, Key_Launch9, Key_LaunchA, Key_LaunchB, Key_LaunchC, Key_LaunchD, Key_LaunchE, Key_LaunchF, Key_LaunchMail, Key_LaunchMedia, Key_Left, Key_Less, Key_M, Key_macron, Key_masculine, Key_MediaLast, Key_MediaNext, Key_MediaPlay, Key_MediaPrev, Key_MediaRecord, Key_MediaStop, Key_Menu, Key_Meta, Key_Minus, Key_mu, Key_multiply, Key_N, Key_Next, Key_nobreakspace, Key_notsign, Key_ntilde, Key_Ntilde, Key_NumberSign, Key_NumLock, Key_O, Key_oacute, Key_Oacute, Key_ocircumflex, Key_Ocircumflex, Key_odiaeresis, Key_Odiaeresis, Key_ograve, Key_Ograve, Key_onehalf, Key_onequarter, Key_onesuperior, Key_Ooblique, Key_OpenUrl, Key_ordfeminine, Key_oslash, Key_otilde, Key_Otilde, Key_P, Key_PageDown, Key_PageUp, Key_paragraph, Key_ParenLeft, Key_ParenRight, Key_Pause, Key_Percent, Key_Period, Key_periodcentered, Key_Plus, Key_plusminus, Key_Print, Key_Prior, Key_Q, Key_Question, Key_questiondown, Key_QuoteDbl, Key_QuoteLeft, Key_R, Key_Refresh, Key_registered, Key_Return, Key_Right, Key_S, Key_ScrollLock, Key_Search, Key_section, Key_Semicolon, Key_Shift, Key_Slash, Key_Space, Key_ssharp, Key_Standby, Key_sterling, Key_Stop, Key_Super_L, Key_Super_R, Key_SysReq, Key_T, Key_Tab, Key_thorn, Key_THORN, Key_threequarters, Key_threesuperior, Key_TrebleDown, Key_TrebleUp, Key_twosuperior, Key_U, Key_uacute, Key_Uacute, Key_ucircumflex, Key_Ucircumflex, Key_udiaeresis, Key_Udiaeresis, Key_ugrave, Key_Ugrave, Key_Underscore, Key_unknown, Key_Up, Key_V, Key_VolumeDown, Key_VolumeMute, Key_VolumeUp, Key_W, Key_X, Key_Y, Key_yacute, Key_Yacute, Key_ydiaeresis, Key_yen, Key_Z, KeyButtonMask, Keypad, LastCursor, LastROP, Left, LeftArrow, LeftButton, LocalDate, LocalTime, LoEnglishUnit, LogText, LoMetricUnit, MacStyle, META, MetaButton, MidButton, Minimized, MiterJoin, MODIFIER_MASK, MonoOnly, MotifStyle, MouseButtonMask, MPenCapStyle, MPenJoinStyle, MPenStyle, MV_10_DOT_0, MV_10_DOT_1, MV_10_DOT_2, MV_10_DOT_3, MV_10_DOT_4, MV_9, MV_CHEETAH, MV_JAGUAR, MV_PANTHER, MV_PUMA, MV_TIGER, MV_Unknown, NandROP, NoAccel, NoAlpha, NoBackground, NoBrush, NoButton, NoMatch, NoPen, NopROP, NorROP, NotAndROP, NotCopyROP, NotEraseROP, NotOrROP, NotROP, NotXorROP, OpaqueMode, OrderedAlphaDither, OrderedDither, OrNotROP, OrROP, Overline, PaletteBackground, PaletteBase, PaletteBrightText, PaletteButton, PaletteButtonText, PaletteDark, PaletteForeground, PaletteHighlight, PaletteHighlightedText, PaletteLight, PaletteLink, PaletteLinkVisited, PaletteMid, PaletteMidlight, PaletteShadow, PaletteText, PartialMatch, PixelUnit, PlainText, PMStyle, PointingHandCursor, PreferDither, RichText, Right, RightArrow, RightButton, RoundCap, RoundJoin, SetROP, SHIFT, ShiftButton, ShowPrefix, SingleLine, SizeAllCursor, SizeBDiagCursor, SizeFDiagCursor, SizeHorCursor, SizeVerCursor, SolidLine, SolidPattern, SplitHCursor, SplitVCursor, SquareCap, StrikeOut, TextDate, ThresholdAlphaDither, ThresholdDither, Top, TopLeft, TopRight, TornOff, TransparentMode, TwipsUnit, UI_AnimateCombo, UI_AnimateMenu, UI_AnimateToolBox, UI_AnimateTooltip, UI_FadeMenu, UI_FadeTooltip, UI_General, Underline, UNICODE_ACCEL, Unmanaged, UpArrow, UpArrowCursor, UTC, VerPattern, Vertical, WaitCursor, WDestructiveClose, WGroupLeader, WhatsThisCursor, Win3Style, WindowActive, WindowFullScreen, WindowMaximized, WindowMinimized, WindowNoState, WindowsStyle, WMacDrawer, WMacNoSheet, WMouseNoMask, WNoAutoErase, WNoMousePropagation, WNorthWestGravity, WordBreak, WPaintClever, WPaintDesktop, WPaintUnclipped, WRepaintNoErase, WResizeNoErase, WShowModal, WState_AutoMask, WState_BlockUpdates, WState_CompressKeys, WState_ConfigPending, WState_Created, WState_CreatedHidden, WState_Disabled, WState_DND, WState_Exposed, WState_ForceDisabled, WState_ForceHide, WState_FullScreen, WState_HasMouse, WState_InPaintEvent, WState_Maximized, WState_Minimized, WState_MouseTracking, WState_OwnCursor, WState_OwnSizePolicy, WState_Polished, WState_Reparented, WState_Reserved0, WState_Resized, WState_Visible, WStaticContents, WStyle_ContextHelp, WStyle_Customize, WStyle_Dialog, WStyle_DialogBorder, WStyle_Mask, WStyle_Maximize, WStyle_Minimize, WStyle_MinMax, WStyle_NoBorder, WStyle_NoBorderEx, WStyle_NormalBorder, WStyle_Reserved, WStyle_Splash, WStyle_StaysOnTop, WStyle_SysMenu, WStyle_Title, WStyle_Tool, WSubWindow, WType_Desktop, WType_Dialog, WType_Mask, WType_Modal, WType_Popup, WType_TopLevel, WV_2000, WV_2003, WV_32s, WV_95, WV_98, WV_CE, WV_CE_based, WV_CENET, WV_DOS_based, WV_Me, WV_NT, WV_NT_based, WV_XP, WWinOwnDC, WX11BypassWM, X11ParentRelative, XorROP
 
Constructor Summary
  KHTMLPart()
           
protected KHTMLPart(java.lang.Class dummy)
           
  KHTMLPart(KHTMLView view)
           
  KHTMLPart(KHTMLView view, org.kde.qt.QObject parent)
           
  KHTMLPart(KHTMLView view, org.kde.qt.QObject parent, java.lang.String name)
           
  KHTMLPart(KHTMLView view, org.kde.qt.QObject parent, java.lang.String name, int prof)
           
  KHTMLPart(org.kde.qt.QWidget parentWidget)
           
  KHTMLPart(org.kde.qt.QWidget parentWidget, java.lang.String widgetname)
           
  KHTMLPart(org.kde.qt.QWidget parentWidget, java.lang.String widgetname, org.kde.qt.QObject parent)
           
  KHTMLPart(org.kde.qt.QWidget parentWidget, java.lang.String widgetname, org.kde.qt.QObject parent, java.lang.String name)
           
  KHTMLPart(org.kde.qt.QWidget parentWidget, java.lang.String widgetname, org.kde.qt.QObject parent, java.lang.String name, int prof)
          Constructs a new KHTMLPart.
 
Method Summary
 Node activeNode()
          Returns the node that has the keyboard focus.
 boolean autoloadImages()
          Returns whether images contained in the document are loaded automatically or not.
 void autoloadImages(boolean e)
           
 KURL backgroundURL()
          Returns the URL for the background Image (used by save background)
 java.lang.String baseTarget()
           
 KURL baseURL()
           
 void begin()
           
 void begin(KURL url)
           
 void begin(KURL url, int xOffset)
           
 void begin(KURL url, int xOffset, int yOffset)
          Clears the widget and prepares it for new content.
 BrowserExtension browserExtension()
          Returns a pointer to the KParts.BrowserExtension.
 BrowserHostExtension browserHostExtension()
           
 int caretDisplayPolicyNonFocused()
          Returns the current caret policy when the view is not focused.
 java.lang.String className()
           
 boolean closeURL()
          Stops loading the document and kills all data requests (for images, etc.)
protected  KURL completeURL(java.lang.String url)
          returns a KURL object for the given url.
protected  ReadOnlyPart createPart(org.kde.qt.QWidget parentWidget, java.lang.String widgetName, org.kde.qt.QObject parent, java.lang.String name, java.lang.String mimetype, java.lang.StringBuffer serviceName, java.lang.String[] serviceTypes, java.lang.String[] params)
          This method is called when a new embedded object (include html frames) is to be created.
 ReadOnlyPart currentFrame()
          Return the current frame (the one that has focus) Not necessarily a direct child of ours, framesets can be nested.
protected  void customEvent(org.kde.qt.QCustomEvent event)
           
 java.lang.String dcopObjectId()
           
 void dispose()
          Delete the wrapped C++ instance ahead of finalize()
 boolean dndEnabled()
          Returns whether Dragn'n'Drop support is enabled or not.
protected  boolean doCloseStream()
          Implements the streaming API of KParts.ReadOnlyPart.
 Document document()
          Returns a reference to the DOM document.
 java.lang.String documentSource()
          Returns the content of the source document.
protected  boolean doOpenStream(java.lang.String mimeType)
          Implements the streaming API of KParts.ReadOnlyPart.
protected  boolean doWriteStream(byte[] data)
          Implements the streaming API of KParts.ReadOnlyPart.
 void enableJava(boolean e)
           
 void enableJScript(boolean e)
           
 void enableMetaRefresh(boolean e)
           
 void enablePlugins(boolean e)
           
 java.lang.String encoding()
          Returns the encoding the page currently uses.
 void end()
          Call this after your last call to write().
 org.kde.qt.QVariant executeScript(Node n, java.lang.String script)
          Same as executeScript( String ) except with the Node parameter specifying the 'this' value.
protected  void finalize()
          Deletes the wrapped C++ instance
 KHTMLPart findFrame(java.lang.String f)
          Finds a frame by name.
 KHTMLPart findFrameParent(ReadOnlyPart callingPart, java.lang.String f)
          Recursively finds the part containing the frame with name f and checks if it is accessible by callingPart Returns null if no suitable frame can't be found.
 ReadOnlyPart findFramePart(java.lang.String f)
          Finds a frame by name.
 void findText()
          Starts a new search by popping up a dialog asking the user what he wants to search for.
 void findText(java.lang.String str, long options)
           
 void findText(java.lang.String str, long options, org.kde.qt.QWidget parent)
           
 void findText(java.lang.String str, long options, org.kde.qt.QWidget parent, KFindDialog findDialog)
          Starts a new search, but bypasses the user dialog.
 void findTextBegin()
          Initiates a text search.
 boolean findTextNext()
          Finds the next occurence of a string set by findText()
 boolean findTextNext(boolean reverse)
          Finds the next occurence of a string set by findText()
 int formNotification()
          Determine if signal should be emitted before, instead or never when a submitForm() happens.
 boolean frameExists(java.lang.String frameName)
          Returns whether a frame with the specified name is exists or not.
 java.util.ArrayList frameNames()
          Returns a list of names of all frame (including iframe) objects of the current document.
 boolean gotoAnchor(java.lang.String name)
          Finds the anchor named name. If the anchor is found, the widget scrolls to the closest position.
protected  void guiActivateEvent(GUIActivateEvent event)
          Internal reimplementation of KParts.Part.guiActivateEvent .
 boolean hasSelection()
          Has the user selected anything? Call selectedText() to retrieve the selected text.
 void hide()
          Convenience method to hide the document's view.
 HTMLDocument htmlDocument()
          Returns a reference to the DOM HTML document (for non-HTML documents, returns null)
protected  void htmlError(int errorCode, java.lang.String text, KURL reqUrl)
          presents a detailed error message to the user.
 boolean inProgress()
           
 boolean isCaretMode()
          Returns whether caret mode is on/off.
 boolean isDisposed()
          Has the wrapped C++ instance been deleted?
 boolean isEditable()
          Returns true if the document is editable, false otherwise.
 boolean isModified()
          Checks whether the page contains unsubmitted form changes.
 boolean javaEnabled()
          Return true if Java applet support is enabled, false if disabled
 boolean jScriptEnabled()
          Returns true if Javascript support is enabled or false otherwise.
 java.lang.String jsDefaultStatusBarText()
          Called by KJS.
 java.lang.String jsStatusBarText()
          Called by KJS.
 java.lang.String lastModified()
          Last-modified date (in raw string format), if received in the [HTTP] headers.
 org.kde.qt.QMetaObject metaObject()
           
 boolean metaRefreshEnabled()
          Returns true if automatic forwarding is enabled.
 boolean nextAnchor()
          Go to the next anchor This is useful to navigate from outside the navigator
 Node nodeUnderMouse()
          Returns the Node currently under the mouse.
 Node nonSharedNodeUnderMouse()
          Returns the Node currently under the mouse that is not shared.
 boolean onlyLocalReferences()
          Returns whether only file:/ or data:/ references are allowed to be loaded ( default false ).
protected  boolean openFile()
          Internal empty reimplementation of KParts.ReadOnlyPart.openFile .
 boolean openURL(KURL url)
          Opens the specified URL url. Reimplemented from KParts.ReadOnlyPart.openURL .
 java.lang.String pageReferrer()
          Referrer used to obtain this page.
 void paint(org.kde.qt.QPainter arg1, org.kde.qt.QRect arg2)
           
 void paint(org.kde.qt.QPainter arg1, org.kde.qt.QRect arg2, int arg3)
           
 void paint(org.kde.qt.QPainter arg1, org.kde.qt.QRect arg2, int arg3, boolean[] arg4)
          Paints the HTML page to a QPainter.
 KHTMLPart parentPart()
          Returns a pointer to the parent KHTMLPart if the part is a frame in an HTML frameset.
 PartManager partManager()
          Returns a reference to the partmanager instance which manages html frame objects.
protected  boolean pluginPageQuestionAsked(java.lang.String mimetype)
           
 boolean pluginsEnabled()
          Returns true if plugins are enabled/disabled.
 void preloadScript(java.lang.String url, java.lang.String script)
          Loads a script into the script cache.
 void preloadStyleSheet(java.lang.String url, java.lang.String stylesheet)
          Loads a style sheet into the stylesheet cache.
 boolean prevAnchor()
          Go to previous anchor
 java.lang.String referrer()
          Referrer used for links in this page.
 boolean restored()
           
 void restoreState(org.kde.qt.QDataStream stream)
          Restores the KHTMLPart's previously saved state (including child frame objects) from the provided QDataStream.
 void saveState(org.kde.qt.QDataStream stream)
          Saves the KHTMLPart's complete state (including child frame objects) to the provided QDataStream.
 void scheduleRedirection(int delay, java.lang.String url)
           
 void scheduleRedirection(int delay, java.lang.String url, boolean lockHistory)
          Schedules a redirection after delay seconds.
 void selectAll()
          Marks all text in the document as selected.
 java.lang.String selectedText()
          Returns the text the user has marked.
 java.lang.String selectedTextAsHTML()
          Return the text the user has marked.
 Range selection()
          Returns the selected part of the HTML.
 void selection(Node startNode, long startOffset, Node endNode, long endOffset)
          Returns the selected part of the HTML by returning the starting and end position.
 void setActiveNode(Node node)
          Sets the focused node of the document to the specified node.
 void setAutoloadImages(boolean enable)
          Specifies whether images contained in the document should be loaded automatically or not.
 void setCaretDisplayPolicyNonFocused(int policy)
          Sets the caret display policy when the view is not focused.
 void setCaretMode(boolean enable)
          Enables/disables caret mode.
 void setCaretPosition(Node node, long offset)
           
 void setCaretPosition(Node node, long offset, boolean extendSelection)
          Sets the caret to the given position.
 void setCaretVisible(boolean show)
          Sets the visibility of the caret.
 boolean setCharset(java.lang.String arg1, boolean arg2)
           
 void setDNDEnabled(boolean b)
          Enables or disables Drag'n'Drop support.
 void setEditable(boolean enable)
          Makes the document editable.
 boolean setEncoding(java.lang.String name)
           
 boolean setEncoding(java.lang.String name, boolean override)
          Sets the encoding the page uses.
 void setFixedFont(java.lang.String name)
          Sets the fixed font style.
 void setFormNotification(int fn)
          Determine if signal should be emitted before, instead or never when a submitForm() happens.
 void setJavaEnabled(boolean enable)
          Enables/disables Java applet support.
 void setJScriptEnabled(boolean enable)
          Enable/disable Javascript support.
 void setJSDefaultStatusBarText(java.lang.String text)
          Called by KJS.
 void setJSStatusBarText(java.lang.String text)
          Called by KJS.
 void setMetaRefreshEnabled(boolean enable)
          Enable/disable automatic forwarding by <meta http-equiv="refresh" ....>
 void setOnlyLocalReferences(boolean enable)
          Security option.
protected  void setPluginPageQuestionAsked(java.lang.String mimetype)
           
 void setPluginsEnabled(boolean enable)
          Enables or disables plugins, default is enabled
 void setSelection(Range arg1)
          Sets the current selection.
 void setStandardFont(java.lang.String name)
          Sets the standard font style.
 void setStatusMessagesEnabled(boolean enable)
          Enable/disable statusbar messages.
 void setSuppressedPopupIndicator(boolean enable, KHTMLPart originPart)
          Shows or hides the suppressed popup indicator
 KHTMLSettings settings()
           
 void setURLCursor(org.kde.qt.QCursor c)
          Sets the cursor to use when the cursor is on a link.
 void setUserStyleSheet(KURL url)
          Sets a user defined style sheet to be used on top of the HTML 4 default style sheet.
 void setUserStyleSheet(java.lang.String styleSheet)
          Sets a user defined style sheet to be used on top of the HTML 4 default style sheet.
 void setZoomFactor(int percent)
          Sets the Zoom factor.
 void show()
          Convenience method to show the document's view.
 void showError(Job job)
          Called when a certain error situation (i.e.
 boolean statusMessagesEnabled()
          Returns true if status messages are enabled.
 void stopAnimations()
          Stops all animated images on the current and child pages
 void submitFormProxy(java.lang.String action, java.lang.String url, byte[] formData, java.lang.String target)
           
 void submitFormProxy(java.lang.String action, java.lang.String url, byte[] formData, java.lang.String target, java.lang.String contentType)
           
 void submitFormProxy(java.lang.String action, java.lang.String url, byte[] formData, java.lang.String target, java.lang.String contentType, java.lang.String boundary)
           
 KURL toplevelURL()
          Returns the toplevel (origin) URL of this document, even if this part is a frame or an iframe.
 org.kde.qt.QCursor urlCursor()
          Returns the cursor which is used when the cursor is on a link.
protected  void urlSelected(java.lang.String url, int button, int state, java.lang.String _target)
           
protected  void urlSelected(java.lang.String url, int button, int state, java.lang.String _target, URLArgs args)
           
 KHTMLView view()
          Returns a pointer to the HTML document's view.
 void write(java.lang.String str)
           
 void write(java.lang.String str, int len)
          Writes another part of the HTML code to the widget.
 int zoomFactor()
          Returns the current zoom factor.
 
Methods inherited from class org.kde.koala.ReadOnlyPart
closeStream, isProgressInfoEnabled, openStream, setProgressInfoEnabled, showProgressInfo, url, writeStream
 
Methods inherited from class org.kde.koala.Part
embed, hitTest, hostContainer, isSelectable, loadPlugins, manager, partActivateEvent, partObject, partSelectEvent, setInstance, setInstance, setManager, setPartObject, setSelectable, setWidget, widget
 
Methods inherited from class org.kde.qt.QObject
activate_filters, activate_signal_bool, activate_signal, activate_signal, activate_signal, activate_signal, blockSignals, checkConnectArgs, child, child, child, childEvent, children, connect, connect, connectInternal, connectNotify, deleteLater, disconnect, disconnect, disconnect, disconnect, disconnect, disconnect, disconnect, disconnectInternal, disconnectNotify, dumpObjectInfo, dumpObjectTree, emit, emit, emit, emit, emit, emit, emit, emit, emit, emit, emit, emit, emit, emit, emit, emit, emit, emit, emit, emit, emit, emit, event, eventFilter, highPriority, i18n, inherits, insertChild, installEventFilter, isA, isWidgetType, killTimer, killTimers, name, name, normalizeSignalSlot, objectTrees, parent, property, queryList, queryList, queryList, queryList, queryList, registerUserData, removeChild, removeEventFilter, sender, setName, setProperty, signalsBlocked, startTimer, timerEvent, tr, tr
 
Methods inherited from class org.kde.qt.Qt
arrowCursor, bin, bitBlt, bitBlt, bitBlt, bitBlt, bitBlt, bitBlt, bitBlt, bitBlt, bitBlt, bitBlt, bitBlt, bitBlt, bitBlt, bitBlt, bitBlt, bitBlt, bitBlt, bitBlt, bitBlt, bitBlt, bitBlt, bitBlt, bitBlt, black, blankCursor, blue, color0, color1, copyBlt, copyBlt, copyBlt, copyBlt, copyBlt, crossCursor, cyan, darkBlue, darkCyan, darkGray, darkGreen, darkMagenta, darkRed, darkYellow, dec, dynamicCast, endl, flush, forbiddenCursor, fromUtf8, gray, green, hex, ibeamCursor, lightGray, magenta, oct, op_div, op_div, op_div, op_div, op_equals, op_equals, op_equals, op_equals, op_minus, op_minus, op_minus, op_mult, op_mult, op_mult, op_mult, op_mult, op_mult, op_mult, op_mult, op_mult, op_not_equals, op_not_equals, op_not_equals, op_not_equals, op_plus, op_plus, op_read, op_read, op_read, op_read, op_read, op_read, op_read, op_read, op_read, op_read, op_read, op_read, op_read, op_read, op_read, op_read, op_read, op_read, op_read, op_read, op_read, op_read, op_read, op_read, op_read, op_read, op_write, op_write, op_write, op_write, op_write, op_write, op_write, op_write, op_write, op_write, op_write, op_write, op_write, op_write, op_write, op_write, op_write, op_write, op_write, op_write, op_write, op_write, op_write, op_write, op_write, op_write, op_write, pointingHandCursor, qAlpha, qApp, qAppName, qBlue, qCompress, qCompress, qDebug, qDebug, qDrawArrow, qDrawItem, qDrawItem, qDrawItem, qDrawPlainRect, qDrawPlainRect, qDrawPlainRect, qDrawPlainRect, qDrawPlainRect, qDrawPlainRect, qDrawShadeLine, qDrawShadeLine, qDrawShadeLine, qDrawShadeLine, qDrawShadeLine, qDrawShadeLine, qDrawShadeLine, qDrawShadeLine, qDrawShadePanel, qDrawShadePanel, qDrawShadePanel, qDrawShadePanel, qDrawShadePanel, qDrawShadePanel, qDrawShadePanel, qDrawShadePanel, qDrawShadeRect, qDrawShadeRect, qDrawShadeRect, qDrawShadeRect, qDrawShadeRect, qDrawShadeRect, qDrawShadeRect, qDrawShadeRect, qDrawShadeRect, qDrawShadeRect, qDrawWinButton, qDrawWinButton, qDrawWinButton, qDrawWinButton, qDrawWinButton, qDrawWinButton, qDrawWinPanel, qDrawWinPanel, qDrawWinPanel, qDrawWinPanel, qDrawWinPanel, qDrawWinPanel, qFatal, qFatal, qGLVersion, qGray, qGray, qGreen, qInitNetworkProtocols, qInstallPath, qInstallPathBins, qInstallPathData, qInstallPathDocs, qInstallPathHeaders, qInstallPathLibs, qInstallPathPlugins, qInstallPathSysconf, qInstallPathTranslations, qItemRect, qItemRect, qObsolete, qObsolete, qObsolete, qRed, qRgb, qRgba, qRound, qSharedBuild, qSuppressObsoleteWarnings, qSuppressObsoleteWarnings, qSysInfo, qSystemWarning, qSystemWarning, qUncompress, qUncompress, qVersion, qWarning, qWarning, red, reset, SIGNAL, sizeAllCursor, sizeBDiagCursor, sizeFDiagCursor, sizeHorCursor, sizeVerCursor, SLOT, splitHCursor, splitVCursor, upArrowCursor, waitCursor, whatsThisCursor, white, ws, yellow
 
Methods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DefaultGUI

public static final int DefaultGUI
See Also:
Constant Field Values

BrowserViewGUI

public static final int BrowserViewGUI
See Also:
Constant Field Values

CaretVisible

public static final int CaretVisible
Enumeration for displaying the caret.

See Also:
Constant Field Values

CaretInvisible

public static final int CaretInvisible
See Also:
Constant Field Values

CaretBlink

public static final int CaretBlink
See Also:
Constant Field Values

FindLinksOnly

public static final int FindLinksOnly
Extra Find options that can be used when calling the extended findText().

See Also:
Constant Field Values

FindNoPopups

public static final int FindNoPopups
See Also:
Constant Field Values

NoNotification

public static final int NoNotification
See Also:
Constant Field Values

Before

public static final int Before
See Also:
Constant Field Values

Only

public static final int Only
See Also:
Constant Field Values

Unused

public static final int Unused
See Also:
Constant Field Values

NotCrypted

public static final int NotCrypted
See Also:
Constant Field Values

Encrypted

public static final int Encrypted
See Also:
Constant Field Values

Mixed

public static final int Mixed
See Also:
Constant Field Values
Constructor Detail

KHTMLPart

protected KHTMLPart(java.lang.Class dummy)

KHTMLPart

public KHTMLPart(org.kde.qt.QWidget parentWidget,
                 java.lang.String widgetname,
                 org.kde.qt.QObject parent,
                 java.lang.String name,
                 int prof)
Constructs a new KHTMLPart. KHTML basically consists of two objects: The KHTMLPart itself, holding the document data (DOM document), and the KHTMLView, derived from QScrollView, in which the document content is rendered in. You can specify two different parent objects for a KHTMLPart, one parent for the KHTMLPart document and on parent for the KHTMLView. If the second parent argument is null, then parentWidget is used as parent for both objects, the part and the view.


KHTMLPart

public KHTMLPart(org.kde.qt.QWidget parentWidget,
                 java.lang.String widgetname,
                 org.kde.qt.QObject parent,
                 java.lang.String name)

KHTMLPart

public KHTMLPart(org.kde.qt.QWidget parentWidget,
                 java.lang.String widgetname,
                 org.kde.qt.QObject parent)

KHTMLPart

public KHTMLPart(org.kde.qt.QWidget parentWidget,
                 java.lang.String widgetname)

KHTMLPart

public KHTMLPart(org.kde.qt.QWidget parentWidget)

KHTMLPart

public KHTMLPart()

KHTMLPart

public KHTMLPart(KHTMLView view,
                 org.kde.qt.QObject parent,
                 java.lang.String name,
                 int prof)

KHTMLPart

public KHTMLPart(KHTMLView view,
                 org.kde.qt.QObject parent,
                 java.lang.String name)

KHTMLPart

public KHTMLPart(KHTMLView view,
                 org.kde.qt.QObject parent)

KHTMLPart

public KHTMLPart(KHTMLView view)
Method Detail

metaObject

public org.kde.qt.QMetaObject metaObject()
Overrides:
metaObject in class ReadOnlyPart

className

public java.lang.String className()
Overrides:
className in class ReadOnlyPart

openURL

public boolean openURL(KURL url)
Opens the specified URL url. Reimplemented from KParts.ReadOnlyPart.openURL .

Overrides:
openURL in class ReadOnlyPart

closeURL

public boolean closeURL()
Stops loading the document and kills all data requests (for images, etc.)

Overrides:
closeURL in class ReadOnlyPart
Returns:
always true, but the return value exists for reimplementations

showError

public void showError(Job job)
Called when a certain error situation (i.e. connection timed out) occurred. The default implementation either shows a KIO error dialog or loads a more verbose error description a as page, depending on the users configuration. job is the job that signaled the error situation


htmlDocument

public HTMLDocument htmlDocument()
Returns a reference to the DOM HTML document (for non-HTML documents, returns null)


document

public Document document()
Returns a reference to the DOM document.


documentSource

public java.lang.String documentSource()
Returns the content of the source document.


activeNode

public Node activeNode()
Returns the node that has the keyboard focus.


browserExtension

public BrowserExtension browserExtension()
Returns a pointer to the KParts.BrowserExtension.


browserHostExtension

public BrowserHostExtension browserHostExtension()

view

public KHTMLView view()
Returns a pointer to the HTML document's view.


setJScriptEnabled

public void setJScriptEnabled(boolean enable)
Enable/disable Javascript support. Note that this will in either case permanently override the default usersetting. If you want to have the default UserSettings, don't call this method.


jScriptEnabled

public boolean jScriptEnabled()
Returns true if Javascript support is enabled or false otherwise.


setStatusMessagesEnabled

public void setStatusMessagesEnabled(boolean enable)
Enable/disable statusbar messages. When this class wants to set the statusbar text, it emits setStatusBarText(String text) If you want to catch this for your own statusbar, note that it returns back a rich text string, starting with "". This you need to either pass this into your own QLabel or to strip out the tags before passing it to QStatusBar.message(String message)

See Also:
Part#setStatusBarText(, #const, #text

statusMessagesEnabled

public boolean statusMessagesEnabled()
Returns true if status messages are enabled.


setMetaRefreshEnabled

public void setMetaRefreshEnabled(boolean enable)
Enable/disable automatic forwarding by <meta http-equiv="refresh" ....>


metaRefreshEnabled

public boolean metaRefreshEnabled()
Returns true if automatic forwarding is enabled.


executeScript

public org.kde.qt.QVariant executeScript(Node n,
                                         java.lang.String script)
Same as executeScript( String ) except with the Node parameter specifying the 'this' value.


setDNDEnabled

public void setDNDEnabled(boolean b)
Enables or disables Drag'n'Drop support. A drag operation is started if the users drags a link.


dndEnabled

public boolean dndEnabled()
Returns whether Dragn'n'Drop support is enabled or not.


setJavaEnabled

public void setJavaEnabled(boolean enable)
Enables/disables Java applet support. Note that calling this function will permanently override the User settings about Java applet support. Not calling this function is the only way to let the default settings apply.


javaEnabled

public boolean javaEnabled()
Return true if Java applet support is enabled, false if disabled


setPluginsEnabled

public void setPluginsEnabled(boolean enable)
Enables or disables plugins, default is enabled


pluginsEnabled

public boolean pluginsEnabled()
Returns true if plugins are enabled/disabled.


setAutoloadImages

public void setAutoloadImages(boolean enable)
Specifies whether images contained in the document should be loaded automatically or not.


autoloadImages

public boolean autoloadImages()
Returns whether images contained in the document are loaded automatically or not.


setOnlyLocalReferences

public void setOnlyLocalReferences(boolean enable)
Security option. Specify whether only file:/ or data:/ urls are allowed to be loaded without user confirmation by KHTML. ( for example referenced by stylesheets, images, scripts, subdocuments, embedded elements ). This option is mainly intended for enabling the "mail reader mode", where you load untrusted content with a file:/ url. Please note that enabling this option currently automatically disables Javascript, Java and Plugins support. This might change in the future if the security model is becoming more sophisticated, so don't rely on this behaviour. ( default false - everything is loaded unless forbidden by KApplication.authorizeURLAction).


onlyLocalReferences

public boolean onlyLocalReferences()
Returns whether only file:/ or data:/ references are allowed to be loaded ( default false ). See setOnlyLocalReferences.


isCaretMode

public boolean isCaretMode()
Returns whether caret mode is on/off.


isEditable

public boolean isEditable()
Returns true if the document is editable, false otherwise.


setCaretPosition

public void setCaretPosition(Node node,
                             long offset,
                             boolean extendSelection)
Sets the caret to the given position. If the given location is invalid, it will snap to the nearest valid location. Immediately afterwards a caretPositionChanged signal containing the effective position is emitted

Parameters:
node - node to set to
offset - zero-based offset within the node
extendSelection - If true, a selection will be spanned from the last caret position to the given one. Otherwise, any existing selection will be deselected.

setCaretPosition

public void setCaretPosition(Node node,
                             long offset)

caretDisplayPolicyNonFocused

public int caretDisplayPolicyNonFocused()
Returns the current caret policy when the view is not focused.


setCaretDisplayPolicyNonFocused

public void setCaretDisplayPolicyNonFocused(int policy)
Sets the caret display policy when the view is not focused. Whenever the caret is in use, this property determines how the caret should be displayed when the document view is not focused. The default policy is CaretInvisible.

Parameters:
policy - new display policy

enableJScript

public void enableJScript(boolean e)

enableJava

public void enableJava(boolean e)

enablePlugins

public void enablePlugins(boolean e)

autoloadImages

public void autoloadImages(boolean e)

enableMetaRefresh

public void enableMetaRefresh(boolean e)

setCharset

public boolean setCharset(java.lang.String arg1,
                          boolean arg2)

baseURL

public KURL baseURL()

baseTarget

public java.lang.String baseTarget()

backgroundURL

public KURL backgroundURL()
Returns the URL for the background Image (used by save background)


scheduleRedirection

public void scheduleRedirection(int delay,
                                java.lang.String url,
                                boolean lockHistory)
Schedules a redirection after delay seconds.


scheduleRedirection

public void scheduleRedirection(int delay,
                                java.lang.String url)

begin

public void begin(KURL url,
                  int xOffset,
                  int yOffset)
Clears the widget and prepares it for new content. If you want url() to return for example "file:/tmp/test.html", you can use the following code:
                 view.begin( KURL("file:/tmp/test.html" ) );
                 

Parameters:
url - is the url of the document to be displayed. Even if you are generating the HTML on the fly, it may be useful to specify a directory so that any pixmaps are found.
xOffset - is the initial horizontal scrollbar value. Usually you don't want to use this.
yOffset - is the initial vertical scrollbar value. Usually you don't want to use this. All child frames and the old document are removed if you call this method.

begin

public void begin(KURL url,
                  int xOffset)

begin

public void begin(KURL url)

begin

public void begin()

write

public void write(java.lang.String str,
                  int len)
Writes another part of the HTML code to the widget. You may call this function many times in sequence. But remember: The fewer calls you make, the faster the widget will be. The HTML code is send through a decoder which decodes the stream to Unicode. The len parameter is needed for streams encoded in utf-16, since these can have \\0 chars in them. In case the encoding you're using isn't utf-16, you can safely leave out the length parameter. Attention: Don't mix calls to write( String ) with calls to write( String ). The result might not be what you want.


write

public void write(java.lang.String str)

end

public void end()
Call this after your last call to write().


paint

public void paint(org.kde.qt.QPainter arg1,
                  org.kde.qt.QRect arg2,
                  int arg3,
                  boolean[] arg4)
Paints the HTML page to a QPainter. See KHTMLView.paint for details


paint

public void paint(org.kde.qt.QPainter arg1,
                  org.kde.qt.QRect arg2,
                  int arg3)

paint

public void paint(org.kde.qt.QPainter arg1,
                  org.kde.qt.QRect arg2)

setEncoding

public boolean setEncoding(java.lang.String name,
                           boolean override)
Sets the encoding the page uses. This can be different from the charset. The widget will try to reload the current page in the new encoding, if url() is not empty.


setEncoding

public boolean setEncoding(java.lang.String name)

encoding

public java.lang.String encoding()
Returns the encoding the page currently uses. Note that the encoding might be different from the charset.


setUserStyleSheet

public void setUserStyleSheet(KURL url)
Sets a user defined style sheet to be used on top of the HTML 4 default style sheet. This gives a wide range of possibilities to change the layout of the page. To have an effect this function has to be called after calling begin().


setUserStyleSheet

public void setUserStyleSheet(java.lang.String styleSheet)
Sets a user defined style sheet to be used on top of the HTML 4 default style sheet. This gives a wide range of possibilities to change the layout of the page. To have an effect this function has to be called after calling begin().


setStandardFont

public void setStandardFont(java.lang.String name)
Sets the standard font style.

Parameters:
name - The font name to use for standard text.

setFixedFont

public void setFixedFont(java.lang.String name)
Sets the fixed font style.

Parameters:
name - The font name to use for fixed text, e.g. the <pre> tag.

gotoAnchor

public boolean gotoAnchor(java.lang.String name)
Finds the anchor named name. If the anchor is found, the widget scrolls to the closest position. Returns if the anchor has been found.


nextAnchor

public boolean nextAnchor()
Go to the next anchor This is useful to navigate from outside the navigator


prevAnchor

public boolean prevAnchor()
Go to previous anchor


setURLCursor

public void setURLCursor(org.kde.qt.QCursor c)
Sets the cursor to use when the cursor is on a link.


urlCursor

public org.kde.qt.QCursor urlCursor()
Returns the cursor which is used when the cursor is on a link.


findText

public void findText()
Starts a new search by popping up a dialog asking the user what he wants to search for.


findText

public void findText(java.lang.String str,
                     long options,
                     org.kde.qt.QWidget parent,
                     KFindDialog findDialog)
Starts a new search, but bypasses the user dialog.

Parameters:
str - The string to search for.
options - Find options.
parent - Parent used for centering popups like "string not found".
findDialog - Optionally, you can supply your own dialog.

findText

public void findText(java.lang.String str,
                     long options,
                     org.kde.qt.QWidget parent)

findText

public void findText(java.lang.String str,
                     long options)

findTextBegin

public void findTextBegin()
Initiates a text search.


findTextNext

public boolean findTextNext()
Finds the next occurence of a string set by findText()

Returns:
true if a new match was found.

findTextNext

public boolean findTextNext(boolean reverse)
Finds the next occurence of a string set by findText()

Parameters:
reverse - if true, revert seach direction (only if no find dialog is used)
Returns:
true if a new match was found.

setZoomFactor

public void setZoomFactor(int percent)
Sets the Zoom factor. The value is given in percent, larger values mean a generally larger font and larger page contents. It is not guaranteed that all parts of the page are scaled with the same factor though. The given value should be in the range of 20..300, values outside that range are not guaranteed to work. A value of 100 will disable all zooming and show the page with the sizes determined via the given lengths in the stylesheets.


zoomFactor

public int zoomFactor()
Returns the current zoom factor.


selectedText

public java.lang.String selectedText()
Returns the text the user has marked.


selectedTextAsHTML

public java.lang.String selectedTextAsHTML()
Return the text the user has marked. This is guaranteed to be valid xml, and to contain the \ and \ tags. FIXME probably should make for 4.0 ?


selection

public Range selection()
Returns the selected part of the HTML.


selection

public void selection(Node startNode,
                      long startOffset,
                      Node endNode,
                      long endOffset)
Returns the selected part of the HTML by returning the starting and end position. If there is no selection, both nodes and offsets are equal.

Parameters:
startNode - returns node selection starts in
startOffset - returns offset within starting node
endNode - returns node selection ends in
endOffset - returns offset within end node.

setSelection

public void setSelection(Range arg1)
Sets the current selection.


hasSelection

public boolean hasSelection()
Has the user selected anything? Call selectedText() to retrieve the selected text.

Returns:
true if there is text selected.

selectAll

public void selectAll()
Marks all text in the document as selected.


show

public void show()
Convenience method to show the document's view. Equivalent to widget().show() or view().show() .


hide

public void hide()
Convenience method to hide the document's view. Equivalent to widget().hide() or view().hide().


partManager

public PartManager partManager()
Returns a reference to the partmanager instance which manages html frame objects.


saveState

public void saveState(org.kde.qt.QDataStream stream)
Saves the KHTMLPart's complete state (including child frame objects) to the provided QDataStream. This is called from the saveState() method of the browserExtension().


restoreState

public void restoreState(org.kde.qt.QDataStream stream)
Restores the KHTMLPart's previously saved state (including child frame objects) from the provided QDataStream. This is called from the restoreState() method of the browserExtension() .

See Also:
saveState(org.kde.qt.QDataStream)

nodeUnderMouse

public Node nodeUnderMouse()
Returns the Node currently under the mouse. The returned node may be a shared node (e. g. an \ node if the mouse is hovering over an image map).


nonSharedNodeUnderMouse

public Node nonSharedNodeUnderMouse()
Returns the Node currently under the mouse that is not shared. The returned node is always the node that is physically under the mouse pointer (irrespective of logically overlying elements like, e. g., \ on image maps).


settings

public KHTMLSettings settings()

parentPart

public KHTMLPart parentPart()
Returns a pointer to the parent KHTMLPart if the part is a frame in an HTML frameset. Returns null otherwise.


frameNames

public java.util.ArrayList frameNames()
Returns a list of names of all frame (including iframe) objects of the current document. Note that this method is not working recursively for sub-frames.


findFrame

public KHTMLPart findFrame(java.lang.String f)
Finds a frame by name. Returns null if frame can't be found.


findFrameParent

public KHTMLPart findFrameParent(ReadOnlyPart callingPart,
                                 java.lang.String f)
Recursively finds the part containing the frame with name f and checks if it is accessible by callingPart Returns null if no suitable frame can't be found. Returns parent part if a suitable frame was found and frame info in childFrame


currentFrame

public ReadOnlyPart currentFrame()
Return the current frame (the one that has focus) Not necessarily a direct child of ours, framesets can be nested. Returns "this" if this part isn't a frameset.


frameExists

public boolean frameExists(java.lang.String frameName)
Returns whether a frame with the specified name is exists or not. In contrary to the findFrame method this one also returns true if the frame is defined but no displaying component has been found/loaded, yet.


findFramePart

public ReadOnlyPart findFramePart(java.lang.String f)
Finds a frame by name. Returns null if frame can't be found.


setJSStatusBarText

public void setJSStatusBarText(java.lang.String text)
Called by KJS. Sets the StatusBarText assigned via window.status


setJSDefaultStatusBarText

public void setJSDefaultStatusBarText(java.lang.String text)
Called by KJS. Sets the DefaultStatusBarText assigned via window.defaultStatus


jsStatusBarText

public java.lang.String jsStatusBarText()
Called by KJS. Returns the StatusBarText assigned via window.status


jsDefaultStatusBarText

public java.lang.String jsDefaultStatusBarText()
Called by KJS. Returns the DefaultStatusBarText assigned via window.defaultStatus


referrer

public java.lang.String referrer()
Referrer used for links in this page.


pageReferrer

public java.lang.String pageReferrer()
Referrer used to obtain this page.


lastModified

public java.lang.String lastModified()
Last-modified date (in raw string format), if received in the [HTTP] headers.


preloadStyleSheet

public void preloadStyleSheet(java.lang.String url,
                              java.lang.String stylesheet)
Loads a style sheet into the stylesheet cache.


preloadScript

public void preloadScript(java.lang.String url,
                          java.lang.String script)
Loads a script into the script cache.


restored

public boolean restored()

setFormNotification

public void setFormNotification(int fn)
Determine if signal should be emitted before, instead or never when a submitForm() happens.


formNotification

public int formNotification()
Determine if signal should be emitted before, instead or never when a submitForm() happens. ### KDE4 remove me


toplevelURL

public KURL toplevelURL()
Returns the toplevel (origin) URL of this document, even if this part is a frame or an iframe.

Returns:
the actual original url.

isModified

public boolean isModified()
Checks whether the page contains unsubmitted form changes.

Returns:
true if form changes exist

setSuppressedPopupIndicator

public void setSuppressedPopupIndicator(boolean enable,
                                        KHTMLPart originPart)
Shows or hides the suppressed popup indicator


inProgress

public boolean inProgress()

setActiveNode

public void setActiveNode(Node node)
Sets the focused node of the document to the specified node. If the node is a form control, the control will receive focus in the same way that it would if the user had clicked on it or tabbed to it with the keyboard. For most other types of elements, there is no visual indication of whether or not they are focused. See activeNode

Parameters:
node - The node to focus

stopAnimations

public void stopAnimations()
Stops all animated images on the current and child pages


dcopObjectId

public java.lang.String dcopObjectId()

setCaretMode

public void setCaretMode(boolean enable)
Enables/disables caret mode. Enabling caret mode displays a caret which can be used to navigate the document using the keyboard only. Caret mode is switched off by default.

Parameters:
enable - true to enable, false to disable caret mode.

setEditable

public void setEditable(boolean enable)
Makes the document editable. Setting this property to true makes the document, and its subdocuments (such as frames, iframes, objects) editable as a whole. FIXME: insert more information about navigation, features etc. as seen fit

Parameters:
enable - true to set document editable, false to set it read-only.

setCaretVisible

public void setCaretVisible(boolean show)
Sets the visibility of the caret. This methods displays or hides the caret regardless of the current caret display policy (see setCaretDisplayNonFocused), and regardless of focus. The caret will be shown/hidden only under at least one of the following conditions:
  • the document is editable
  • the document is in caret mode
  • the document's currently focused element is editable
  • Parameters:
    show - true to make visible, false to hide.

    submitFormProxy

    public void submitFormProxy(java.lang.String action,
                                java.lang.String url,
                                byte[] formData,
                                java.lang.String target,
                                java.lang.String contentType,
                                java.lang.String boundary)

    submitFormProxy

    public void submitFormProxy(java.lang.String action,
                                java.lang.String url,
                                byte[] formData,
                                java.lang.String target,
                                java.lang.String contentType)

    submitFormProxy

    public void submitFormProxy(java.lang.String action,
                                java.lang.String url,
                                byte[] formData,
                                java.lang.String target)

    completeURL

    protected KURL completeURL(java.lang.String url)
    returns a KURL object for the given url. Use when you know what you're doing.


    htmlError

    protected void htmlError(int errorCode,
                             java.lang.String text,
                             KURL reqUrl)
    presents a detailed error message to the user. errorCode kio error code, eg KIO.ERR_SERVER_TIMEOUT. text kio additional information text. url the url that triggered the error.


    customEvent

    protected void customEvent(org.kde.qt.QCustomEvent event)
    Overrides:
    customEvent in class Part

    guiActivateEvent

    protected void guiActivateEvent(GUIActivateEvent event)
    Internal reimplementation of KParts.Part.guiActivateEvent .

    Overrides:
    guiActivateEvent in class Part

    openFile

    protected boolean openFile()
    Internal empty reimplementation of KParts.ReadOnlyPart.openFile .


    urlSelected

    protected void urlSelected(java.lang.String url,
                               int button,
                               int state,
                               java.lang.String _target,
                               URLArgs args)

    urlSelected

    protected void urlSelected(java.lang.String url,
                               int button,
                               int state,
                               java.lang.String _target)

    createPart

    protected ReadOnlyPart createPart(org.kde.qt.QWidget parentWidget,
                                      java.lang.String widgetName,
                                      org.kde.qt.QObject parent,
                                      java.lang.String name,
                                      java.lang.String mimetype,
                                      java.lang.StringBuffer serviceName,
                                      java.lang.String[] serviceTypes,
                                      java.lang.String[] params)
    This method is called when a new embedded object (include html frames) is to be created. Reimplement it if you want to add support for certain embeddable objects without registering them in the KDE wide registry system (KSyCoCa) . Another reason for re-implementing this method could be if you want to derive from KTHMLPart and also want all html frame objects to be a object of your derived type, in which case you should return a new instance for the mimetype 'text/html' .


    pluginPageQuestionAsked

    protected boolean pluginPageQuestionAsked(java.lang.String mimetype)

    setPluginPageQuestionAsked

    protected void setPluginPageQuestionAsked(java.lang.String mimetype)

    doOpenStream

    protected boolean doOpenStream(java.lang.String mimeType)
    Implements the streaming API of KParts.ReadOnlyPart.


    doWriteStream

    protected boolean doWriteStream(byte[] data)
    Implements the streaming API of KParts.ReadOnlyPart.


    doCloseStream

    protected boolean doCloseStream()
    Implements the streaming API of KParts.ReadOnlyPart.


    finalize

    protected void finalize()
                     throws java.lang.InternalError
    Deletes the wrapped C++ instance

    Overrides:
    finalize in class org.kde.qt.QObject
    Throws:
    java.lang.InternalError

    dispose

    public void dispose()
    Delete the wrapped C++ instance ahead of finalize()

    Overrides:
    dispose in class org.kde.qt.QObject

    isDisposed

    public boolean isDisposed()
    Has the wrapped C++ instance been deleted?

    Overrides:
    isDisposed in class org.kde.qt.QObject