Sferyx LogoSferyx Internet Based Systems


User Manual
Oracle Forms
SWT / Eclipse
XML features
Licensing & Prices


User Manual
Drupal Integration
SAKAI Integration
IBM Lotus Notes
Licensing & Prices


User Manual
Oracle Forms
Licensing & Prices


User Manual
Licensing & Prices


User Manual
On-line store


Sferyx JSyndrome HTMLBrowser Component Edition

Advanced Java HTMLBrowser component
for your Java applications for rendering HTML/XHTML 

Sferyx JSyndrome HTMLBrowser Component is a powerful Java based HTML rendering component. It allows quick and easy rendering/visualization of HTML content  from any java application, Oracle Forms, SWT/Eclipse and others. It requires JDK or JRE 1.3 or higher. With only a few lines of code is possible to display and render HTML or text files practically from any source.

  • Pure Java HTML rendering engine - allows fast and easy HTML rendering from various sources and even from very complex HTML/XHTML documents with a single line of code
  • Automatic multiple page layout, rendering and inclusion of all images, inline and linked styles and pagination when printing
  • Possibility to specify the desired Page format and margins and whether to scale the content to fit inside or not when printing
  • Works with any JRE/ JDK 1.3 or higher
  • Support for Oracle Forms
  • Fully compatible with Swing, SWT/Eclipse
  • Automatic encoding support, including all UTF-8 languages
  • Possibility to specify external style sheet to be applied automatically to the loaded documents

Supported Configurations

User Manual for use as JavaBean

The Sferyx JSyndrome  HTMLBrowser  Component Edition has been released as easy to use and configure Java Bean. If you intend to use it as component within an application then you can consult the javadoc documentation supplied with the product - it can be inserted as visual java bean into the editing environments such as Forte for Java, JBuilder or similar. It is sufficient to add the jar file to the component palette of the IDE and the icon of the  HTMLBrowser  should appear on the toolbar. The demo version is restricted and cannot be customized, it also takes automatically the default system look & feel. The retail versions instead  feature different visual options for full customization of the user interface such as showing/hiding of the  toolbar, popup menu also inserting of initial HTML content etc.

You can consult the complete javadoc documentation supplied with your retail product. However some of the mostly used methods during customization operations are:


Available packages:



sferyx.administration.renderers Provides the general classes for advanced HTML rendering.
sferyx.administration.renderers.filechooser Provides supporting functionalities for file browsing and various previews.
sferyx.administration.renderers.parser Provides the parser capabilities for the  browser
sferyx.administration.printing Contains all classes related to the printing capabilities of the  browser
sferyx.administration.search Search functionalities for the  browser
sferyx.administration.xmlcomponents XML mode support classes
sferyx.javascript.engine Basic javascript emulation functionalities for accessing the document elements.


