Settings

There are various settings you can control (or relay to the user's control) with HTMLComponent:

  • Image loading: Can be turned on/off using setShowImages(boolean). The default is true (showing images). When this is set to false, referenced images are not loaded nor are they displayed.

  • CSS loading: Can be turned on/off using setIgnoreCSS(boolean). The default is false (CSSs are loaded). When this is set to true, all CSS directives are ignored including inline CSS, embedded CSS and external CSS files.

  • CSS media types. CSS references can specify which media types they are suitable for. For example, an HTML document can have two separate CSS files, one for use with the "handheld" media type and the other with the "screen" media type. By default, HTMLComponent accepts CSS files and segments that are defined as "handheld" or "all" (or if the media type is unspecified). To modify the supported media types, one can use the setCSSSupportedMediaTypes method.

  • Max Threads. The number of threads used by HTMLComponent to load external referenced images and CSS files can be set with setMaxThreads(int). The default is 2.