sferyx.administration.renderers
Class HTMLBrowser

java.lang.Object
  extended by java.awt.Component
      extended by java.awt.Container
          extended by javax.swing.JComponent
              extended by javax.swing.JRootPane
                  extended by sferyx.administration.renderers.HTMLBrowser
All Implemented Interfaces:
java.awt.dnd.DropTargetListener, java.awt.event.ActionListener, java.awt.event.ContainerListener, java.awt.event.ItemListener, java.awt.event.KeyListener, java.awt.event.MouseListener, java.awt.event.MouseMotionListener, java.awt.image.ImageObserver, java.awt.MenuContainer, java.io.Serializable, java.util.EventListener, javax.accessibility.Accessible, javax.swing.event.CaretListener, javax.swing.event.ChangeListener, javax.swing.event.DocumentListener, javax.swing.event.HyperlinkListener

public class HTMLBrowser
extends javax.swing.JRootPane
implements java.io.Serializable, java.awt.event.ItemListener, javax.swing.event.HyperlinkListener, javax.swing.event.ChangeListener, java.awt.event.MouseListener, java.awt.event.MouseMotionListener, java.awt.event.ActionListener, java.awt.event.ContainerListener, javax.swing.event.CaretListener, javax.swing.event.DocumentListener, java.awt.event.KeyListener, java.awt.dnd.DropTargetListener

This is a full featured advanced HTML browser - it allows rendering of HTML files, forms, tables, pictures etc.

See Also:
Serialized Form

Nested Class Summary
 class HTMLBrowser.copyAction
           
 class HTMLBrowser.CustomStyleSheet
           
 class HTMLBrowser.CustomTextAction
           
 class HTMLBrowser.selectAllAction
           
 
Nested classes/interfaces inherited from class javax.swing.JRootPane
javax.swing.JRootPane.AccessibleJRootPane, javax.swing.JRootPane.RootLayout
 
Nested classes/interfaces inherited from class javax.swing.JComponent
javax.swing.JComponent.AccessibleJComponent
 
Nested classes/interfaces inherited from class java.awt.Container
java.awt.Container.AccessibleAWTContainer
 
Nested classes/interfaces inherited from class java.awt.Component
java.awt.Component.AccessibleAWTComponent, java.awt.Component.BaselineResizeBehavior, java.awt.Component.BltBufferStrategy, java.awt.Component.FlipBufferStrategy
 
Field Summary
static boolean adjustDPIScalingAlsoForMac
           
 int asynchronousLoadPriority
           
protected  javax.swing.JButton backwardButton
           
protected  javax.swing.JButton copyButton
           
 boolean debug
           
 boolean disableButtonsUpdate
           
 java.lang.String docxDefaultFooter
           
 java.lang.String docxDefaultHeader
           
 java.lang.String docxFirstPageFooter
           
 java.lang.String docxFirstPageHeader
           
 float docxPageBottomMargin
           
 float docxPageHeight
           
 float docxPageLeftMargin
           
 float docxPageRightMargin
           
 float docxPageTopMargin
           
 float docxPageWidth
           
static int DROP_FORMATTED__TEXT
           
static int DROP_PLAIN_TEXT
           
static int EQUATION_EDITOR_GENERATES_IMAGES
           
static int EQUATION_EDITOR_GENERATES_MATHML
           
protected  javax.swing.JButton findTextButton
           
protected  javax.swing.JButton forwardButton
           
static boolean generateFormattingOutsideCustomTags
           
static boolean highQualityImageScalingEnabled
           
static boolean insertEditableSpace
           
static boolean isMac
           
static java.lang.String jvm_version
           
 java.util.Properties languageProperties
           
static boolean loadDocumentImagesInASeparateThread_
           
static boolean mergingCells
           
protected  javax.swing.JButton newFileButton
           
protected  javax.swing.JButton openFileButton
           
static int PASTE_FILTERED_FORMATTED_TEXT
           
static int PASTE_FORMATTED__TEXT
           
static int PASTE_FORMATTED_PARAGRAPHS_WITHOUT_STYLE
           
static int PASTE_PLAIN_TEXT
           
protected  javax.swing.JButton pdfExportButton
           
protected  javax.swing.JButton printFileButton
           
 boolean printingHost
           
protected  javax.swing.JButton printPreviewButton
           
protected  javax.swing.JToolBar.Separator printToolbarSeparator
           
protected  javax.swing.JButton reloadButton
           
protected  javax.swing.JButton saveFileButton
           
static java.util.Hashtable statementsDecoding
           
protected  javax.swing.JButton zoominTextButton
           
protected  javax.swing.JButton zoomoutTextButton
           
 
Fields inherited from class javax.swing.JRootPane
COLOR_CHOOSER_DIALOG, contentPane, defaultButton, defaultPressAction, defaultReleaseAction, ERROR_DIALOG, FILE_CHOOSER_DIALOG, FRAME, glassPane, INFORMATION_DIALOG, layeredPane, NONE, PLAIN_DIALOG, QUESTION_DIALOG, WARNING_DIALOG
 
Fields inherited from class javax.swing.JComponent
accessibleContext, listenerList, TOOL_TIP_TEXT_KEY, ui, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOW
 
Fields inherited from class java.awt.Component
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT
 
Fields inherited from interface java.awt.image.ImageObserver
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH
 
Constructor Summary
HTMLBrowser()
          This is the default constructor.
HTMLBrowser(boolean toolbarsVisible, boolean mainMenuVisible, boolean statusbarVisible, boolean popupMenuVisible)
          This constructor allows a full customization of the external look of the browser such as enabling or not the menu, toolbar, popupmenu etc.
 
Method Summary
 void actionPerformed(java.awt.event.ActionEvent actionEvent)
          This method receives all events from the toolbar and the popup menus and carries out the entire work of the dispatching of the action commands.
 void addDocumentListener(javax.swing.event.DocumentListener listener)
          This method allows HyperlinkListener to be removed from the browser.
 void addFormElementsKeyListener(java.awt.event.KeyListener listener)
          This method is could be used to attach listeners to HTML Form elements such as buttons, lists and drop down menus.
 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 addHyperlinkListener(javax.swing.event.HyperlinkListener listener)
          This method allows HyperlinkListener to be added directly to the browser.
 void addNotify()
           
 void addPropertyChangeListener(java.beans.PropertyChangeListener listener)
           
 void adjustClipboardContextEntry(java.awt.datatransfer.Clipboard clipboard)
           
protected  void adjustMenuElementsForEvent(java.awt.event.MouseEvent e)
          Adjusts the popup menu on the basis of the element over which is positioned the caret.
protected  void adjustPopupForElement()
          Adjusts the popup menu on the basis of the element over which is positioned the caret.
 void appendContent(java.lang.String content)
           
 void appendContentToContentBuffer(java.lang.String content)
          Appends new string to existing content buffer.
 void applyStyleClass(java.lang.String styleClass)
          Applies style class to the selection.
 void caretUpdate(javax.swing.event.CaretEvent e)
          Folows the caret position changes and modifies the selection for tables etc.
 void changedUpdate(javax.swing.event.DocumentEvent documentEvent)
           
 void clearActionReferences()
           
 void closeBufferAndInsert()
          Closes the existing content buffer and inserts its content inside the browser.
 void componentAdded(java.awt.event.ContainerEvent containerEvent)
           
 void componentRemoved(java.awt.event.ContainerEvent containerEvent)
           
 java.lang.String convertFromHTMLtoXHTML(java.lang.String content)
           
 java.lang.String convertFromXHTMLtoHTML(java.lang.String line)
          Converts XHTML content to HTML content
 java.awt.Color convertStringToColor(java.lang.String string)
          Utility method to execute color conversion
protected  void copyFormattedTextToClipboard()
          Copies the selection to the clipboard
protected  void copyPlainTextToClipboard()
          Copies the selection as plain text to the clipboard
 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.
 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 decodeLineForCurrentCharset(java.lang.String initialBuffer)
          Decodes given text to the current document charset.
 void dragEnter(java.awt.dnd.DropTargetDragEvent dropTargetDragEvent)
           
 void dragExit(java.awt.dnd.DropTargetEvent dropTargetEvent)
           
 void dragOver(java.awt.dnd.DropTargetDragEvent dropTargetDragEvent)
           
 void drop(java.awt.dnd.DropTargetDropEvent dropTargetDropEvent)
           
 void dropActionChanged(java.awt.dnd.DropTargetDragEvent dropTargetDragEvent)
           
 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 dumpCurrentListElementContent()
           
 java.lang.String dumpDocElement(javax.swing.text.Element elem)
          Returns the entire content of the element as HTML string.
 java.lang.String dumpDocumentPortion(int start, int end)
          Returns as HTML String the document portion.
 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 dumpElementContent(javax.swing.text.Element elem, int startPosition)
          Returns the content of the element as HTML string without the tags of the passed element.
 java.lang.String dumpElementContent(javax.swing.text.Element elem, int startPosition, int endPosition)
           
 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()
           
 java.lang.String dumpSelectedDocumentPortion()
          Returns as HTML String the selected document portion.
 java.lang.String dumpSelectedDocumentPortion(int start, int end)
           
 java.lang.String dumpSelectedElementContent(javax.swing.text.Element elem)
           
 java.lang.String encodeLineForCurrentCharset(java.lang.String initialBuffer)
          Encodes the given text to the document encoding
 java.lang.String encodeToUnicodeChars(java.lang.String line)
          Encodes the given text to Unicode characters.
 boolean exportAsPDF(java.lang.String file)
           
protected  void finalize()
           
 void findCharacterEncoding(java.lang.String line)
          Discovers the document encoding of the document
 void findCharacterEncodingFromClipboard(java.lang.String line)
          Discovers the document encoding of the document
 java.lang.String findCharacterEncodingHTML5(java.lang.String line)
           
 java.net.URL getAbsoluteDocumentTranslationURL()
           
 HTMLBrowser getActiveHTMLBrowser()
          Returns the browser instance which owns the focus.
 HTMLBrowser getActiveHTMLBrowser(java.awt.event.ActionEvent e, HTMLBrowser.CustomTextAction textAct)
          Returns the browser instance which owns the focus.
 java.lang.String getAdditionalQueryParameters()
          Returns the additional query parameters to be used when sending the doucment via HTTP POST method
 javax.swing.text.AttributeSet getAttributesForComponent(java.awt.Component c, javax.swing.JEditorPane htmlEditor)
          Retruns the HTML attributes describing the componenent conained in a HTML Form in the browser specified as a parameter
protected  javax.swing.text.AttributeSet getAttributesForComponent(javax.swing.text.View rootView, java.awt.Component c)
          Retruns the HTML attributes describing the componenent conained in a HTML Form in the Root view specified as a parameter
 java.lang.String getBodyContent()
          Returns the content of the browser as a part of HTML document not entire page.
 java.lang.String getBodyContentAccessibleForScreenReaders()
          Gets the body content of the document as an HTML string intended for screen audio readers for visually impaired users.
 int getBodyContentLenght()
          Returns the lenght of the HTMLDocument in the browser - this will include all the HTML markup
 java.lang.String getBodyContentPortion(int offset, int length)
          Returns portion of the body 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 getBodyUnicodeContent()
          Returns portion of the body content as unicode chars.
 javax.swing.JPopupMenu getBrowserPopupMenu()
          Returns the popup menu that appears inside the browser.
static java.lang.String getBrowserVersion()
           
 java.lang.String getContent()
          Gets the entire content of the document as an HTML string.
 java.lang.String getContentAccessibleForScreenReaders()
          Gets the entire content of the document as an HTML string intended for screen audio readers for visually impaired users.
 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.
 java.awt.print.PageFormat getDefaultPageFormatForPDFExport()
           
 java.awt.print.PageFormat getDefaultPringPageFormat()
           
 java.awt.print.PrinterJob getDefaultPrinterJob()
           
 java.awt.print.PageFormat getDefaultPrintPageFormat()
           
 java.awt.Dimension getDefaultPrintPreviewDimension()
           
 java.lang.String getDocumentContentForSending(boolean entireFile)
          Returns the document content ready for saving remotely after paths conversion has been done.
 int getDocumentSizeLimit()
          Returns the maximum allowed document length if any has been set.
 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 getEquationEditorIntegrationEnabled()
           
 java.lang.String getExternalStyleSheetForPrint()
           
 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.
 int getFontRenderingZoom()
           
 java.lang.Class getHTMLEditorClass()
           
 BrowsableComponent getHyperlinkCustomBrowsableComponent()
           
 BrowsableComponent getImageCustomBrowsableComponent()
           
 java.lang.String getInternalCharset()
           
 javax.swing.JEditorPane getInternalJEditorPane()
          Returns the internal JEditorPane used for rendering and rendering in the visual browser.
 javax.swing.JScrollPane getInternalJScrollPane()
          Returns the internal JScrollPane used for containing the visual browser.