The entire API contains hundreds of different methods - some of them are:


 void addDocumentListener(javax.swing.event.DocumentListener listener)
          This method allows DocumentListereners to be added directly to the  browser .
 void addFormElementsMouseListener(java.awt.event.MouseListener listener)
          This method is could be used to attach listeners to HTML Form elements such as buttons, lists and drop down menus.
 void appendContentToContentBuffer(java.lang.String content)
          Appends new string to existing content buffer.
 void closeBufferAndInsert()
          Closes the existing content buffer and inserts its content inside the  browser .
 javax.swing.JButton createMenuButton(javax.swing.JToolBar toolbar, java.lang.String tooltipText, java.lang.String actionCommand, javax.swing.ImageIcon iconName)
          Creates new button and adds it to given toolbar.
 javax.swing.JButton createMenuButton(javax.swing.JToolBar toolbar, java.lang.String tooltipText, java.lang.String actionCommand, java.lang.String iconName)
          Creates new button and adds it to given toolbar.
 javax.swing.JButton createMenuButtonFromAction(javax.swing.JToolBar toolbar, java.lang.String tooltipText, java.lang.String actionName)
          Creates new button from given action name from the getActions() in  HTMLBrowser Kit and adds it to given toolbar.
 void createNewDocument(java.lang.String text)
          Creates new document with the string content and places it into the  browser .
 void createNewDocument(java.lang.String text, java.net.URL docBase)
          Creates new document with the string content and document base and places it into the  browser .
 java.lang.String dumpContentPortion(int start, int end)
          Returns the selected portion of the document as formatted text skipping paragraphs tables etc.
 java.lang.String dumpDocElement(javax.swing.text.Element elem)
          Returns the entire content of the element as HTML string.
 java.lang.String dumpElementContent(javax.swing.text.Element elem)
          Returns the content of the element as HTML string without the tags of the passed element.
 java.lang.String dumpElementDocumentPortion(javax.swing.text.Element elem)
          Returns as HTML String the document portion contained within a given element.
 java.lang.String dumpSelectedContentPortion()
          Returns as HTML String the selected document portion.
 java.lang.String dumpSelectedDocumentPortion()
          Returns as HTML String the selected document portion.
 java.lang.String dumpSelectedElementContent(javax.swing.text.Element elem)
 boolean exit()
          Invoked when the Exit menu item is pressed on the file menu.
 java.lang.String getAdditionalQueryParameters()
          Returns the additional query parameters to be used when sending the doucment via HTTP POST method
 java.lang.String getContent()
          Gets the entire content of the document as an HTML string.
 int getContentLenght()
          Returns the length of the content - it will include in the count also all the HTML markup
 java.lang.String getContentPortion(int offset, int length)
          Returns portion of the content - this should be used in environments where is impossible the whole content at once due to some limitations such as the case of Oracle Forms.
 java.lang.String getDefaultCharset()
          Returns the default charset for this document.
 javax.swing.JToolBar getShortcutsToolBar()
          Returns the toolbar that contains all the shortcut buttons for open, save etc.
 javax.swing.ImageIcon getEditorIcon(java.lang.String iconName)
          Returns as ImageIcon one of the loaded images for the buttons and the menus by name.
 int getEditorState()
          Returns the current state of the  browser .
 boolean getExitOnExit()
          Return if the  browser  should exit using System.exit(); when the user presses Exit on the File menu.
 java.lang.String getExternalStyleSheetLocation()
          Returns the URL as string of the external style sheet loaded and used to apply style classes to the document elements
 javax.swing.JFileChooser getFileDialog()
          Returns the file dialog used to load and save the files.
 javax.swing.JEditorPane getInternalJEditorPane()
          Returns the internal JEditorPane used for editing and rendering in the visual  browser .
 java.lang.String getLinkedObjectsFolderName()
          This method is used to retrieve the folder name where all linked objects should be moved upon save.
 java.lang.String getRelativePath(java.lang.String imageURL)
          Returns the passed path as a path relative to the document base (docbase) - used for inserting of images, hyperlinks etc.
 java.lang.String getRemovedToolbarItems()
          Returns the previously removed toolbar items.
 boolean getSaveEntireDocumentTree()
          Returns whether the entire document tree should be saved upon saving.
 java.lang.String getSelectedPlainText()
          Returns the selected content as plain text
