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