static java.lang.String getJVMVersion()
          Returns the Jave Runtime version currently in use.
 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 getLoadedStyleSheetRules()
          Returns the additional styles sheet rules loaded through loadStyleSheetRules method.
 HTMLBrowser.CustomStyleSheet getNewStyleSheetInstance()
           
 java.awt.print.PageFormat getPageLayoutView()
           
 java.lang.String getPDFExportOutputEncoding()
           
 java.lang.String getPlainText()
          Gets the entire content of the document as an plain text string.
 int getPreferredDropOperation()
          Returns the preferred drop operation to be used by the browser.
 int getPreferredPasteOperation()
          Returns the preferred paste operation to be used by the browser.
 java.lang.String getPrintFirstPageHeader()
           
 java.lang.String getPrintFooter()
           
 java.lang.String getPrintHeader()
           
 java.lang.String getPrintPageNumber()
           
 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 getRemovedMenus()
          Returns the menus removed previously from the browser.
 java.lang.String getRemovedToolbarItems()
          Returns the previously removed toolbar items.
 boolean getSaveEntireDocumentTree()
          Returns whether the entire document tree should be saved upon saving.
 javax.swing.JEditorPane getSelectedEditorComponent()
           
 javax.swing.JEditorPane getSelectedHTMLComponent()
           
 javax.swing.text.Element getSelectedImageElement()
           
 java.lang.String getSelectedPlainText()
          Returns the selected content as plain text
static 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 Shared icon names are as follows: table-insert, insert-image, undo, redo, spellchecker, hyperlink, font-properties, increase-indent, decrease-indent, font-foreground, copy-to-clipboard, paste-from-clipboard, cut-to-clipboard, font-bold, font-italic, font-underline, left-justify, center-justify, right-justify, insert-ordered-list, insert-unordered-list, file-open, file-save, file-new, file-print, delete-cells, merge-cells, split-cells, form, text-field, text-area, check-box, radio-button, push-button, list
 javax.swing.JToolBar getShortcutsToolBar()
          Returns the toolbar that contains all the shortcut buttons for open, save etc.
 javax.swing.JPopupMenu getSourceEditorPopupMenu()
          Returns the source browser popup menu.
 java.lang.String getTranslatedString(java.lang.String stringToTranslate)
          Returns the translation of given string using the preloaded translation keys.
 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.
protected  javax.swing.text.View getViewForElement_(javax.swing.text.Element elem)
           
protected  javax.swing.text.View getViewForElement_(javax.swing.text.View rootView, javax.swing.text.Element elem)
           
protected  javax.swing.text.View getViewForElement(javax.swing.text.Element elem)
           
protected  javax.swing.text.View getViewForElement(javax.swing.text.View rootView, javax.swing.text.Element elem)
           
 void hyperlinkUpdate(javax.swing.event.HyperlinkEvent hyperlinkevent)
          Allows implementing of hyperlink evetns.
 int indexOfView(javax.swing.text.View v)
           
protected  void initBaseActions()
           
protected  void initContainers()
           
 void initKeyStrokes()
           
 void initLookAndFeel()
           
protected  void initMainPanel()
           
protected  void initMenu()
           
protected  void initPopupMenu()
           
protected  void initStatusBar()
           
 void initStyleClassesToolbar()
           
protected  void initTableToolbar()
           
protected  void initToolbar()
           
 void insertContent_(java.lang.String content)
          Will insert the specified HTML content at the caret position
 void insertContent(java.lang.String htmlContent)
           
 void insertUpdate(javax.swing.event.DocumentEvent documentEvent)
           
 void inspect()
           
protected  void internalInit()
          Used to create all internal structure of the browser
 boolean isBrowsingInPreviewEnabled()
          Returns whether the browsing in the preview section is activated.
 boolean isDirectPrint()
           
 boolean isDisableImageCaching()
          Returns the status of image caching disabling- if true the images are reloaded always from the source.
 boolean isDocumentEdited()
          Returns whether the browser has been changed or not.
 boolean isDocumentLenghtLimitIsForPlainText()
          Retrieves whether the document length limit is set to be verified against the plain text of the content only.
 boolean isDontConvertCharacters()
           
 boolean isDontLoadDocumentImages()
           
protected  boolean isDragPossible(java.awt.event.MouseEvent e)
           
 boolean isEditorTransparent()
          Returns is the browser has been set to be transparent or not.
 boolean isEmbedAllTTFFontsForPDFExport()
           
 boolean isEnabled()
           
 boolean isEquationEditorIntegrationEnabled()
           
 boolean isFastEditForLargeTextFiles()
           
static boolean isForcedCSSGeneration()
          If set to true this will force the editor to generate style definitions rather than html tags where possible.
static boolean isForcedFontTagGeneration()
          Returns true if the editor is forced to generate font tags rather than span tags.
static boolean isForcedSpanGeneration()
          Returns true if the editor is forced to generate span tags rather than font tags.
 boolean isLoadDocumentImagesInASeparateThread()
           
 boolean isLoadLocalImagesAlways()
           
 boolean isLocalFileBrowsingDisabled()
          Returns whether the local file browsing is enabled
 boolean isMainMenuVisible()
          Returns true/false if the main menu (File, Eddit, View etc.) is visible and active or not on the browser.
 boolean isPDFExportEnabled()
           
 boolean isPopupMenuVisible()
          Returns true/false if the popup menu is visible and active or not on the browser.
 boolean isPrintingCancelled()
           
 boolean isPrintingHost()
           
 boolean isQuickPrint()
           
static boolean isRenderInvisibleContent()
          Returns if rendering of the HTML content of the edtor even if tbhe editor is not visible and not added to a container is enabled.
 boolean isResampleImagesBeforeBase64Encoding()
          Returns if the automatic resize of the images is set or not.
 boolean isShowParagraphsEnabled()
          Method for showing the paragraph marks.
 boolean isStatusBarVisible()
          Returns true/false if the status bar is visible and active or not on the browser.
 boolean isToolBarVisible()
          Returns true/false if the toolbar is visible and active or not on the browser.
 boolean isTransferFocusOnTAB()
           
 boolean isXMLMode()
          Returns whether the browser will run in XML detection mode.
 void itemStateChanged(java.awt.event.ItemEvent itemEvent)
           
 void keyPressed(java.awt.event.KeyEvent keyEvent)
           
 void keyReleased(java.awt.event.KeyEvent keyEvent)
           
 void keyTyped(java.awt.event.KeyEvent keyEvent)
           
 void linkActivated(java.net.URL location)
          This will be executed when the user clicks on hyperlink when the browsing in the preview is enabled.
 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 loadIcons()
          Loads all icons necessary for the toolbars and the menu items.
 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 loadStyleSheetRules(java.lang.String styleSheet)
          Allows to load some style rules dynamically like for example body{background-color:red} etc.
 void manageTabKeyInternally(java.awt.event.KeyEvent keyEvent)
           
 boolean matchNameAttribute(javax.swing.text.Element elem, javax.swing.text.html.HTML.Tag tag)
          Returns if the name of the given element is equal to the given tag or not.
 void mouseClicked(java.awt.event.MouseEvent e)
           
 void mouseDragged(java.awt.event.MouseEvent e)
           
 void mouseEntered(java.awt.event.MouseEvent e)
           
 void mouseExited(java.awt.event.MouseEvent e)
           
 void mouseMoved(java.awt.event.MouseEvent mouseEvent)
           
 void mousePressed(java.awt.event.MouseEvent e)
           
 void mouseReleased(java.awt.event.MouseEvent e)
           
 void newEditorWindow()
          Invoked when is pressed the New Window menu item in the Window menu.
protected  void notifyListeners(javax.swing.event.DocumentEvent documentEvent, javax.swing.event.DocumentEvent.EventType eventType)
           
protected  void notifyListeners(java.awt.event.KeyEvent keyEvent)
           
protected  void notifyListeners(java.awt.event.MouseEvent mouseEvent)
           
 void openContentBuffer()
          Ooens the new content buffer for inserting content inside the browser.
 void openDocxFile(java.io.File file)
          Opens MS Word .docx file silently and imports it into the editor for rendering
 void openDocxFile(java.net.URL file)
           
 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 rendering
 void openLocation(java.lang.String location)
          Shows the open location dialog and opens the remote location
 void openLocation(java.net.URL location)
          Opens silently the URL passed, as HTML document for rendering
 void openRTFFile(java.io.InputStream is)
          Opens silently the InputStream passed, as RTF document for rendering
 void openRTFFile(java.net.URL file)
          Opens silently the URL passed, as RTF document for rendering
 void postActivated(java.net.URL location, java.lang.String postData)
           
 void postToLocation(java.net.URL location, java.lang.String postData)
           
 void printFile()
          Shows the print dialog and prints out the edited document
 void printPreview()
          Shows the print dialog and prints out the edited document
 void refreshAdapters()
           
 void removeDocumentListener(javax.swing.event.DocumentListener listener)
          Removes a document listener from the browser.
 void removeFormElementsKeyListener(java.awt.event.KeyListener listener)
          Will remove a listener which delivers events from the form components
 void removeFormElementsMouseListener(java.awt.event.MouseListener listener)
          Will remove a listener which delivers events from the form components
 void removeHyperlinkListener(javax.swing.event.HyperlinkListener listener)
          Removes a document listener from the browser.
 void removeKeyStrokes()
           
 void removeNotify()
           
 void removePopupMenuItems(java.lang.String menuItemNames)
           
 void removePropertyChangeListener(java.beans.PropertyChangeListener listener)
           
 void removeUpdate(javax.swing.event.DocumentEvent documentEvent)
           
 void resetDocumentEdited()
          Resets the docuemnt edited state - this will set document edited to false.
 void resetDocumentLenghtLimit()
          Removes previously imposed document lenght restriction.
 void resetDocxPageData()
           
 void resetPrintingCancelled()
           
 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 saveFile(java.io.File toSaveFile)
          Saves the cotnent of the browser into a file silently - note that this may update the document base of the cotent to the file.
 void saveToLocation(java.lang.String saveLocation, boolean entireFile)
          Sends the document content to given URL.
 void selectAll()
           
 void sendWebDAVFile(java.lang.String fileName)
           
 void setAbsoluteDocumentTranslationURL(java.net.URL url)
           
 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 setBrowsingInPreviewEnabled(boolean enabled)
          Enables browsing in the preview section.
 void setContent_(java.lang.String htmlContent)
          This method creates dynamically new document and inserts the given HTML String as new document content.
 void setContent(java.lang.String htmlContent)
           
 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 setDefaultPageFormatForPDFExport(java.awt.print.PageFormat pageFormat)
          Sets the default PageFormat to be used by the PDFExport when available.
 void setDefaultPrinterJob(java.awt.print.PrinterJob printerJob)
           
 void setDefaultPrintPageFormat(java.awt.print.PageFormat pageFormat)
           
 void setDefaultPrintPreviewDimension(java.awt.Dimension defaultPagePreviewDimension)
          Specifies the default size for the print preview dialog - if not specified it will be set by default to 80% of the screen size
 void setDirectPrint(boolean directPrint_)
          Indicates if a Printer dialog should be shown upon printing or not.
 void setDisableImageCaching(boolean imageCachingDisabled)
          Sets the status of image caching disabling - if true the images are reloaded always from the source.
 void setDisableIndentingAndLineBreaks(boolean _disableIndentingAndLineBreaks)
          Disables/ enables the indenting and line breaks when generating the document content as html.
 void setDocumentLenghtLimit(int limit, java.lang.String warningMessage)
          Sets the maximum allowed document length if any has been set.
 void setDocumentLenghtLimitIsForPlainText(boolean limitForPlainText)
          Sets the document length limit to be verified against the plain text of the content only.
 void setDontConvertCharacters(boolean convert)
           
 void setDontLoadDocumentImages(boolean loadImages)
           
 void setEditorTransparent(boolean editorTransparent)
          This will cause the visual browser to become completely transparent.
 void setEmbedAllTTFFontsForPDFExport(boolean embed)
          Sets whether TTF font files should be embedded inside the generated PDF file or not.
 void setEnabled(boolean enabled)
           
 void setEquationEditorIntegrationEnabled(boolean enabled)
          Enables the Sferyx Equation browser within the HTMLBrowser which will allow rendering of equations.
 void setEquationEditorIntegrationEnabled(int mode)
           
 void setExternalStyleSheetForPrint(java.lang.String externalStyleSheetLocation)
          Loads external style sheet for printing specified by the given URL.
 void setExternalStyleSheetLocation(java.lang.String externalStyleSheetLocation)
          Sets the external style sheet to be loaded and used for rendering and rendering of the document.
 void setFastEditForLargeTextFiles(boolean enabled)
           
 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.