javax.swing.ImageIcon getSharedIcon(java.lang.String iconName)
          Returns a shared icon which can be used for creating new items with the icons already preloaded
 java.lang.String getUnicodeContent()
          Returns the content of the  browser  as unicode string.
 boolean getUploadContentAsMultipartFormData()
          Returns whether the content of the  browser  should be uploaded as multipart/form data with all local images bundled inside.
 java.lang.String getUploadedObjectsTranslationPath()
          Returns the translation path to be used before uploading the document content as multipart/form data.
 java.lang.String getVariableName()
          Returns the name of the variable to be used when sending the document content via HTTP POST method.
 void insertContent(java.lang.String content)
          Will insert the specified HTML content at the caret position
 void insertContentAsynchronously(java.lang.String content)
          This method is used to insert content into the  browser  without the synchronization locks.
 void insertUpdate(javax.swing.event.DocumentEvent documentEvent)
 boolean isBrowserTransparent()
          Returns is the  browser  has been set to be transparent or not.
 boolean isEnabled()
 boolean isLocalFileBrowsingDisabled()
          Returns whether the local file browsing is enabled
 boolean isToolBarVisible()
          Returns true/false if the toolbar is visible and active or not on the  browser .
 boolean isXMLMode()
          Returns whether the  browser  will run in XML detection mode.
 void loadExternalStyleSheet(java.lang.String externalStyleSheetLocation)
          Loads external style sheet specified by the given URL and adds its content to the existing style classes.
 void loadExternalStyleSheet(javax.swing.text.html.StyleSheet  styleSheet,  java.lang.String styleSheetURL)
          Loads external style sheet specified by the given URL and adds its content to the existing style classes.
 void loadInterfaceLanguageFile(java.lang.String fileURL)
          Loads and renders the interface language file which should be used to localize the UI of the  browser
 void openContentBuffer()
          Ooens the new content buffer for inserting content inside the  browser .
 void openFile()
          Shows the FileDialog and opens the selected file
 void openFile(java.net.URL fileURL)
          Opens silently the URL passed, as HTML document for editing
 void openLocation()
          Shows the open location dialog and opens the remote location
 void openLocation(java.lang.String location)
 void openLocation(java.net.URL location)
          Opens silently the URL passed, as HTML document for editing
 void printFile()
          Shows the print dialog and prints out the edited document
 void removeDocumentListener(javax.swing.event.DocumentListener listener)
          Removes a document listener from the  browser .
 void removeFormElementsMouseListener(java.awt.event.MouseListener listener)
          Will remove a listener which delivers events from the form components
 boolean saveEntireDocumentTree()
          Will save the entire documnet tree in a relative folder under the document path.
 boolean saveEntireDocumentTree(java.io.File toSaveFile)
 boolean saveFile()
          Shows the FileDialog and saves the file to the selected location.
 void saveToLocation(java.lang.String saveLocation, boolean entireFile)
          Sends the document content to given URL.
 void selectCurrentTable()
          Selects the table at the caret position or does nothing if there is no table.
 void selectCurrentTableCell()
          Selects the table cell at the caret position or does nothing if there is no table.
 void selectCurrentTableColumn()
 void selectCurrentTableRow()
          Selects the table row at the caret position or does nothing if there is no table.
 void setAdditionalQueryParameters(java.lang.String additionalQueryParameters)
          Adds additional query parameters to the content when using HTTP POST method to upload the content to a remote server.
 void setAllMenusAndShortcutsStatus(boolean status)
          Enables/disables the menu items and shortcuts.
 void setContent(java.lang.String htmlContent)
          This method creates dynamically new document and inserts the given HTML String as new document content.
 void setContentAsynchronously(java.lang.String htmlContent)
          This method is used to sets the content of the  browser  without the synchronization locks.
 void setDefaultCharset(java.lang.String defaultCharset)
          Sets the default charset to be used by the  browser .
 void setDefaultInitialFont(java.lang.String initialFont)
          Sets the default font family to be used in the  browser  - this will generate automatically the required font tags in order to reflect the font into the browsers
 void setDocumentLenghtLimit(int limit, java.lang.String warningMessage)
          Sets the maximum allowed document length if any has been set.
 void setBrowserTransparent(boolean browserTransparent)
          This will cause the visual  browser  to become completely transparent.
 void setEnabled(boolean enabled)
 void setExitOnExit(boolean exit)
          Sets the behavior of the  browser  when "Exit" on the file menu
 void setExternalStyleSheetLocation(java.lang.String externalStyleSheetLocation)
          Sets the external style sheet to be loaded and used for rendering and editing of the document.
 void setFileDialog(javax.swing.JFileChooser newFileChooser)
          Sets the file dialog to be used in all browsing operations.
 void setFontRenderingZoom(int relativeIncrease)
          Specifies the relative redering size of the fonts.
 void setLinkedObjectsFolderName(java.lang.String  linkedObjectsFolderName)
          This method is used to set the folder name where all linked objects should be moved upon save.
 void setLocalFileBrowsingDisabled(boolean disabled)
          This method will enable/disable the local file dialog when needed.
 void setRemovedToolbarItems(java.lang.String toolbarItemNames)
          setRemovedToolbarItems("openFileButton,...") - Indicates which toolbar items should be removed from the tool bars.
 void setSaveEntireDocumentTree(boolean saveEntrireDocTree)
          Sets whether the entire document tree should be saved upon saving.
void setSharedIcon(java.lang.String iconName, javax.swing.ImageIcon icon)
          Replaces a shared icon which can be used for creating new items with the icons already preloaded 
 void setToolbarButtonsStatus(boolean status)
          Sets all toolbar items status
 void setToolBarVisible(boolean visible)
          Sets the toolbar section of the  browser  visible and active or not.
 void setUploadContentAsMultipartFormData(boolean  uploadContentAsMultipartFormData)
          Indicateds whether the content of the  browser  should be uploaded as multipart/form-data or as a url-encoded content
 void setUploadedObjectsTranslationPath(java.lang.String  uploadedObjectsTranslationPath)
          Indicates the translation path for local objects when uploaded to the server as multipart/form data.
 void setVariableName(java.lang.String variableName)
          Sets the name of the HTTP POST variable to used for the html content when uploading.
 void setXMLMode(boolean xmlMode)
          This will enable the  browser  to build automatically its own XML grammar for handling XML/XHTML documents.
 void showFindDialog()
          Shows the find/search dialog.
 boolean uploadMultipartContent(java.lang.String saveLocation, boolean entireFile)
          Casues the entire content of the  browser  to be uploaded to given location as multipart form data.


Customization of the user interface

The Sferyx JSyndrome  HTMLBrowser  Component Edition offers zero efforts full customization of the user interface also directly from inside the IDE. Using the following methods you can toolbar items in order to make the  HTMLBrowser  bean fit your needs.

