void |
addDocumentListener(javax.swing.event.DocumentListener listener)
This
method allows DocumentListereners to be added directly to the
editor. |
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 |
alignCenterParagraph() When
invoked, aligns the selected text centrally |
void |
alignLeftParagraph() When
invoked, aligns the selected text to the left |
void |
alignRightParagraph() When
invoked, aligns the selected text to the right |
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 |
changeFontBackground(java.awt.Color newColor)
Sets
the selection font foreground |
void |
changeFontFamily(java.awt.Font newFont)
sets
the selected text's font family. |
void |
changeFontFamily(java.lang.String fontFamily)
sets
the selected text's font family. |
void |
changeFontForeground(java.awt.Color newColor)
Sets
the selection font foreground |
void |
changeFontSize(int newFontSize)
Sets
the selected text's font size. |
void |
closeBufferAndInsert() Closes
the existing content buffer and inserts its content inside the
editor. |
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 HTMLEditorKit
and adds it to given toolbar. |
void |
createNewDocument(java.lang.String text)
Creates
new document with the string content and places it into the editor. |
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 editor. |
void |
decreaseIndent() Decreases
the indent of the paragraph at the caret position |
void |
deleteSelectedTableCells() Deletes
the selected table cells. |
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. |
protected void |
followPreviewInSourceEditor() This
method is used to force the Source editor to be updated with the
content of the preview. |
protected void |
followPreviewInVisualEditor() This
method is used to force the Visual editor to be updated with the
content of the preview. |
java.lang.String |
getAdditionalQueryParameters() Returns
the additional query parameters to be used when sending the doucment
via HTTP POST method |
java.lang.String |
getBodyContent() Returns
the content of the editor as a part of HTML document not entire
page. |
int |
getBodyContentLenght() Returns
the lenght of the HTMLDocument in the editor - 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. |
java.lang.String |
getBodyUnicodeContentFromPreview() Returns
portion of the body content from the Preview Section. |
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. |
int |
getDocumentSizeLimit() Returns
the maximum allowed document length if any has been set. |
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 editor. |
boolean |
getExitOnExit() Return
if the editor should exit using System.exit(); when the user presses
Exit on the File menu. |
java.lang.String |
getExternalDictionary() Returns
the URL of the external dictionary used for spellcheking. |
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 editor. |
java.lang.String |
getLinkedObjectsFolderName() This
method is used to retrieve the folder name where all linked objects
should be moved upon save. |
javax.swing.JTabbedPane |
getMainTabbedPane() Returns
the main tabbed pane that contains all editors - visual, source
code, preview - allows full customization. |
java.lang.String |
getPlainText() Gets
the entire content of the document as an plain text string. |
int |
getPreferredPasteOperation() Returns
the preferred paste operation to be used by the editor. |
javax.swing.JEditorPane |
getPreviewJEditorPane() Returns
the internal JEditorPane used for preview and rendering in the
visual editor. |
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 editor. |
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 |
getSelectedEditor() Returns
which editor is currently selected. |
javax.swing.JEditorPane |
getSelectedEditorComponent() Returns
the currently selected editor component - visual, source code,
preview. |
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.JPopupMenu |
getSourceEditorPopupMenu() Returns
the source editor popup menu. |
java.util.Vector |
getStyleClasses() Returns
the array of style classes imported into the editor from style
sheets. |
java.lang.String |
getUnicodeContent() Returns
the content of the editor as unicode string. |
java.lang.String |
getUnicodeContentFromPreview() Returns
the content of the editor as unicode string. |
boolean |
getUploadContentAsMultipartFormData()
Returns
whether the content of the editor 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. |
javax.swing.JPopupMenu |
getVisualEditorPopupMenu() Returns
the popup menu that appears inside the visual editor. |
void |
increaseIndent() Increases
the indent of the selection |
void |
insertBreak() Inserts
line break
at the caret position. |
void |
insertCheckBox() Inserts
new checkbox form field. |
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 editor without the synchronization
locks. |
void |
insertDate() Inserts
the current date at the caret position. |
void |
insertFormField(java.lang.String fieldHtmlString,
javax.swing.text.html.HTML.Tag filedTagType) Inserts
new form field asspecified into the passed string. |
void |
insertHorizontalLine() Inserts
new horizontal line at the caret position. |
void |
insertImage(java.lang.String imageURL)
Inserts
new image at the caret position into the document given the URL
of the image as string. |
void |
insertImageButton(java.lang.String imageURL)
Inserts
new image button at the caret position using the string URL passed
for the image. |
void |
insertLink(java.lang.String text)
Inserts
new hyperlink over the selected text given the URL of the hyperlink
as string. |
void |
insertOrderedList() Inserts
ordered list at the caret position. |
void |
insertParagraph() Inserts
new paragraph at the caret position. |
void |
insertPlainText(java.lang.String content)
Inserts
plain text into the editor at the caret position. |
void |
insertPushButton() Inserts
new pushbutton form field. |
void |
insertRadioButton() Inserts
new radiobutton form field. |
void |
insertSelectFormField() Inserts
new select (dropdown menu/list) form field. |
void |
insertSymbol(int unicodeChar) Inserts
new unicode symbol at the caret position. |
void |
insertTable(int cols, int rows)
Inserts
new table at the current caret position, using the passed number
of columns and rows. |
void |
insertTableColumn() Inserts
new table column in the table at the caret position or does nothing
if there is no table |
void |
insertTableRow() Inserts
new table row in the table at the caret position or does nothing
if there is no table |
void |
insertTextArea() Inserts
new textarea form field. |
void |
insertTextField() Inserts
new textfield form field. |
void |
insertUnorderedList() Inserts
unordered list at the caret position. |
void |
insertUpdate(javax.swing.event.DocumentEvent documentEvent)
|
void |
insertWhiteSpace() Inserts
white space at the caret position. |
boolean |
isAsYouTypeSpellcheckingEnabled() Returns
whether the as-you-type spellchecking is enabled or not. |
boolean |
isBrowsingInPreviewEnabled() Returns
whether the browsing in the preview section is activated. |
boolean |
isDocumentEdited() Returns
whether the editor has been changed or not. |
boolean |
isEditorTransparent() Returns
is the editor has been set to be transparent or not. |
boolean |
isEnabled() |
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 editor. |
boolean |
isPopupMenuVisible() Returns
true/false if the popup menu is visible and active or not on the
editor. |
boolean |
isPreviewModeOnly() Returns
the state of the editor - if is set PreviewModeOnly to true the
editor will run only with the preview visible and will work mostly
like a browser. |
boolean |
isPreviewVisible() Returns
if the preview section is visible and active or not on the editor. |
boolean |
isShowParagraphsEnabled() Method
for showing the paragraph marks. |
boolean |
isSingleParagraphSpacing() Returns
whether single paragraph spacing generation is enabled or not. |
boolean |
isSourceEditorVisible() Returns
true/false if the source editor is visible and active or not on
the editor. |
boolean |
isStatusBarVisible() Returns
true/false if the status bar is visible and active or not on the
editor. |
boolean |
isToolBarVisible() Returns
true/false if the toolbar is visible and active or not on the
editor. |
boolean |
isVisualEditorFollowsPreview() Returns
whether the Visula editor will follow preview when browsing in
preview is enabled |
boolean |
isXMLMode() Returns
whether the editor 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 editor |
void |
loadStyleDescriptionsFile(java.lang.String fileURL)
This
method allows sample style descriptions to be loaded for use in
the dropdown combo box. |
void |
mergeSelectedTableCells() Merges
the selected table cells. |
void |
openContentBuffer() Ooens
the new content buffer for inserting content inside the editor. |
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 |
pasteFilteredFormattedTextFromClipboard()
Will
paste filtered formatted text into the editor. |
void |
pasteFormattedParagraphsWithoutStyleFromClipboard()
Will
paste the content of the clipboard scrpping eventually any style
information |
void |
pasteFormattedTextFromClipboard() Pastes
the content of the clipboard at the current location. |
void |
pastePlainTextFromClipboard(boolean convertLineBreaks)
Will
get the plain text component of the clipboard and paste it inside
the editor. |
void |
performInstantSpellCheck() Will
force the spellchecker to performa instant inline spellcheck of
the document |
void |
performSpellCheck() Will
schedule a spellcheck operation to be performed when possible |
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 editor. |
void |
removeFormatting() Will
remove all the formatting from the selection |
void |
removeFormElementsMouseListener(java.awt.event.MouseListener listener)
Will
remove a listener which delivers events from the form components |
void |
resetDocumentLenghtLimit() Removes
previously imposed document lenght restriction. |
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 |
setAsYouTypeSpellcheckingEnabled(boolean enabled)
|
void |
setBold() Will
update the selection to toggle/set bold attribute |
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 |
setContentAsynchronously(java.lang.String htmlContent)
This
method is used to sets the content of the editor without the synchronization
locks. |
void |
setDefaultCharset(java.lang.String defaultCharset)
Sets
the default charset to be used by the editor. |
void |
setDefaultInitialFont(java.lang.String initialFont)
Sets
the default font family to be used in the editor - this will generate
automatically the required font tags in order to reflect the font
into the browsers |
void |
setDefaultInitialFontSize(java.lang.String fontSize)
Sets
the default font size to be used in the editor - 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 |
setEditorTransparent(boolean editorTransparent)
This
will cause the visual editor to become completely transparent. |
void |
setEnabled(boolean enabled) |
void |
setExitOnExit(boolean exit) Sets
the behavior of the editor when "Exit" on the file menu
is pressed If this method is invoked with true then the editor
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 |
setExternalDictionary(java.lang.String externalDictionary)
Sets
the external dictionary URL of the dictionary to be loaded for
spellchecking operations -indicates the URL of the dictionary
to be used for spell checking. The dictionary should be plain
text in the following semicolon delimited format:
A=;aa;aaaa;aaaaaa;.....etc;
B=;bb;bbb;bbbbb;bbbbbbb;......;
C=;ccc;cccc;ccccc;ccccc;....;
Each line contains all words for a given letter, for example
the first line contains all the words beginning with A, the
second with B etc.
All the words should be in lower case, note the initial and
end delimiters. There shouldn't be any white spaces.
|
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 |
setFontComboBoxesStatus(boolean status)
Sets
the status enabled/disabled of the comboboxes on the toolbar -
the headings, font family, font size. |
void |
setFontRenderingEnabled(boolean enabled)
This
allows the font dropdown to be enabled to render its content for
each font line or simply to display the font names with standard
font. |
void |
setFontRenderingZoom(int relativeIncrease)
Specifies
the relative redering size of the fonts. |
void |
setHeadingStyle(java.lang.String headingStyle)
Sets
the heading style of the selected paragraph - the parameters should
be in the following format "Heading 1", or "Heading
2" etc. |
void |
setItalic() Will
update the selection with the italic attribute - set/toggle it. |
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 |
setMainMenuVisible(boolean visible)
Sets
the main menu of the editor (File, Edit ...) visible and active
or not. |
void |
setMenuItemsStatus(boolean status)
Enables/disable
all the menu items |
void |
setPopupMenuVisible(boolean visible)
Sets
the popup menu of the editor visible and active or not. |
void |
setPreferredPasteOperation(int preferredPasteOperation)
Sets
the preferred paste operation to be used by the editor. |
void |
setPreserveComments(java.lang.String _preserveComments)
This
will previent the user from deleting hidden comments into the
document |
void |
setPreviewModeOnly(boolean previewModeOnly)
Enables
the preivew mode only. |
void |
setPreviewVisible(boolean visible)
Sets
the preview section of the editor visible and active 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 f |