static void setForcedCSSGeneration(boolean cssgen_)
          Specifies wether should be forced the inline CSS generation - if set to true then all the inline style definitions as
...
static void setForcedFontTagGeneration(boolean genFont)
          This will force the editor to generate font tags rather than span tags.
static void setForcedSpanGeneration(boolean genSpan)
          This will force the editor to generate span rather than font tags.
 void setGenerateUniqueImageFilenames(boolean generateUniqueImageFilenames_)
           
 void setHyperlinkCustomBrowsableComponent(BrowsableComponent browsable)
           
 void setImageCustomBrowsableComponent(BrowsableComponent browsable)
           
 void setInnerHTML(javax.swing.text.Element elem, java.lang.String htmlContent)
           
 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 setLoadDocumentImagesInASeparateThread(boolean loadImagesSeparately)
           
 void setLoadLocalImagesAlways(boolean loadImages)
          Specifies to load always the local images in the document even if setDontLoadDocumentImages is set to true
 void setLocalFileBrowsingDisabled(boolean disabled)
          This method will enable/disable the local file dialog when needed.
 void setMainMenuVisible(boolean visible)
          Sets the main menu of the browser (File, Edit ...) visible and active or not.
 void setPDFExportEnabled(boolean enabled)
           
 void setPDFExportOutputEncoding(java.lang.String encoding)
           
 void setPlainText_(java.lang.String content)
           
 void setPlainText(java.lang.String content)
           
 void setPopupMenuVisible(boolean visible)
          Sets the popup menu of the browser visible and active or not.
 void setPreferredDropOperation(int preferredDropOperation)
          Sets the preferred drop operation to be used by the browser.
 void setPreferredPasteOperation(int preferredPasteOperation)
          Sets the preferred paste operation to be used by the browser.
 void setPreserveComments(java.lang.String _preserveComments)
          This will previent the user from deleting hidden comments into the document
 void setPrintFirstPageHeader(java.lang.String header)
          Allows to be specified the header for the first page to be shown on the Print preview and when printing.
 void setPrintFooter(java.lang.String footer)
          Allows to be specified the footers to be shown on the Print preview and when printing.
 void setPrintHeader(java.lang.String header)
          Allows to be specified the headers to be shown on the Print preview and when printing.
 void setPrintingHost(boolean printingHost)
           
 void setPrintPageNumber(java.lang.String pageNumber)
          Allows to be specified the page numbers to be shown on the Print preview and when printing.
 void setPublishContentUsingWebDAV(boolean publishContentUsingWebDAV_)
           
 void setQuickPrint(boolean quickPrint_)
          Indicates if a Page dialog should be shown upon printing or not.
 void setRemovedMenuItems(java.lang.String menuItemNames)
          setRemovedMenuItems("openLocationMenuItem, printFileMenuItem, closeFileMenuItem,...") - Indicates which menu items should be removed from the menus.
 void setRemovedMenus(java.lang.String menuItemNames)
          setRemovedMenus("menuTools, menuHelp,..") - Indicates which menus should be removed from the main menu bar.
 void setRemovedPopupMenuItems(java.lang.String removedItems)
          Disbales/enables the specified items from the visual browser popup menu.
 void setRemovedToolbarItems(java.lang.String toolbarItemNames)
          setRemovedToolbarItems("fontUnderlineButton,fontItalicButton,alignRightButton,fontsList,...") - Indicates which toolbar items should be removed from the tool bars.
static void setRenderInvisibleContent(boolean render)
          Will force the rendering of the HTML content of the edtor even if tbhe editor is not visible and not added to a container.
 void setResampleImagesBeforeBase64Encoding(boolean resample)
          Specifies to whether resize the images automatically to their in-document size before encoding them to Base64 encoding when setEmbedAllImagesInsideTheDocument is true or keep the original image size - this can reduce the size of the document significantly.
 void setSaveEntireDocumentTree(boolean saveEntrireDocTree)
          Sets whether the entire document tree should be saved upon saving.
static 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 Shared icon names are as follows: table-insert, insert-image, undo, redo, spellchecker, hyperlink, font-properties, increase-indent, decrease-indent, font-foreground, copy-to-clipboard, paste-from-clipboard, cut-to-clipboard, font-bold, font-italic, font-underline, left-justify, center-justify, right-justify, insert-ordered-list, insert-unordered-list, file-open, file-save, file-new, file-print, delete-cells, merge-cells, split-cells, form, text-field, text-area, check-box, radio-button, push-button, list
 void setShortcutToolbarVisible(boolean visible)
          Will show/hide the shoprtcuts toolbar - to be used when only one part of the toolbar needs to be disabled.
 void setShowHiddenToolbarItems(java.lang.String toolbarItemNames)
           
 void setSmartWordContentHanldingEnabled(boolean active)
          Indicates whether should be enable the paste filter or not.
 void setStatusBarVisible(boolean visible)
          Sets the status bar section of the browser visible and active or not.
 void setStatusMessage(java.lang.String message)
          Sets the given message to the status bar of the HTMLBrowser.
 void setToolBarVisible(boolean visible)
          Sets the toolbar section of the browser visible and active or not.
 void setTransferFocusOnTAB(boolean transfer)
           
 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 setWordWrapMode(boolean active)
           
 void setXMLMode(boolean xmlMode)
          This will enable the browser to build automatically its own XML grammar for handling XML/XHTML documents.
 void showAboutDialog()
          Invoked when is pressed the About menu item in the Help menu.
 void start()
          This will force the browser to generate span rather than font tags.
 void stateChanged(javax.swing.event.ChangeEvent event)
          Event handler for the changes of the main tab pane selection.
 void translateContainer(java.awt.Container container)
           
 void translateLanguageForComponent(java.awt.Component component)
           
 void translateMenu(javax.swing.JMenu menu)
           
 void translatePopupMenu(javax.swing.JPopupMenu popupMenu)
           
 void translateTabbedPane(javax.swing.JTabbedPane tabbedPane)
           
 void updateEditedDocument()
           
 void updateEditedDocument(java.lang.String text)
          Updates the document structure when significant change has been made such as table size/backgound not reflected by the default rendering.
 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.
 void writeMultipartContentToStream(java.io.OutputStream os, boolean entireFile)
           
 
Methods inherited from class javax.swing.JRootPane
addImpl, createContentPane, createGlassPane, createLayeredPane, createRootLayout, getAccessibleContext, getContentPane, getDefaultButton, getGlassPane, getJMenuBar, getLayeredPane, getMenuBar, getUI, getUIClassID, getWindowDecorationStyle, isOptimizedDrawingEnabled, isValidateRoot, paramString, setContentPane, setDefaultButton, setDoubleBuffered, setGlassPane, setJMenuBar, setLayeredPane, setMenuBar, setUI, setWindowDecorationStyle, updateUI
 
Methods inherited from class javax.swing.JComponent
addAncestorListener, addVetoableChangeListener, computeVisibleRect, contains, createToolTip, disable, enable, firePropertyChange, firePropertyChange, firePropertyChange, fireVetoableChange, getActionForKeyStroke, getActionMap, getAlignmentX, getAlignmentY, getAncestorListeners, getAutoscrolls, getBaseline, getBaselineResizeBehavior, getBorder, getBounds, getClientProperty, getComponentGraphics, getComponentPopupMenu, getConditionForKeyStroke, getDebugGraphicsOptions, getDefaultLocale, getFontMetrics, getGraphics, getHeight, getInheritsPopupMenu, getInputMap, getInputMap, getInputVerifier, getInsets, getInsets, getListeners, getLocation, getMaximumSize, getMinimumSize, getNextFocusableComponent, getPopupLocation, getPreferredSize, getRegisteredKeyStrokes, getRootPane, getSize, getToolTipLocation, getToolTipText, getToolTipText, getTopLevelAncestor, getTransferHandler, getVerifyInputWhenFocusTarget, getVetoableChangeListeners, getVisibleRect, getWidth, getX, getY, grabFocus, isDoubleBuffered, isLightweightComponent, isManagingFocus, isOpaque, isPaintingForPrint, isPaintingTile, isRequestFocusEnabled, paint, paintBorder, paintChildren, paintComponent, paintImmediately, paintImmediately, print, printAll, printBorder, printChildren, printComponent, processComponentKeyEvent, processKeyBinding, processKeyEvent, processMouseEvent, processMouseMotionEvent, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removeVetoableChangeListener, repaint, repaint, requestDefaultFocus, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, resetKeyboardActions, reshape, revalidate, scrollRectToVisible, setActionMap, setAlignmentX, setAlignmentY, setAutoscrolls, setBackground, setBorder, setComponentPopupMenu, setDebugGraphicsOptions, setDefaultLocale, setFocusTraversalKeys, setFont, setForeground, setInheritsPopupMenu, setInputMap, setInputVerifier, setMaximumSize, setMinimumSize, setNextFocusableComponent, setOpaque, setPreferredSize, setRequestFocusEnabled, setToolTipText, setTransferHandler, setUI, setVerifyInputWhenFocusTarget, setVisible, unregisterKeyboardAction, update
 
Methods inherited from class java.awt.Container
add, add, add, add, add, addContainerListener, addPropertyChangeListener, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getComponentZOrder, getContainerListeners, getFocusTraversalKeys, getFocusTraversalPolicy, getLayout, getMousePosition, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusCycleRoot, isFocusTraversalPolicyProvider, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paintComponents, preferredSize, printComponents, processContainerEvent, processEvent, remove, remove, removeAll, removeContainerListener, setComponentZOrder, setFocusCycleRoot, setFocusTraversalPolicy, setFocusTraversalPolicyProvider, setLayout, transferFocusBackward, transferFocusDownCycle, validate, validateTree
 
Methods inherited from class java.awt.Component
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, bounds, checkImage, checkImage, coalesceEvents, contains, createImage, createImage, createVolatileImage, createVolatileImage, disableEvents, dispatchEvent, enable, enableEvents, enableInputMethods, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getBackground, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusCycleRootAncestor, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getForeground, getGraphicsConfiguration, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputContext, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocale, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMousePosition, getMouseWheelListeners, getName, getParent, getPeer, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getToolkit, getTreeLock, gotFocus, handleEvent, hasFocus, hide, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isFocusable, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isMaximumSizeSet, isMinimumSizeSet, isPreferredSizeSet, isShowing, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, postEvent, prepareImage, prepareImage, processComponentEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processMouseWheelEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removePropertyChangeListener, repaint, repaint, repaint, resize, resize, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setFocusable, setFocusTraversalKeysEnabled, setIgnoreRepaint, setLocale, setLocation, setLocation, setName, setSize, setSize, show, show, size, toString, transferFocus, transferFocusUpCycle
 
Methods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

newFileButton

protected javax.swing.JButton newFileButton

openFileButton

protected javax.swing.JButton openFileButton

saveFileButton

protected javax.swing.JButton saveFileButton

printFileButton

protected javax.swing.JButton printFileButton

printPreviewButton

protected javax.swing.JButton printPreviewButton

copyButton

protected javax.swing.JButton copyButton

zoomoutTextButton

protected javax.swing.JButton zoomoutTextButton

zoominTextButton

protected javax.swing.JButton zoominTextButton

pdfExportButton

protected javax.swing.JButton pdfExportButton

printToolbarSeparator