Removing toolbar items:

setRemovedToolbarItems("newFileButton,openFileButton,...") - Indicates which toolbar items should be removed from the tool bars. This list contains comma separated names of the toolbar items contained within the browser's toolbars to be removed. This allows the full customization of the toolbars of the  browser. The full list of the toolbar items is:

newFileButton   -  the blank page toolbar button;
-  the open file toolbar button;
-  the save file button;
-  the print file button;
-  the copy toolbar button;

backwardButton   -  the backward button;
-  the forward button;
-  the reload page button;
-  the search text button;

zoomoutTextButton -
the text zoom out button
zoominTextButton -
the text zoom in button
pdfExportButton -
the PDF export toolbar button when enabled


User Manual for use with Oracle Forms

In order to use our  browser  in Oracle forms you should do the following steps:

1) Place the jar file in the class path of the oracle forms:

For example, if your installation folder is c:\orant, you have to place the jar file in the following folder:


2) Edit the /forms/server/formsweb.cfg file to add the jar file to the archive_jinit variable - this step is needed for the starting the form on the web

# Forms applet archive setting for JInitiator 
archive_jini=f90all_jinit.jar, HTMLBrowser.jar

3) Designing your form with the java bean and the Forms designer
- Open your form
- Add a "Bean area" to any block from the layout designer - there is a "Bean area" canvas on the toolbox and you can add it to any container on your form
- Set its Implementation class property to : sferyx.administration.renderers.HTMLBrowserOracleBean

That's all - if you have configured everything properly, the  browser  will appear inside your form. For setting variables and using its methods, please refer to the oracle help - the topic for using java beans with oracle forms. Further you can consult our FAQ - it contains some examples and tips on how to handle the  browser  in various situations regarding Oracle Forms.


User Manual for use with Eclipse SWT

1. How can I integrate the browser in an Eclipse / SWT Application?

 Place the jar file in the designer's build classpath and it will be loaded by the Eclipse environment. You can add this as follows:

Your project --> Build Path --> Configure Build path --> add HTMLBrowser.jar

and make sure to import all the necessary packages including org.eclipse.swt.awt.SWT_AWT

2. How to instantiate and load the class?

We have provided a special wrapper class sferyx.administration.renderers.HTMLBrowserSWTBean class which provides instant integration with just a few lines of code as follows:

Composite composite = new Composite(shell, SWT.NO_BACKGROUND | SWT.EMBEDDED);
Frame frame = SWT_AWT.new_Frame(composite);
HTMLBrowserSWTBean htmlBrowserSWTBean=new HTMLBrowserSWTBean();





The Sferyx JSyndrome HTMLBrowser is fully compatible and will run on any JRE 1.3,1.4,1.5,1.6,1.7 and higher. The provided wrapper classes like HTMLBrowserOracleBean and HTMLBrowserSWTBean make it also compatible with Oracle Forms environment and Eclipse/SWT environement.




If you use it as a javabean, the installation is quite simple and is sufficient to add the  HTMLBrowser  jar file (for example  HTMLBrowser Pro.jar) to the classpath of your application and include few lines of code for instantiating the HTML  browser  instance like:

sferyx.administration.renderers. HTMLBrowser   HTMLBrowser  = new sferyx.administration.renderers.HTMLBrowser();
 HTMLBrowser .setContent("Some html content"); //set some initial content
 HTMLBrowser .setRemovedToolbarItems("openFileButton, printFileButton"); //remove some toolbar items



About the browse and save buttons

Due to the security restrictions for the applets, when used as normal applet the browse and save buttons and menu items are disabled since are used to open, browse files on the local computer. For browsing remote locations are used "Open location" and "Save" menu items on the File menu. If the  HTMLBrowser  is used as signed applet within an intranet or on an internet site and the user grants the requested permissions all the menu items become available and the  HTMLBrowser  can be used for example as an unified editing solution within an organization installed on the LAN server and accessed from unlimited number of clients. 

Our Services and assistance

All Sferyx products are assured with continuous e-mail support. With the retail products is included in the price 30 days startup support. Additionally, you can purchase annual support subscription tickets from our web store.

Sferyx offers also a wide range of customization services for its products in order to satisfy any customer requirement. We can adapt our products to fit the customer needs and any kind of integration requirements. We execute also express developments, customization under request, development of new features on demand. You can request a quote at sales@sferyx.com or support@sferyx.com indicating your requirements and the terms of delivery.



Copyright 2002-2016 Sferyx Srl. All rights reserved. Sferyx and the Sferyx logo are registered trademarks of Sferyx Srl. http://www.sferyx.com