protected javax.swing.JToolBar.Separator printToolbarSeparator

backwardButton

protected javax.swing.JButton backwardButton

forwardButton

protected javax.swing.JButton forwardButton

reloadButton

protected javax.swing.JButton reloadButton

findTextButton

protected javax.swing.JButton findTextButton

isMac

public static boolean isMac

jvm_version

public static java.lang.String jvm_version

DROP_FORMATTED__TEXT

public static final int DROP_FORMATTED__TEXT
See Also:
Constant Field Values

DROP_PLAIN_TEXT

public static final int DROP_PLAIN_TEXT
See Also:
Constant Field Values

generateFormattingOutsideCustomTags

public static boolean generateFormattingOutsideCustomTags

EQUATION_EDITOR_GENERATES_IMAGES

public static final int EQUATION_EDITOR_GENERATES_IMAGES
See Also:
Constant Field Values

EQUATION_EDITOR_GENERATES_MATHML

public static final int EQUATION_EDITOR_GENERATES_MATHML
See Also:
Constant Field Values

asynchronousLoadPriority

public int asynchronousLoadPriority

debug

public boolean debug

docxDefaultHeader

public java.lang.String docxDefaultHeader

docxDefaultFooter

public java.lang.String docxDefaultFooter

docxFirstPageHeader

public java.lang.String docxFirstPageHeader

docxFirstPageFooter

public java.lang.String docxFirstPageFooter

docxPageTopMargin

public float docxPageTopMargin

docxPageBottomMargin

public float docxPageBottomMargin

docxPageLeftMargin

public float docxPageLeftMargin

docxPageRightMargin

public float docxPageRightMargin

docxPageWidth

public float docxPageWidth

docxPageHeight

public float docxPageHeight

statementsDecoding

public static java.util.Hashtable statementsDecoding

languageProperties

public java.util.Properties languageProperties

disableButtonsUpdate

public boolean disableButtonsUpdate

highQualityImageScalingEnabled

public static boolean highQualityImageScalingEnabled

loadDocumentImagesInASeparateThread_

public static boolean loadDocumentImagesInASeparateThread_

insertEditableSpace

public static boolean insertEditableSpace

mergingCells

public static boolean mergingCells

adjustDPIScalingAlsoForMac

public static boolean adjustDPIScalingAlsoForMac

printingHost

public boolean printingHost

PASTE_FORMATTED__TEXT

public static final int PASTE_FORMATTED__TEXT
See Also:
Constant Field Values

PASTE_PLAIN_TEXT

public static final int PASTE_PLAIN_TEXT
See Also:
Constant Field Values

PASTE_FORMATTED_PARAGRAPHS_WITHOUT_STYLE

public static final int PASTE_FORMATTED_PARAGRAPHS_WITHOUT_STYLE
See Also:
Constant Field Values

PASTE_FILTERED_FORMATTED_TEXT

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

HTMLBrowser

public HTMLBrowser()
This is the default constructor. It creates an HtmlPanel which is a full featured browser with menu bar, toolbar, statusbar, popup menu and all the rendering features enabled


HTMLBrowser

public HTMLBrowser(boolean toolbarsVisible,
                   boolean mainMenuVisible,
                   boolean statusbarVisible,
                   boolean popupMenuVisible)
This constructor allows a full customization of the external look of the browser such as enabling or not the menu, toolbar, popupmenu etc. However in one second moment at runtime, all this features can be enabled or disabled using the appropriate methods such as

Method Detail

getJVMVersion

public static java.lang.String getJVMVersion()
Returns the Jave Runtime version currently in use. It it will be returned as String.


getBrowserVersion

public static java.lang.String getBrowserVersion()

setPreferredDropOperation

public void setPreferredDropOperation(int preferredDropOperation)
Sets the preferred drop operation to be used by the browser. Allowed values are: DROP_FORMATTED__TEXT=0; DROP_PLAIN_TEXT=1; This value can be retrieved through getPreferredDropOperation()


getPreferredDropOperation

public int getPreferredDropOperation()
Returns the preferred drop operation to be used by the browser. Allowed values are: DROP_FORMATTED__TEXT=0; DROP_PLAIN_TEXT=1; This value can be set through setPreferredDropOperation(int operation)


loadIcons

public void loadIcons()
Loads all icons necessary for the toolbars and the menu items. These are the icon names available: table-insert, insert-image, undo, redo, spellchecker, hyperlink, font-properties, increase-indent, decrease-indent, font-foreground, copy-to-clipboard, paste-from-clipboard, cut-to-clipboard, font-bold, font-italic, font-underline, left-justify, center-justify, right-justify, insert-ordered-list insert-unordered-list, file-open, file-save, file-new, file-print, delete-cells, merge-cells, split-cells, form, text-field, text-area, check-box, radio-button, push-button, list


setSharedIcon

public static 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 Shared icon names are as follows: table-insert, insert-image, undo, redo, spellchecker, hyperlink, font-properties, increase-indent, decrease-indent, font-foreground, copy-to-clipboard, paste-from-clipboard, cut-to-clipboard, font-bold, font-italic, font-underline, left-justify, center-justify, right-justify, insert-ordered-list, insert-unordered-list, file-open, file-save, file-new, file-print, delete-cells, merge-cells, split-cells, form, text-field, text-area, check-box, radio-button, push-button, list


getSharedIcon

public static 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 Shared icon names are as follows: table-insert, insert-image, undo, redo, spellchecker, hyperlink, font-properties, increase-indent, decrease-indent, font-foreground, copy-to-clipboard, paste-from-clipboard, cut-to-clipboard, font-bold, font-italic, font-underline, left-justify, center-justify, right-justify, insert-ordered-list, insert-unordered-list, file-open, file-save, file-new, file-print, delete-cells, merge-cells, split-cells, form, text-field, text-area, check-box, radio-button, push-button, list


getEditorIcon

public javax.swing.ImageIcon getEditorIcon(java.lang.String iconName)
Returns as ImageIcon one of the loaded images for the buttons and the menus by name.


getShortcutsToolBar

public javax.swing.JToolBar getShortcutsToolBar()
Returns the toolbar that contains all the shortcut buttons for open, save etc. This can be used for full customization of the toolbar.


getBrowserPopupMenu

public javax.swing.JPopupMenu getBrowserPopupMenu()
Returns the popup menu that appears inside the browser. This allows its full customiztion.


addPropertyChangeListener

public void addPropertyChangeListener(java.beans.PropertyChangeListener listener)
Overrides:
addPropertyChangeListener in class java.awt.Container

removePropertyChangeListener

public void removePropertyChangeListener(java.beans.PropertyChangeListener listener)
Overrides:
removePropertyChangeListener in class java.awt.Component

internalInit

protected void internalInit()
Used to create all internal structure of the browser


initLookAndFeel

public void initLookAndFeel()

initMainPanel

protected void initMainPanel()

initContainers

protected void initContainers()

initStatusBar

protected void initStatusBar()

initBaseActions

protected void initBaseActions()

getSourceEditorPopupMenu

public javax.swing.JPopupMenu getSourceEditorPopupMenu()
Returns the source browser popup menu. This can be used for customization purposes.


initPopupMenu

protected void initPopupMenu()

initToolbar

protected void initToolbar()

initTableToolbar

protected void initTableToolbar()

initStyleClassesToolbar

public void initStyleClassesToolbar()

applyStyleClass

public void applyStyleClass(java.lang.String styleClass)
Applies style class to the selection. This will work porperly if the style class exists in the style sheet which can be imported through loadExternalStyleSheet(String url) or specified within style tags.


setShortcutToolbarVisible

public void setShortcutToolbarVisible(boolean visible)
Will show/hide the shoprtcuts toolbar - to be used when only one part of the toolbar needs to be disabled.


isShowParagraphsEnabled

public boolean isShowParagraphsEnabled()
Method for showing the paragraph marks. This is used by the toolbar button reveal paragraphs.


setEnabled

public void setEnabled(boolean enabled)
Overrides:
setEnabled in class javax.swing.JComponent

isEnabled

public boolean isEnabled()
Overrides:
isEnabled in class java.awt.Component

isResampleImagesBeforeBase64Encoding

public boolean isResampleImagesBeforeBase64Encoding()
Returns if the automatic resize of the images is set or not. See setResampleImagesBeforeBase64Encoding for details.


setResampleImagesBeforeBase64Encoding

public void setResampleImagesBeforeBase64Encoding(boolean resample)
Specifies to whether resize the images automatically to their in-document size before encoding them to Base64 encoding when setEmbedAllImagesInsideTheDocument is true or keep the original image size - this can reduce the size of the document significantly.


setMainMenuVisible

public void setMainMenuVisible(boolean visible)
Sets the main menu of the browser (File, Edit ...) visible and active or not. It could be changed at runtime.


isMainMenuVisible

public boolean isMainMenuVisible()
Returns true/false if the main menu (File, Eddit, View etc.) is visible and active or not on the browser. This value can be changed at runtime.


setToolBarVisible

public void setToolBarVisible(boolean visible)
Sets the toolbar section of the browser visible and active or not. It could be changed at runtime.


isToolBarVisible

public boolean isToolBarVisible()
Returns true/false if the toolbar is visible and active or not on the browser. This value can be changed at runtime.


setStatusBarVisible

public void setStatusBarVisible(boolean visible)
Sets the status bar section of the browser visible and active or not. It could be changed at runtime.


isStatusBarVisible

public boolean isStatusBarVisible()
Returns true/false if the status bar is visible and active or not on the browser. This value can be changed at runtime.


setPopupMenuVisible

public void setPopupMenuVisible(boolean visible)
Sets the popup menu of the browser visible and active or not. It could be changed at runtime.


isPopupMenuVisible

public boolean isPopupMenuVisible()
Returns true/false if the popup menu is visible and active or not on the browser. This value can be changed at runtime.


getBodyContent

public java.lang.String getBodyContent()
Returns the content of the browser as a part of HTML document not entire page. This will return the content of the selected browser - visual or source code depending on the tab selection.


dumpDocElement

public java.lang.String dumpDocElement(javax.swing.text.Element elem)
Returns the entire content of the element as HTML string.


dumpElementContent

public java.lang.String dumpElementContent(javax.swing.text.Element elem,
                                           int startPosition)
Returns the content of the element as HTML string without the tags of the passed element.


dumpElementContent

public java.lang.String dumpElementContent(javax.swing.text.Element elem,
                                           int startPosition,
                                           int endPosition)

dumpElementContent

public 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.


dumpContentPortion

public java.lang.String dumpContentPortion(int start,
                                           int end)
Returns the selected portion of the document as formatted text skipping paragraphs tables etc. Only text attributes will be included


dumpSelectedContentPortion

public java.lang.String dumpSelectedContentPortion()

dumpDocumentPortion

public java.lang.String dumpDocumentPortion(int start,
                                            int end)
Returns as HTML String the document portion.


dumpSelectedDocumentPortion

public java.lang.String dumpSelectedDocumentPortion(int start,
                                                    int end)

dumpSelectedDocumentPortion

public java.lang.String dumpSelectedDocumentPortion()
Returns as HTML String the selected document portion.


dumpElementDocumentPortion

public java.lang.String dumpElementDocumentPortion(javax.swing.text.Element elem)
Returns as HTML String the document portion contained within a given element.


initMenu

protected void initMenu()

createMenuButton

public 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. Can be useful to extend the browser's toolbars with more shortcut buttons.


isLoadDocumentImagesInASeparateThread

public boolean isLoadDocumentImagesInASeparateThread()

setLoadDocumentImagesInASeparateThread

public void setLoadDocumentImagesInASeparateThread(boolean loadImagesSeparately)

isBrowsingInPreviewEnabled

public boolean isBrowsingInPreviewEnabled()
Returns whether the browsing in the preview section is activated. If yes, clicking on hyperlinks will result in loading the target page


setBrowsingInPreviewEnabled

public void setBrowsingInPreviewEnabled(boolean enabled)
Enables browsing in the preview section. If this is set to true the users will be able to click on the hyperlinks and change the page. See also setVisualEditorFollowsPreview(boolean follows)


hyperlinkUpdate

public void hyperlinkUpdate(javax.swing.event.HyperlinkEvent hyperlinkevent)
Allows implementing of hyperlink evetns. This will be enabled if browsingInPreviewEnabled(boolean enabled) is set to true.

Specified by:
hyperlinkUpdate in interface javax.swing.event.HyperlinkListener

postActivated

public void postActivated(java.net.URL location,
                          java.lang.String postData)

linkActivated

public void linkActivated(java.net.URL location)
This will be executed when the user clicks on hyperlink when the browsing in the preview is enabled.


setDontConvertCharacters

public void setDontConvertCharacters(boolean convert)

isDontConvertCharacters

public boolean isDontConvertCharacters()

stateChanged

public void stateChanged(javax.swing.event.ChangeEvent event)
Event handler for the changes of the main tab pane selection.

Specified by:
stateChanged in interface javax.swing.event.ChangeListener

getBodyUnicodeContent

public java.lang.String getBodyUnicodeContent()
Returns portion of the body content as unicode chars.


getUnicodeContent

public java.lang.String getUnicodeContent()
Returns the content of the browser as unicode string.


getInternalJEditorPane

public javax.swing.JEditorPane getInternalJEditorPane()
Returns the internal JEditorPane used for rendering and rendering in the visual browser. This allows full access to the standard swing API of this component


getInternalJScrollPane

public javax.swing.JScrollPane getInternalJScrollPane()
Returns the internal JScrollPane used for containing the visual browser. This allows full access to the standard swing API of this component


getSelectedPlainText

public java.lang.String getSelectedPlainText()
Returns the selected content as plain text


getPlainText

public java.lang.String getPlainText()
Gets the entire content of the document as an plain text string. Currently this will return plain text only for the visual browser.


getContentAccessibleForScreenReaders

public java.lang.String getContentAccessibleForScreenReaders()
Gets the entire content of the document as an HTML string intended for screen audio readers for visually impaired users.


getBodyContentAccessibleForScreenReaders

public java.lang.String getBodyContentAccessibleForScreenReaders()
Gets the body content of the document as an HTML string intended for screen audio readers for visually impaired users.


getSelectedHTMLComponent

public javax.swing.JEditorPane getSelectedHTMLComponent()

getContent

public java.lang.String getContent()
Gets the entire content of the document as an HTML string. This depends on the tab selection - it will return visual or source code browser content.


appendContent

public void appendContent(java.lang.String content)

setInnerHTML

public void setInnerHTML(javax.swing.text.Element elem,
                         java.lang.String htmlContent)

dropActionChanged

public void dropActionChanged(java.awt.dnd.DropTargetDragEvent dropTargetDragEvent)
Specified by:
dropActionChanged in interface java.awt.dnd.DropTargetListener

dragEnter

public void dragEnter(java.awt.dnd.DropTargetDragEvent dropTargetDragEvent)
Specified by:
dragEnter in interface java.awt.dnd.DropTargetListener

dragExit

public void dragExit(java.awt.dnd.DropTargetEvent dropTargetEvent)
Specified by:
dragExit in interface java.awt.dnd.DropTargetListener

dragOver

public void dragOver(java.awt.dnd.DropTargetDragEvent dropTargetDragEvent)
Specified by:
dragOver in interface java.awt.dnd.DropTargetListener

drop

public void drop(java.awt.dnd.DropTargetDropEvent dropTargetDropEvent)
Specified by:
drop in interface java.awt.dnd.DropTargetListener

insertContent

public void insertContent(java.lang.String htmlContent)

insertContent_

public void insertContent_(java.lang.String content)
Will insert the specified HTML content at the caret position


setPlainText_

public void setPlainText_(java.lang.String content)

setPlainText

public void setPlainText(java.lang.String content)

openContentBuffer

public void openContentBuffer()
Ooens the new content buffer for inserting content inside the browser. This should be used in conjuction with closeContentBufferAndInsert() and appendContentToContentBuffer(String content). This methods are very useful in environments where long content srings cannot be inserted at once due to some limitations as happens for example in Oracle Forms. See supplied examples in the users manual.


appendContentToContentBuffer

public void appendContentToContentBuffer(java.lang.String content)
Appends new string to existing content buffer. This should be used in conjuction with openContentBuffer() and closeBufferAndInsert(). This methods are very useful in environments where long content srings cannot be inserted at once due to some limitations as happens for example in Oracle Forms. See supplied examples in the users manual.


closeBufferAndInsert

public void closeBufferAndInsert()
Closes the existing content buffer and inserts its content inside the browser. This should be used in conjuction with openContentBuffer() and appendContentToContentBuffer(String content). This methods are very useful in environments where long content srings cannot be inserted at once due to some limitations as happens for example in Oracle Forms. See supplied examples in the users manual.


getBodyContentLenght

public int getBodyContentLenght()
Returns the lenght of the HTMLDocument in the browser - this will include all the HTML markup


getContentLenght

public int getContentLenght()
Returns the length of the content - it will include in the count also all the HTML markup


getBodyContentPortion

public java.lang.String getBodyContentPortion(int offset,
                                              int length)
Returns portion of the body 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. This should be used in conjuction with getBodyContentLength() and make cycle for retirieving all pieces through getBodyContentPortion(int start, in length)


getContentPortion

public 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. This should be used in conjuction with getContentLength() and make cycle for retirieving all pieces through getContentPortion(int start, in length)


setForcedSpanGeneration

public static void setForcedSpanGeneration(boolean genSpan)
This will force the editor to generate span rather than font tags.


isForcedSpanGeneration

public static boolean isForcedSpanGeneration()
Returns true if the editor is forced to generate span tags rather than font tags.


setForcedFontTagGeneration

public static void setForcedFontTagGeneration(boolean genFont)
This will force the editor to generate font tags rather than span tags.


isForcedFontTagGeneration

public static boolean isForcedFontTagGeneration()
Returns true if the editor is forced to generate font tags rather than span tags.


isForcedCSSGeneration

public static boolean isForcedCSSGeneration()
If set to true this will force the editor to generate style definitions rather than html tags where possible. Ex span will be generated insted of font.


setForcedCSSGeneration

public static void setForcedCSSGeneration(boolean cssgen_)
Specifies wether should be forced the inline CSS generation - if set to true then all the inline style definitions as
...
will be preserved. It is enabled by default.


setContent

public void setContent(java.lang.String htmlContent)

setContent_

public void setContent_(java.lang.String htmlContent)
This method creates dynamically new document and inserts the given HTML String as new document content. This method should be used when the browser and the parent frame are already visible to avoid inernal exceptions from the swing repaint manager.


setContentAsynchronously

public void setContentAsynchronously(java.lang.String htmlContent)
This method is used to sets the content of the browser without the synchronization locks. This should be used mainly when the browser is integrated in applications using JNI calls which need to be synchronized externally.


mouseClicked

public void mouseClicked(java.awt.event.MouseEvent e)
Specified by:
mouseClicked in interface java.awt.event.MouseListener

mouseEntered

public void mouseEntered(java.awt.event.MouseEvent e)
Specified by:
mouseEntered in interface java.awt.event.MouseListener

mouseExited

public void mouseExited(java.awt.event.MouseEvent e)
Specified by:
mouseExited in interface java.awt.event.MouseListener

mousePressed

public void mousePressed(java.awt.event.MouseEvent e)
Specified by:
mousePressed in interface java.awt.event.MouseListener

mouseReleased

public void mouseReleased(java.awt.event.MouseEvent e)
Specified by:
mouseReleased in interface java.awt.event.MouseListener

adjustMenuElementsForEvent

protected void adjustMenuElementsForEvent(java.awt.event.MouseEvent e)
Adjusts the popup menu on the basis of the element over which is positioned the caret. If it is a table adds the menu items for managing tables - insert row, split cells, table properties etc.


getSelectedEditorComponent

public javax.swing.JEditorPane getSelectedEditorComponent()

getSelectedImageElement

public javax.swing.text.Element getSelectedImageElement()

adjustPopupForElement

protected void adjustPopupForElement()
Adjusts the popup menu on the basis of the element over which is positioned the caret. If it is table adds the menu items for managing tables - insert row, split cells, table properties etc.


setRemovedPopupMenuItems

public void setRemovedPopupMenuItems(java.lang.String removedItems)
Disbales/enables the specified items from the visual browser popup menu. See the users manual for the item names


matchNameAttribute

public boolean matchNameAttribute(javax.swing.text.Element elem,
                                  javax.swing.text.html.HTML.Tag tag)
Returns if the name of the given element is equal to the given tag or not.


getViewForElement

protected javax.swing.text.View getViewForElement(javax.swing.text.Element elem)

getViewForElement

protected javax.swing.text.View getViewForElement(javax.swing.text.View rootView,
                                                  javax.swing.text.Element elem)

getViewForElement_

protected javax.swing.text.View getViewForElement_(javax.swing.text.Element elem)

getViewForElement_

protected javax.swing.text.View getViewForElement_(javax.swing.text.View rootView,
                                                   javax.swing.text.Element elem)

mouseMoved

public void mouseMoved(java.awt.event.MouseEvent mouseEvent)
Specified by:
mouseMoved in interface java.awt.event.MouseMotionListener

mouseDragged

public void mouseDragged(java.awt.event.MouseEvent e)
Specified by:
mouseDragged in interface java.awt.event.MouseMotionListener

isDragPossible

protected boolean isDragPossible(java.awt.event.MouseEvent e)

selectAll

public void selectAll()

exportAsPDF

public boolean exportAsPDF(java.lang.String file)

actionPerformed

public void actionPerformed(java.awt.event.ActionEvent actionEvent)
This method receives all events from the toolbar and the popup menus and carries out the entire work of the dispatching of the action commands. This means that overriding this method by subclasses can be customized the actions handling or add new action commands etc.
"increase-indent" - increases the indent of the paragraph at the caret position
"decrease-indent" - decreases the indent of the paragraph at the caret position
"picture-properties" - shows the picture properties dialog box which allows change of the picture parameters at the caret position or does nothing if there is no picture.
"imagebutton-properties" - shows the image button form field properties dialog box which allows change of its parameters or does nothing if there is no image button.
"page-properties" - shows the page properties dialog box which allows change of the page parameters such as title, background etc.
"table-select" - selects the table at the caret position or does nothing if there is no table.
"table-row-select" - selects the table row at the caret position or does nothing if there is no table.
"design-table" - shows the design table popup of the toolbar.
"table-insert-row" - inserts new table row in the table at the caret position or does nothing if there is no table
"table-insert-column" - inserts new table column in the table at the caret position or does nothing if there is no table
"table-insert" - shows the insert table dialog which allows the selection of the number of rows and columns and inserts new table
"start-spellchecker" - starts the spellchecker and begins the check of the document.
"selectall-action" - selects the entire document.
"find-action" - shows the find/search dialog.
"replace-action" - shows the find/replace dialog.
"table-properties" - shows the table properties dialog which allows the customization of the table at the caret position or does nothing if there is no table
"cell-properties" - shows the table cell properties dialog which allows the customization of the selected table cells or does nothing if there is no table cells selected
"table-cell-merge" - merges the selected table cells and.
"table-cell-split" - splits the cell at the caret position into two cells horizontally.
"hyperlink-properties" - shows the hyperlink properties dialog and modifies or inserts new hyperlink on the selected text
"form-properties" - shows the form properties dialog for the form at the caret position or does nothing if there is no form.
"button-properties" - shows the button form field properties dialog for the form at the caret position or does nothing if there is no button form field.
"radiobutton-properties" - shows the radio button form field properties dialog for the form at the caret position or does nothing if there is no radio button form field.
"checkbox-properties" - shows the checkbox form field properties dialog for the form at the caret position or does nothing if there is no checkbox form field.
"textfield-properties" - shows the textfield form field properties dialog for the form at the caret position or does nothing if there is no textfield form field.
"textarea-properties" - shows the textarea form field properties dialog for the form at the caret position or does nothing if there is no textarea form field.
"selectfield-properties" - shows the select(dropdown menu or list) form field properties dialog for the form at the caret position or does nothing if there is no select(dropdown menu or list) form field.
"font-foreground" - sets the selected text's font foreground color visualizing the ColorChooser
"font-family" - sets the selected text's font family from the combobox on the toolbar
"font-size" - sets the font size
"insert-textfield" - inserts new textfield form field. If there is no form at the current caret position, creates new one.
"insert-textarea" - inserts new textarea form field. If there is no form at the current caret position, creates new one.
"insert-checkbox" - inserts new checkbox form field. If there is no form at the current caret position, creates new one.
"insert-radiobutton" - inserts new radiobutton form field. If there is no form at the current caret position, creates new one.
"insert-pushbutton" - inserts new pushbutton form field. If there is no form at the current caret position, creates new one.
"insert-select" - inserts new select (dropdown menu/list) form field. If there is no form at the current caret position, creates new one.
"insert-imagebutton" - inserts new imagebutton form field visualizing the file dialog to select the image URL. If there is no form at the current caret position, creates new one.
"insert-hr" - inserts new horizontal line
at the caret position.
"insert-br" - inserts line break
at the caret position.
"insert-p" - inserts new paragraph at the caret position.
"insert-space" - inserts white space at the caret position.
"insert-image" - inserts new image at the caret position, visualizing the file dialog.
"font-properties" - shows the font properties dialog.
"file-print" - shows the print dialog and prints out the current page.
"file-save" - saves the current page, visualizing the file dialog.
"file-open" - opens a new file showing the file dialog.
"location-open" - opens a new file (URL) showing open location dialog.
"file-new" - creates new empty file.
"file-exit" - exits from the browser, using System.exit() asking to save the changes
"help-about" - exits from the browser, using System.exit() asking to save the changes
"copy-action" - performs copy formatted text action and copies the selection as formatted paragraphs, ready to be pasted into tables.
"paste-action" - performs paste formatted text action.
"new-browser-window" - creates new browser frame

Specified by:
actionPerformed in interface java.awt.event.ActionListener

newEditorWindow

public void newEditorWindow()
Invoked when is pressed the New Window menu item in the Window menu. By default in the component version does nothing. Could be overriden to create new browser instance or something similar.


showAboutDialog

public void showAboutDialog()
Invoked when is pressed the About menu item in the Help menu. Could be overriden to show about dialog or something similar


copyPlainTextToClipboard

protected void copyPlainTextToClipboard()
Copies the selection as plain text to the clipboard


copyFormattedTextToClipboard

protected void copyFormattedTextToClipboard()
Copies the selection to the clipboard


dumpSelectedElementContent

public java.lang.String dumpSelectedElementContent(javax.swing.text.Element elem)

isFastEditForLargeTextFiles

public boolean isFastEditForLargeTextFiles()

setFastEditForLargeTextFiles

public void setFastEditForLargeTextFiles(boolean enabled)

adjustClipboardContextEntry

public void adjustClipboardContextEntry(java.awt.datatransfer.Clipboard clipboard)

inspect

public void inspect()

setHyperlinkCustomBrowsableComponent

public void setHyperlinkCustomBrowsableComponent(BrowsableComponent browsable)

getHyperlinkCustomBrowsableComponent

public BrowsableComponent getHyperlinkCustomBrowsableComponent()

setImageCustomBrowsableComponent

public void setImageCustomBrowsableComponent(BrowsableComponent browsable)

getImageCustomBrowsableComponent

public BrowsableComponent getImageCustomBrowsableComponent()

setUploadContentAsMultipartFormData

public void setUploadContentAsMultipartFormData(boolean uploadContentAsMultipartFormData)
Indicateds whether the content of the browser should be uploaded as multipart/form-data or as a url-encoded content


getUploadContentAsMultipartFormData

public boolean getUploadContentAsMultipartFormData()
Returns whether the content of the browser should be uploaded as multipart/form data with all local images bundled inside.


setUploadedObjectsTranslationPath

public void setUploadedObjectsTranslationPath(java.lang.String uploadedObjectsTranslationPath)
Indicates the translation path for local objects when uploaded to the server as multipart/form data. This way all local objects will be translated into the HTML content before uploading in order to fit given server scheme.


getUploadedObjectsTranslationPath

public java.lang.String getUploadedObjectsTranslationPath()
Returns the translation path to be used before uploading the document content as multipart/form data. This is very useful since it prepares the document to be rendered properly immediately after uploading without any further intervention. This way all local objects are translated into the server relative environment.


setVariableName

public void setVariableName(java.lang.String variableName)
Sets the name of the HTTP POST variable to used for the html content when uploading.


getVariableName

public java.lang.String getVariableName()
Returns the name of the variable to be used when sending the document content via HTTP POST method.


setAdditionalQueryParameters

public 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.


getAdditionalQueryParameters

public java.lang.String getAdditionalQueryParameters()
Returns the additional query parameters to be used when sending the doucment via HTTP POST method


setPublishContentUsingWebDAV

public void setPublishContentUsingWebDAV(boolean publishContentUsingWebDAV_)

setGenerateUniqueImageFilenames

public void setGenerateUniqueImageFilenames(boolean generateUniqueImageFilenames_)

setEquationEditorIntegrationEnabled

public void setEquationEditorIntegrationEnabled(int mode)

getEquationEditorIntegrationEnabled

public int getEquationEditorIntegrationEnabled()

setEquationEditorIntegrationEnabled

public void setEquationEditorIntegrationEnabled(boolean enabled)
Enables the Sferyx Equation browser within the HTMLBrowser which will allow rendering of equations. This will work properly when the Sferyx Equation browser is in bundle or properly installed as an add-on


isEquationEditorIntegrationEnabled

public boolean isEquationEditorIntegrationEnabled()

setDefaultPageFormatForPDFExport

public void setDefaultPageFormatForPDFExport(java.awt.print.PageFormat pageFormat)
Sets the default PageFormat to be used by the PDFExport when available. By defautl the PageFormat dialog will be displayed to the user to select the paper size and margins.


getDefaultPageFormatForPDFExport

public java.awt.print.PageFormat getDefaultPageFormatForPDFExport()

setEmbedAllTTFFontsForPDFExport

public void setEmbedAllTTFFontsForPDFExport(boolean embed)
Sets whether TTF font files should be embedded inside the generated PDF file or not. The default value is false.


isEmbedAllTTFFontsForPDFExport

public boolean isEmbedAllTTFFontsForPDFExport()

setDirectPrint

public void setDirectPrint(boolean directPrint_)
Indicates if a Printer dialog should be shown upon printing or not. If set to true the default printer will be used for printing and only page select dialog will be shown - to disable also this see setQuickPrint


isDirectPrint

public boolean isDirectPrint()

setPDFExportEnabled

public void setPDFExportEnabled(boolean enabled)

isPDFExportEnabled

public boolean isPDFExportEnabled()

setAbsoluteDocumentTranslationURL

public void setAbsoluteDocumentTranslationURL(java.net.URL url)

getAbsoluteDocumentTranslationURL

public java.net.URL getAbsoluteDocumentTranslationURL()

sendWebDAVFile

public void sendWebDAVFile(java.lang.String fileName)

saveToLocation

public void saveToLocation(java.lang.String saveLocation,
                           boolean entireFile)
Sends the document content to given URL. If configured accordingly this will result in a call to sendMultipartFile and will bundle and send all local objects and hyperlink targets to the server.


uploadMultipartContent

public 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. This will include the hmtl content and all external objects such as images etc. "enitreFile" parameter specifies whether the entire document should be sent or only the body portion of the docuemnt without the html and head tags.


writeMultipartContentToStream

public void writeMultipartContentToStream(java.io.OutputStream os,
                                          boolean entireFile)
                                   throws java.lang.Exception
Throws:
java.lang.Exception

getDocumentContentForSending

public java.lang.String getDocumentContentForSending(boolean entireFile)
Returns the document content ready for saving remotely after paths conversion has been done. Usually the browser will manage this automatically when saveRemote or uploadMultipartContent have been invoked.


printFile

public void printFile()
Shows the print dialog and prints out the edited document


setDefaultPrintPreviewDimension

public void setDefaultPrintPreviewDimension(java.awt.Dimension defaultPagePreviewDimension)
Specifies the default size for the print preview dialog - if not specified it will be set by default to 80% of the screen size


getDefaultPrintPreviewDimension

public java.awt.Dimension getDefaultPrintPreviewDimension()

setDefaultPrintPageFormat

public void setDefaultPrintPageFormat(java.awt.print.PageFormat pageFormat)

getDefaultPrintPageFormat

public java.awt.print.PageFormat getDefaultPrintPageFormat()

getDefaultPringPageFormat

public java.awt.print.PageFormat getDefaultPringPageFormat()

setDefaultPrinterJob

public void setDefaultPrinterJob(java.awt.print.PrinterJob printerJob)

getDefaultPrinterJob

public java.awt.print.PrinterJob getDefaultPrinterJob()

setPrintFirstPageHeader

public void setPrintFirstPageHeader(java.lang.String header)
Allows to be specified the header for the first page to be shown on the Print preview and when printing. You can set as a parameter any html formatted text and include the following parameter to display the number of each page like this: htmlEditor.setPrintFirstPageHeader("

This is the First Page Header

"); This will produce a string like This is the First Page Header at the top of the page. You can set any HTML attributes and elements including images etc. to format the output as you need. For the rest of the pages please see setPrintHeader method


setPrintHeader

public void setPrintHeader(java.lang.String header)
Allows to be specified the headers to be shown on the Print preview and when printing. You can set as a parameter any html formatted text and include the following parameter to display the number of each page like this: htmlEditor.setPrintHeader("

This is a Page Header

"); This will produce a string like This is a Page Header at the top of the page. You can set any HTML attributes and elements including images etc. to format the output as you need. If you need to set different header for the first page only, please see setPrintFirstPageHeader method


getPrintHeader

public java.lang.String getPrintHeader()

getPrintFirstPageHeader

public java.lang.String getPrintFirstPageHeader()

setPrintFooter

public void setPrintFooter(java.lang.String footer)
Allows to be specified the footers to be shown on the Print preview and when printing. You can set as a parameter any html formatted text and include the following parameter to display the number of each page like this: htmlEditor.setPrintFooter("

This is a Page Footer

"); This will produce a string like This is the Page Footer at the bottom of the page. You can set any HTML attributes and elements including images etc. to format the output as you need.


getPrintFooter

public java.lang.String getPrintFooter()

setPrintPageNumber

public void setPrintPageNumber(java.lang.String pageNumber)
Allows to be specified the page numbers to be shown on the Print preview and when printing. You can set as a parameter any html formatted text and include the following parameter to display the number of each page like this: htmlEditor.setPrintPageNumber("

Page#@#SferyxHTMLEditor-PageNumber#@

"); This will produce a string like Page#1 at the right bottom corner of the page. You can set any HTML attributes and elements including images etc. to format the output as you need.


getPrintPageNumber

public java.lang.String getPrintPageNumber()

isPrintingCancelled

public boolean isPrintingCancelled()

resetPrintingCancelled

public void resetPrintingCancelled()

printPreview

public void printPreview()
Shows the print dialog and prints out the edited document


openRTFFile

public void openRTFFile(java.io.InputStream is)
Opens silently the InputStream passed, as RTF document for rendering


openRTFFile

public void openRTFFile(java.net.URL file)
Opens silently the URL passed, as RTF document for rendering


openDocxFile

public void openDocxFile(java.io.File file)
Opens MS Word .docx file silently and imports it into the editor for rendering


resetDocxPageData

public void resetDocxPageData()

openDocxFile

public void openDocxFile(java.net.URL file)

openFile

public void openFile()
Shows the FileDialog and opens the selected file


setXMLMode

public void setXMLMode(boolean xmlMode)
This will enable the browser to build automatically its own XML grammar for handling XML/XHTML documents.


isXMLMode

public boolean isXMLMode()
Returns whether the browser will run in XML detection mode. If it is enabled the browser will try to handle smartly unknown xml tags without loading a DTD


openFile

public void openFile(java.net.URL fileURL)
Opens silently the URL passed, as HTML document for rendering


openLocation

public void openLocation(java.lang.String location)
Shows the open location dialog and opens the remote location


getNewStyleSheetInstance

public HTMLBrowser.CustomStyleSheet getNewStyleSheetInstance()

postToLocation

public void postToLocation(java.net.URL location,
                           java.lang.String postData)

openLocation

public void openLocation(java.net.URL location)
Opens silently the URL passed, as HTML document for rendering


getInternalCharset

public java.lang.String getInternalCharset()

setDefaultCharset

public void setDefaultCharset(java.lang.String defaultCharset)
Sets the default charset to be used by the browser.


getDefaultCharset

public java.lang.String getDefaultCharset()
Returns the default charset for this document. If not set through setDefaultCharset, null will be returned.


convertFromXHTMLtoHTML

public java.lang.String convertFromXHTMLtoHTML(java.lang.String line)
Converts XHTML content to HTML content


convertFromHTMLtoXHTML

public java.lang.String convertFromHTMLtoXHTML(java.lang.String content)

findCharacterEncodingHTML5

public java.lang.String findCharacterEncodingHTML5(java.lang.String line)

findCharacterEncoding

public void findCharacterEncoding(java.lang.String line)
Discovers the document encoding of the document


findCharacterEncodingFromClipboard

public void findCharacterEncodingFromClipboard(java.lang.String line)
Discovers the document encoding of the document


encodeLineForCurrentCharset

public java.lang.String encodeLineForCurrentCharset(java.lang.String initialBuffer)
Encodes the given text to the document encoding


encodeToUnicodeChars

public java.lang.String encodeToUnicodeChars(java.lang.String line)
Encodes the given text to Unicode characters.


decodeLineForCurrentCharset

public java.lang.String decodeLineForCurrentCharset(java.lang.String initialBuffer)
Decodes given text to the current document charset.


setSaveEntireDocumentTree

public void setSaveEntireDocumentTree(boolean saveEntrireDocTree)
Sets whether the entire document tree should be saved upon saving. This means that all external objects can be moved to a specific subfolder relative to the document path


getSaveEntireDocumentTree

public boolean getSaveEntireDocumentTree()
Returns whether the entire document tree should be saved upon saving. This means that all external objects can be moved to a specific subfolder relative to the document path


setLinkedObjectsFolderName

public void setLinkedObjectsFolderName(java.lang.String linkedObjectsFolderName)
This method is used to set the folder name where all linked objects should be moved upon save. This is used in conjuction with saveEntireDocumentTree(). This will cause all linked objects to be moved in a relative to the document folder which will contain all external objects - images, link targets etc.


getLinkedObjectsFolderName

public java.lang.String getLinkedObjectsFolderName()
This method is used to retrieve the folder name where all linked objects should be moved upon save. This is used in conjuction with setSaveEntireDocumentTree(). This will cause all linked objects to be moved in a relative to the document folder which will contain all external objects - images, link targets etc.


saveEntireDocumentTree

public boolean saveEntireDocumentTree()
Will save the entire documnet tree in a relative folder under the document path. All external objects will be copied to that location. Default relative path is "images" - can be changed using setLinkedObjectsFolderNAme(String name)


saveEntireDocumentTree

public boolean saveEntireDocumentTree(java.io.File toSaveFile)

setQuickPrint

public void setQuickPrint(boolean quickPrint_)
Indicates if a Page dialog should be shown upon printing or not. If set to true the default page size will be used for printing and only printer select dialog will be shown.


isQuickPrint

public boolean isQuickPrint()

saveFile

public boolean saveFile()
Shows the FileDialog and saves the file to the selected location.


saveFile

public void saveFile(java.io.File toSaveFile)
              throws java.io.IOException,
                     java.net.MalformedURLException,
                     java.io.FileNotFoundException
Saves the cotnent of the browser into a file silently - note that this may update the document base of the cotent to the file.

Throws:
java.io.IOException
java.net.MalformedURLException
java.io.FileNotFoundException

setLocalFileBrowsingDisabled

public void setLocalFileBrowsingDisabled(boolean disabled)
This method will enable/disable the local file dialog when needed. This will result in disabling of all browse buttons which lead to local file browsing


isLocalFileBrowsingDisabled

public boolean isLocalFileBrowsingDisabled()
Returns whether the local file browsing is enabled


getFileDialog

public javax.swing.JFileChooser getFileDialog()
Returns the file dialog used to load and save the files.


setFileDialog

public void setFileDialog(javax.swing.JFileChooser newFileChooser)
Sets the file dialog to be used in all browsing operations. This file dialog will be used by all property dilaogs for browsing images, hyperlinks etc.


setStatusMessage

public void setStatusMessage(java.lang.String message)
Sets the given message to the status bar of the HTMLBrowser.


dumpCurrentListElementContent

public java.lang.String dumpCurrentListElementContent()

convertStringToColor

public java.awt.Color convertStringToColor(java.lang.String string)
Utility method to execute color conversion


componentAdded

public void componentAdded(java.awt.event.ContainerEvent containerEvent)
Specified by:
componentAdded in interface java.awt.event.ContainerListener

componentRemoved

public void componentRemoved(java.awt.event.ContainerEvent containerEvent)
Specified by:
componentRemoved in interface java.awt.event.ContainerListener

indexOfView

public int indexOfView(javax.swing.text.View v)

updateEditedDocument

public void updateEditedDocument()

setEditorTransparent

public void setEditorTransparent(boolean editorTransparent)
This will cause the visual browser to become completely transparent. In order to use this, the source code browser and the preview should be hidden


isEditorTransparent

public boolean isEditorTransparent()
Returns is the browser has been set to be transparent or not. If yes, the browser will not paint the background and could be used as a text box for rendering.


refreshAdapters

public void refreshAdapters()

updateEditedDocument

public void updateEditedDocument(java.lang.String text)
Updates the document structure when significant change has been made such as table size/backgound not reflected by the default rendering.


createNewDocument

public void createNewDocument(java.lang.String text)
Creates new document with the string content and places it into the browser. If the passed string is empty new empty document is created


createNewDocument

public 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. If the passed string is empty new empty document is created


getRelativePath

public 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.


loadExternalStyleSheet

public void loadExternalStyleSheet(java.lang.String externalStyleSheetLocation)
Loads external style sheet specified by the given URL and adds its content to the existing style classes. The newly loaded classes will be available immediately through the style combo boxes of the property dialogs.


loadExternalStyleSheet

public 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. The newly loaded classes will be available immediately through the style combo boxes of the property dialogs.


getLoadedStyleSheetRules

public java.lang.String getLoadedStyleSheetRules()
Returns the additional styles sheet rules loaded through loadStyleSheetRules method.


loadStyleSheetRules

public void loadStyleSheetRules(java.lang.String styleSheet)
Allows to load some style rules dynamically like for example body{background-color:red} etc.


setWordWrapMode

public void setWordWrapMode(boolean active)

setSmartWordContentHanldingEnabled

public void setSmartWordContentHanldingEnabled(boolean active)
Indicates whether should be enable the paste filter or not. By default it is enabled - it will clean and render properly the HTML content


getFontRenderingZoom

public int getFontRenderingZoom()

setFontRenderingZoom

public void setFontRenderingZoom(int relativeIncrease)
Specifies the relative redering size of the fonts. The entire formatting is preserved, the fonts are only relatively increased/decreased in size.


start

public void start()
This will force the browser to generate span rather than font tags.


setPreserveComments

public void setPreserveComments(java.lang.String _preserveComments)
This will previent the user from deleting hidden comments into the document


loadInterfaceLanguageFile

public void loadInterfaceLanguageFile(java.lang.String fileURL)
Loads and renders the interface language file which should be used to localize the UI of the browser


translateMenu

public void translateMenu(javax.swing.JMenu menu)

translatePopupMenu

public void translatePopupMenu(javax.swing.JPopupMenu popupMenu)

translateTabbedPane

public void translateTabbedPane(javax.swing.JTabbedPane tabbedPane)

translateContainer

public void translateContainer(java.awt.Container container)

translateLanguageForComponent

public void translateLanguageForComponent(java.awt.Component component)

getTranslatedString

public java.lang.String getTranslatedString(java.lang.String stringToTranslate)
Returns the translation of given string using the preloaded translation keys. See loadInterfaceLanguageFile for details on translating the browser's UI


removePopupMenuItems

public void removePopupMenuItems(java.lang.String menuItemNames)

setExternalStyleSheetLocation

public void setExternalStyleSheetLocation(java.lang.String externalStyleSheetLocation)
Sets the external style sheet to be loaded and used for rendering and rendering of the document. The style classes will be parsed and added to any exsisting style sheet, the new classes will appear immediately in the style comboboxes of the property dialogs, ready for use.


getExternalStyleSheetLocation

public 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


setRemovedToolbarItems

public void setRemovedToolbarItems(java.lang.String toolbarItemNames)
setRemovedToolbarItems("fontUnderlineButton,fontItalicButton,alignRightButton,fontsList,...") - 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 tool bars to be removed. This allows the full customization of the tool bars of the browser. The full list of the tool bar items is: insertImageButton - the insert image toolbar button; tableBtn - the insert table toolbar button; undoButton - the undo toolbar button; redoButton - the redo toolbar button; insertHyperlinkButton - the insert hyperlink toolbar button; increaseIndentButton - the increase indent toolbar button; decreaseIndentButton - the decrease indent toolbar button; fontSizeButton - the font properties button; setForegroundButton - the font foreground toolbar button; unorderedListButton - the unordered list toolbar button; orderedListButton - the ordered list toolbar button; newFileButton - the new file toolbar button; openFileButton - the open file toolbar button; saveFileButton - the save file button; printFileButton - the print file button; printPreviewButton - the print preview button; pasteButton - the paste toolbar button; copyButton - the copy toolbar button; cutButton - the cut toolbar button; alignRightButton - the align right toolbar button; alignCenterButton - the align center toolbar button; alignLeftButton - the align left toolbar button; fontUnderlineButton - the font underline toolbar button; fontItalicButton - the font italic toolbar button; fontBoldButton - the font bold toolbar button; fontsList - the fonts list toolbar combo box; fontSizes - the font sizes toolbar combo box;


getHTMLEditorClass

public java.lang.Class getHTMLEditorClass()

getRemovedToolbarItems

public java.lang.String getRemovedToolbarItems()
Returns the previously removed toolbar items. This is used mainly as a callback for visual IDE environments.


setShowHiddenToolbarItems

public void setShowHiddenToolbarItems(java.lang.String toolbarItemNames)

setRemovedMenuItems

public void setRemovedMenuItems(java.lang.String menuItemNames)
setRemovedMenuItems("openLocationMenuItem, printFileMenuItem, closeFileMenuItem,...") - Indicates which menu items should be removed from the menus. This list contains comma separated names of the menu items contained within the browser to be removed. This allows the full customization of the dropdown menus inside the main menu. The full list is: File Menu newFileMenuItem - new file menu item on the "File" menu openFileMenuItem - open file menu item on the "File" menu openLocationMenuItem - open location menu item on the "File" menu closeFileMenuItem - close file menu item on the "File" menu saveFileMenuItem - save file menu item on the "File" menu saveasFileMenuItem - save remote file menu item on the "File" menu printFileMenuItem - print file menu item on the "File" menu exitFileMenuItem - close file menu item on the "File" menu Edit Menu copyMenuItem -copy menu item on the "Edit" menu cutMenuItem - cut menu item on the "Edit" menu pasteMenuItem - paste menu item on the "Edit" menu copyFormattedTextMenuItem - copy formatted text menu item on the "Edit" menu pasteFormattedTextMenuItem- paste formatted text menu item on the "Edit" menu selectAllMenuItem - select all menu item on the "Edit" menu findMenuItem - find menu item on the "Edit" menu - professional version replaceMenuItem - replace menu item on the "Edit" menu - professional version Insert Menu insertBreakMenuItem - insert break menu item on the "Insert" menu insertParagraphMenuItem - insert paragraph menu item on the "Insert" menu insertSpaceMenuItem - insert space menu item on the "Insert" menu horizontalLineMenuItem - insert horizontal line menu item on the "Insert" menu insertDateMenuItem - insert date menu item on the "Insert" menu insertSymbolMenuItem - insert symbol menu item on the "Insert" menu insertFormFieldTextBoxMenuItem - insert text box menu item on the "Insert -> Form" menu insertFormFieldTextAreaMenuItem - insert text area menu item on the "Insert -> Form" menu insertFormFieldCheckBoxMenuItem - insert check box menu item on the "Insert -> Form" menu insertFormFieldRadioButtonMenuItem - insert radio button menu item on the "Insert -> Form" menu insertFormFieldDropDownMenuItem - insert drop down menuitem on the "Insert -> Form" menu insertFormFieldPushButtonMenuItem - insert push button menu item on the "Insert -> Form" menu insertFormFieldImageButtonMenuItem - insert image button menu item on the "Insert -> Form" menu insertInsertImageMenuItem - insert image menu item on the "Insert" menu insertInsertHyperlinkMenuItem - insert hyperlink menu item on the "Insert " menu Table Menu insertTableMainMenuItem - insert table menu item on the "Table" menu insertTableRowMainMenuItem - insert table row menu item on the "Table" menu insertTableColumnMainMenuItem - insert table column menu item on the "Table" menu deleteTableCellsItem - delete table column menu item on the "Table" menu selectTableMenuItem - select table menu item on the "Table" menu selectTableColumnMenuItem - select table column menu item on the "Table" menu selectTableRowMenuItem - select table row menu item on the "Table" menu selectTableCellMenuItem - select table cell menu item on the "Table" menu splitTableCellMenuItem - split table cell menu item on the "Table" menu mergeTableCellMenuItem - merge table cell menu item on the "Table" menu tablePropertiesMainMenuItem - table properties menu item on the "Table" menu tableCellPropertiesMainMenuItem - table cell properties menu item on the "Table" menu Window Menu newWindowMenuItem - new window menu item on the "Window" menu Format Menu fontPropertiesMainMenuItem - font properties menu item on the "Format" menu pagePropertiesMainMenuItem - page properties menu item on the "Format" menu View Menu viewStatusBarMenuItem - view status bar menu item on the "View" menu viewToolBarMenuItem - view tool bar menu item on the "View" menu - professional version viewSourceEditorMenuItem - view source browser menu item on the "View" menu - professional version viewPagePreviewMenuItem - view preview menu item on the "View" menu - professional version Help Menu aboutFileMenuItem - about menu item on the "Help" menu


setRemovedMenus

public void setRemovedMenus(java.lang.String menuItemNames)
setRemovedMenus("menuTools, menuHelp,..") - Indicates which menus should be removed from the main menu bar. This list contains comma separated names of the menus contained within the browser's main menu bar to be removed. This allows the full customization of the menus inside the main menu bar. The full list of the menus is: Main Menus: menuFile - the File menu on the main menu bar - will remove the entire menu; menuEdit - the Edit menu on the main menu bar - will remove the entire menu; menuView - the View menu on the main menu bar - will remove the entire menu; menuInsert - the Insert menu on the main menu bar - will remove the entire menu; menuFormat - the Format menu on the main menu bar - will remove the entire menu; menuTools - the Tools menu on the main menu bar - will remove the entire menu; menuTable - the Table menu on the main menu bar - will remove the entire menu; menuWindow - the Window menu on the main menu bar - will remove the entire menu; menuHelp - the Help menu on the main menu bar - will remove the entire menu; Submenus: menuInsertTable - the Insert menu inside the Table main menu - will remove the entire menu; menuSelectTable - the Select menu inside the Table main menu - will remove the entire menu; menuPropertiesTable - the Properties menu inside the Table main menu - will remove the entire menu; menuForm - the Form menu inside the Insert main menu - will remove the entire menu;


getRemovedMenus

public java.lang.String getRemovedMenus()
Returns the menus removed previously from the browser. This is mainly used as a callback for visual IDE environments.


getPageLayoutView

public java.awt.print.PageFormat getPageLayoutView()

setDontLoadDocumentImages

public void setDontLoadDocumentImages(boolean loadImages)

isDontLoadDocumentImages

public boolean isDontLoadDocumentImages()

isLoadLocalImagesAlways

public boolean isLoadLocalImagesAlways()

setLoadLocalImagesAlways

public void setLoadLocalImagesAlways(boolean loadImages)
Specifies to load always the local images in the document even if setDontLoadDocumentImages is set to true


setDisableImageCaching

public void setDisableImageCaching(boolean imageCachingDisabled)
Sets the status of image caching disabling - if true the images are reloaded always from the source. The default is false for faster performance loading and rendering performance.


isDisableImageCaching

public boolean isDisableImageCaching()
Returns the status of image caching disabling- if true the images are reloaded always from the source.


isPrintingHost

public boolean isPrintingHost()

setRenderInvisibleContent

public static void setRenderInvisibleContent(boolean render)
Will force the rendering of the HTML content of the edtor even if tbhe editor is not visible and not added to a container. Can be used for creating offscreen images or other automation tasks.


isRenderInvisibleContent

public static boolean isRenderInvisibleContent()
Returns if rendering of the HTML content of the edtor even if tbhe editor is not visible and not added to a container is enabled.


caretUpdate

public void caretUpdate(javax.swing.event.CaretEvent e)
Folows the caret position changes and modifies the selection for tables etc.

Specified by:
caretUpdate in interface javax.swing.event.CaretListener

itemStateChanged

public void itemStateChanged(java.awt.event.ItemEvent itemEvent)
Specified by:
itemStateChanged in interface java.awt.event.ItemListener

setPrintingHost

public void setPrintingHost(boolean printingHost)

setExternalStyleSheetForPrint

public void setExternalStyleSheetForPrint(java.lang.String externalStyleSheetLocation)
Loads external style sheet for printing specified by the given URL. The newly loaded classes will be used for printing or PDFExport if specified.


getExternalStyleSheetForPrint

public java.lang.String getExternalStyleSheetForPrint()

getPDFExportOutputEncoding

public java.lang.String getPDFExportOutputEncoding()

setPDFExportOutputEncoding

public void setPDFExportOutputEncoding(java.lang.String encoding)

getActiveHTMLBrowser

public HTMLBrowser getActiveHTMLBrowser()
Returns the browser instance which owns the focus. This is useful in multi browser instance applications


getActiveHTMLBrowser

public HTMLBrowser getActiveHTMLBrowser(java.awt.event.ActionEvent e,
                                        HTMLBrowser.CustomTextAction textAct)
Returns the browser instance which owns the focus. This is useful in multi browser instance applications


addHyperlinkListener

public void addHyperlinkListener(javax.swing.event.HyperlinkListener listener)
This method allows HyperlinkListener to be added directly to the browser.


removeHyperlinkListener

public void removeHyperlinkListener(javax.swing.event.HyperlinkListener listener)
Removes a document listener from the browser.


addDocumentListener

public void addDocumentListener(javax.swing.event.DocumentListener listener)
This method allows HyperlinkListener to be removed from the browser.


removeDocumentListener

public void removeDocumentListener(javax.swing.event.DocumentListener listener)
Removes a document listener from the browser.


addFormElementsMouseListener

public 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. Events will be reported both for Visual browser and Preview.


removeFormElementsMouseListener

public void removeFormElementsMouseListener(java.awt.event.MouseListener listener)
Will remove a listener which delivers events from the form components


addFormElementsKeyListener

public void addFormElementsKeyListener(java.awt.event.KeyListener listener)
This method is could be used to attach listeners to HTML Form elements such as buttons, lists and drop down menus. Events will be reported both for Visual browser and Preview.


removeFormElementsKeyListener

public void removeFormElementsKeyListener(java.awt.event.KeyListener listener)
Will remove a listener which delivers events from the form components


resetDocumentEdited

public void resetDocumentEdited()
Resets the docuemnt edited state - this will set document edited to false.


isDocumentEdited

public boolean isDocumentEdited()
Returns whether the browser has been changed or not. This is a simplified way to track changes in order to understand if ask for save upon quitting or not.


notifyListeners

protected void notifyListeners(java.awt.event.MouseEvent mouseEvent)

notifyListeners

protected void notifyListeners(java.awt.event.KeyEvent keyEvent)

notifyListeners

protected void notifyListeners(javax.swing.event.DocumentEvent documentEvent,
                               javax.swing.event.DocumentEvent.EventType eventType)

setDocumentLenghtLimit

public void setDocumentLenghtLimit(int limit,
                                   java.lang.String warningMessage)
Sets the maximum allowed document length if any has been set. This should be used in conjunction with setDocumentSizeLimit(int limit) - using these methods will prevent the user from typing documents with length exceeding the restriction. The count will include also the entire HTML markup. "warning message" is the message to be displayed to the user when the limit is reached. If null default message will be displayed


setDocumentLenghtLimitIsForPlainText

public void setDocumentLenghtLimitIsForPlainText(boolean limitForPlainText)
Sets the document length limit to be verified against the plain text of the content only. The default value is false.


isDocumentLenghtLimitIsForPlainText

public boolean isDocumentLenghtLimitIsForPlainText()
Retrieves whether the document length limit is set to be verified against the plain text of the content only. The default value is false. No formatting tags and other html content willbe taken in account when verifying the document length.


resetDocumentLenghtLimit

public void resetDocumentLenghtLimit()
Removes previously imposed document lenght restriction. This should be used in conjunction with setDocumentLengthLimit


getDocumentSizeLimit

public int getDocumentSizeLimit()
Returns the maximum allowed document length if any has been set. This should be used in conjunction with setDocumentSizeLimit(int limit) - using these methods will prevent the user from typing documents with length exceeding the restriction. The count will include also the entire HTML markup.


changedUpdate

public void changedUpdate(javax.swing.event.DocumentEvent documentEvent)
Specified by:
changedUpdate in interface javax.swing.event.DocumentListener

insertUpdate

public void insertUpdate(javax.swing.event.DocumentEvent documentEvent)
Specified by:
insertUpdate in interface javax.swing.event.DocumentListener

removeUpdate

public void removeUpdate(javax.swing.event.DocumentEvent documentEvent)
Specified by:
removeUpdate in interface javax.swing.event.DocumentListener

setDisableIndentingAndLineBreaks

public void setDisableIndentingAndLineBreaks(boolean _disableIndentingAndLineBreaks)
Disables/ enables the indenting and line breaks when generating the document content as html. Currently this setting will affect all instances of the browser.


setPreferredPasteOperation

public void setPreferredPasteOperation(int preferredPasteOperation)
Sets the preferred paste operation to be used by the browser. Allowed values are: PASTE_FORMATTED__TEXT=0; PASTE_PLAIN_TEXT=1; PASTE_FORMATTED_PARAGRAPHS_WITHOUT_STYLE=2; PASTE_FILTERED_FORMATTED_TEXT=3; This value can be retrieved through getPreferredPasteOperation()


getPreferredPasteOperation

public int getPreferredPasteOperation()
Returns the preferred paste operation to be used by the browser. Allowed values are: PASTE_FORMATTED__TEXT=0; PASTE_PLAIN_TEXT=1; PASTE_FORMATTED_PARAGRAPHS_WITHOUT_STYLE=2; PASTE_FILTERED_FORMATTED_TEXT=3; This value can be set through setPreferredPasteOperation(int operation)


finalize

protected void finalize()
                 throws java.lang.Throwable
Overrides:
finalize in class java.lang.Object
Throws:
java.lang.Throwable

removeNotify

public void removeNotify()
Overrides:
removeNotify in class javax.swing.JRootPane

addNotify

public void addNotify()
Overrides:
addNotify in class javax.swing.JRootPane

clearActionReferences

public void clearActionReferences()

initKeyStrokes

public void initKeyStrokes()

removeKeyStrokes

public void removeKeyStrokes()

isTransferFocusOnTAB

public boolean isTransferFocusOnTAB()

setTransferFocusOnTAB

public void setTransferFocusOnTAB(boolean transfer)

manageTabKeyInternally

public void manageTabKeyInternally(java.awt.event.KeyEvent keyEvent)

keyPressed

public void keyPressed(java.awt.event.KeyEvent keyEvent)
Specified by:
keyPressed in interface java.awt.event.KeyListener

keyReleased

public void keyReleased(java.awt.event.KeyEvent keyEvent)
Specified by:
keyReleased in interface java.awt.event.KeyListener

keyTyped

public void keyTyped(java.awt.event.KeyEvent keyEvent)
Specified by:
keyTyped in interface java.awt.event.KeyListener

getAttributesForComponent

public javax.swing.text.AttributeSet getAttributesForComponent(java.awt.Component c,
                                                               javax.swing.JEditorPane htmlEditor)
Retruns the HTML attributes describing the componenent conained in a HTML Form in the browser specified as a parameter


getAttributesForComponent

protected javax.swing.text.AttributeSet getAttributesForComponent(javax.swing.text.View rootView,
                                                                  java.awt.Component c)
Retruns the HTML attributes describing the componenent conained in a HTML Form in the Root view specified as a parameter