Package com.teamdev.jxbrowser.frame
Class EditorCommand
java.lang.Object
com.teamdev.jxbrowser.frame.EditorCommand
Provides the supported commands that can be executed in a
Frame
.-
Nested Class Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic EditorCommand
backgroundColor
(Color color) Returns a command that allows setting the given backgroundcolor
for the selected text in a WYSIWYG editor.static EditorCommand
backgroundColor
(String colorName) Returns a command that allows setting the given backgroundcolorName
for the selected text in a WYSIWYG editor.static EditorCommand
bold()
Returns a command that allows making the selected text bold in a WYSIWYG editor.static EditorCommand
copy()
Returns a command that allows copying the selected text in the frame.static EditorCommand
createLink
(String url) Returns a command that allows making the link to the specifiedURL
in a WYSIWYG editor.static EditorCommand
cut()
Returns a command that allows cutting the selected text in a text field, text area or WYSIWYG editor.static EditorCommand
delete()
Returns a command that allows deleting the selected text in a text field, text area or WYSIWYG editor.static EditorCommand
Returns a command that allows deleting character before the caret position in a text field, text area or WYSIWYG editor.static EditorCommand
Returns a command that allows deleting character after the caret position in a text field, text area or WYSIWYG editor.static EditorCommand
Returns a command that allows deleting character from the caret position to the beginning of line in a text field, text area or WYSIWYG editor.static EditorCommand
Returns a command that allows deleting a word before the caret position in a text field, text area or WYSIWYG editor.static EditorCommand
Returns a command that allows deleting a word after the caret position in a text field, text area or WYSIWYG editor.static EditorCommand
Returns a command that allows searching for the giventext
occurrence from the current caret position in the frame.static EditorCommand
Returns a command that allows setting the givenfontName
for the selected text in a WYSIWYG editor.static EditorCommand
fontSize
(AbsoluteFontSize fontSize) Returns a command that allows setting the givenfontSize
for the selected text in a WYSIWYG editor.static EditorCommand
foregroundColor
(Color color) Returns a command that allows setting the given foregroundcolor
for the selected text in a WYSIWYG editor.static EditorCommand
foregroundColor
(String colorName) Returns a command that allows setting the given foregroundcolorName
for the selected text in a WYSIWYG editor.static EditorCommand
Returns a command that allows disabling the spelling mistakes highlighting in a text area or a WYSIWYG editor.static EditorCommand
indent()
Returns a command that allows making indent of the selected text in a WYSIWYG editor.static EditorCommand
insertHtml
(String html) Returns a command that allows inserting the givenhtml
content in a WYSIWYG editor.static EditorCommand
insertImage
(String imageSrc) Returns a command that allows inserting an image with the givenimageSrc
in a WYSIWYG editor.static EditorCommand
Returns a command that allows inserting a new line in a WYSIWYG editor.static EditorCommand
Returns a command that allows inserting an ordered list in a WYSIWYG editor.static EditorCommand
Returns a command that allows inserting a paragraph in a WYSIWYG editor.static EditorCommand
Returns a command that allows inserting a tab character in a WYSIWYG editor.static EditorCommand
insertText
(String text) Returns a command that allows inserting the giventext
content in a WYSIWYG editor or a text field.static EditorCommand
Returns a command that allows inserting an unordered list in a WYSIWYG editor.static EditorCommand
italic()
Returns a command that allows making the selected text italic in a WYSIWYG editor.static EditorCommand
Returns a command that allows center justification the selected text in a WYSIWYG editor.static EditorCommand
Returns a command that allows full justification the selected text in a WYSIWYG editor.static EditorCommand
Returns a command that allows left justification the selected text in a WYSIWYG editor.static EditorCommand
Returns a command that allows right justification the selected text in a WYSIWYG editor.static EditorCommand
Returns a command that allows moving the caret position at one page down in a text area or a WYSIWYG editor.static EditorCommand
Returns a command that allows moving the caret position at one page up in a text area or a WYSIWYG editor.static EditorCommand
Returns a command that allows moving a word to the beginning of line in a text area or a WYSIWYG editor.static EditorCommand
Returns a command that allows moving a word to the beginning of line and modifying selection in a text area or a WYSIWYG editor.static EditorCommand
Returns a command that allows moving a word to the end of line in a text area or a WYSIWYG editor.static EditorCommand
Returns a command that allows moving a word to the end of line and modifying selection in a text area or a WYSIWYG editor.static EditorCommand
Returns a command that allows moving a word left in a text area or a WYSIWYG editor.static EditorCommand
Returns a command that allows moving a word left and modifying selection in a text area or a WYSIWYG editor.static EditorCommand
Returns a command that allows moving a word right in a text area or a WYSIWYG editor.static EditorCommand
Returns a command that allows moving a word right and modifying selection in a text area or a WYSIWYG editor.name()
Returns theName
of the command.static EditorCommand
outdent()
Returns a command that allows making outdent of the selected text in a WYSIWYG editor.static EditorCommand
paste()
Returns a command that allows pasting content of the clipboard in a text field, text area or a WYSIWYG editor.static EditorCommand
redo()
Returns a command that allows reversing the lastundo()
action.static EditorCommand
Returns a command that allows removing all styles of the selected text (bold, italic, etc.) in a WYSIWYG editor.static EditorCommand
Returns a command that allows scrolling one line down.static EditorCommand
Returns a command that allows scrolling one line up.static EditorCommand
Returns a command that allows scrolling a page backward.static EditorCommand
Returns a command that allows scrolling a page forward.static EditorCommand
Returns a command that allows scrolling content to the beginning of the document in the frame.static EditorCommand
Returns a command that allows scrolling content to the end of the document in the frame.static EditorCommand
Returns a command that allows selecting all text in the frame or the currently focused text field, text area or a WYSIWYG editor.static EditorCommand
Returns a command that allows selecting a line at the caret position in a text area or a WYSIWYG editor.static EditorCommand
Returns a command that allows selecting the whole paragraph at the caret position in a text area or a WYSIWYG editor.static EditorCommand
Returns a command that allows selecting the whole sentence at the caret position in a text area or a WYSIWYG editor.static EditorCommand
Returns a command that allows selecting the word at the caret position in a text field, text area or a WYSIWYG editor.static EditorCommand
Returns a command that allows making the selected text strikethrough in a WYSIWYG editor.static EditorCommand
Returns a command that allows making the selected text subscript in a WYSIWYG editor.static EditorCommand
Returns a command that allows making the selected text superscript in a WYSIWYG editor.static EditorCommand
Returns a command that allows toggling bold style for the selected text in a WYSIWYG editor.static EditorCommand
Returns a command that allows toggling italic style for the selected text in a WYSIWYG editor.static EditorCommand
Returns a command that allows toggling underline style for the selected text in a WYSIWYG editor.static EditorCommand
Returns a command that allows underlying the selected text in a WYSIWYG editor.static EditorCommand
undo()
Returns a command that allows reversing the last action.static EditorCommand
unlink()
Returns a command that allows removing the link from the text in a WYSIWYG editor.static EditorCommand
unselect()
Returns a command that allows clearing the current selection in a frame.value()
Returns a string that represents the command value.
-
Method Details
-
bold
Returns a command that allows making the selected text bold in a WYSIWYG editor. -
copy
Returns a command that allows copying the selected text in the frame. -
cut
Returns a command that allows cutting the selected text in a text field, text area or WYSIWYG editor. -
delete
Returns a command that allows deleting the selected text in a text field, text area or WYSIWYG editor. -
deleteBackward
Returns a command that allows deleting character before the caret position in a text field, text area or WYSIWYG editor. -
deleteForward
Returns a command that allows deleting character after the caret position in a text field, text area or WYSIWYG editor. -
deleteToBeginningOfLine
Returns a command that allows deleting character from the caret position to the beginning of line in a text field, text area or WYSIWYG editor. -
deleteWordBackward
Returns a command that allows deleting a word before the caret position in a text field, text area or WYSIWYG editor. -
deleteWordForward
Returns a command that allows deleting a word after the caret position in a text field, text area or WYSIWYG editor. -
insertNewLine
Returns a command that allows inserting a new line in a WYSIWYG editor. -
insertParagraph
Returns a command that allows inserting a paragraph in a WYSIWYG editor. -
insertTab
Returns a command that allows inserting a tab character in a WYSIWYG editor. -
ignoreSpelling
Returns a command that allows disabling the spelling mistakes highlighting in a text area or a WYSIWYG editor. -
italic
Returns a command that allows making the selected text italic in a WYSIWYG editor. -
movePageUp
Returns a command that allows moving the caret position at one page up in a text area or a WYSIWYG editor. -
movePageDown
Returns a command that allows moving the caret position at one page down in a text area or a WYSIWYG editor. -
moveWordLeft
Returns a command that allows moving a word left in a text area or a WYSIWYG editor. -
moveWordLeftAndModifySelection
Returns a command that allows moving a word left and modifying selection in a text area or a WYSIWYG editor. -
moveWordRight
Returns a command that allows moving a word right in a text area or a WYSIWYG editor. -
moveWordRightAndModifySelection
Returns a command that allows moving a word right and modifying selection in a text area or a WYSIWYG editor. -
moveToBeginningOfLine
Returns a command that allows moving a word to the beginning of line in a text area or a WYSIWYG editor. -
moveToBeginningOfLineAndModifySelection
Returns a command that allows moving a word to the beginning of line and modifying selection in a text area or a WYSIWYG editor. -
moveToEndOfLine
Returns a command that allows moving a word to the end of line in a text area or a WYSIWYG editor. -
moveToEndOfLineAndModifySelection
Returns a command that allows moving a word to the end of line and modifying selection in a text area or a WYSIWYG editor. -
paste
Returns a command that allows pasting content of the clipboard in a text field, text area or a WYSIWYG editor. -
redo
Returns a command that allows reversing the lastundo()
action. -
scrollPageBackward
Returns a command that allows scrolling a page backward. -
scrollPageForward
Returns a command that allows scrolling a page forward. -
scrollLineUp
Returns a command that allows scrolling one line up. -
scrollLineDown
Returns a command that allows scrolling one line down. -
scrollToBeginningOfDocument
Returns a command that allows scrolling content to the beginning of the document in the frame. -
scrollToEndOfDocument
Returns a command that allows scrolling content to the end of the document in the frame. -
selectAll
Returns a command that allows selecting all text in the frame or the currently focused text field, text area or a WYSIWYG editor. -
selectLine
Returns a command that allows selecting a line at the caret position in a text area or a WYSIWYG editor. -
selectParagraph
Returns a command that allows selecting the whole paragraph at the caret position in a text area or a WYSIWYG editor. -
selectSentence
Returns a command that allows selecting the whole sentence at the caret position in a text area or a WYSIWYG editor. -
selectWord
Returns a command that allows selecting the word at the caret position in a text field, text area or a WYSIWYG editor. -
toggleBold
Returns a command that allows toggling bold style for the selected text in a WYSIWYG editor. -
toggleItalic
Returns a command that allows toggling italic style for the selected text in a WYSIWYG editor. -
toggleUnderline
Returns a command that allows toggling underline style for the selected text in a WYSIWYG editor. -
underline
Returns a command that allows underlying the selected text in a WYSIWYG editor. -
undo
Returns a command that allows reversing the last action. -
unselect
Returns a command that allows clearing the current selection in a frame. -
strikethrough
Returns a command that allows making the selected text strikethrough in a WYSIWYG editor. -
superscript
Returns a command that allows making the selected text superscript in a WYSIWYG editor. -
subscript
Returns a command that allows making the selected text subscript in a WYSIWYG editor. -
removeFormat
Returns a command that allows removing all styles of the selected text (bold, italic, etc.) in a WYSIWYG editor. -
unlink
Returns a command that allows removing the link from the text in a WYSIWYG editor. -
justifyCenter
Returns a command that allows center justification the selected text in a WYSIWYG editor. -
justifyFull
Returns a command that allows full justification the selected text in a WYSIWYG editor. -
justifyLeft
Returns a command that allows left justification the selected text in a WYSIWYG editor. -
justifyRight
Returns a command that allows right justification the selected text in a WYSIWYG editor. -
indent
Returns a command that allows making indent of the selected text in a WYSIWYG editor. -
outdent
Returns a command that allows making outdent of the selected text in a WYSIWYG editor. -
insertOrderedList
Returns a command that allows inserting an ordered list in a WYSIWYG editor. -
insertUnorderedList
Returns a command that allows inserting an unordered list in a WYSIWYG editor. -
backgroundColor
Returns a command that allows setting the given backgroundcolor
for the selected text in a WYSIWYG editor.- Parameters:
color
- a new background color
-
backgroundColor
Returns a command that allows setting the given backgroundcolorName
for the selected text in a WYSIWYG editor.- Parameters:
colorName
- a new background color name- Throws:
IllegalArgumentException
- whencolorName
is empty or blank
-
findText
Returns a command that allows searching for the giventext
occurrence from the current caret position in the frame. If match found, this command will select it and scroll down to make it visible, if needed.- Parameters:
text
- a text to search- Throws:
IllegalArgumentException
- whentext
is empty
-
fontSize
Returns a command that allows setting the givenfontSize
for the selected text in a WYSIWYG editor.- Parameters:
fontSize
- a new font size
-
fontName
Returns a command that allows setting the givenfontName
for the selected text in a WYSIWYG editor.- Parameters:
fontName
- a new font name
-
foregroundColor
Returns a command that allows setting the given foregroundcolor
for the selected text in a WYSIWYG editor.- Parameters:
color
- a new foreground color
-
foregroundColor
Returns a command that allows setting the given foregroundcolorName
for the selected text in a WYSIWYG editor.- Parameters:
colorName
- a new foreground color name- Throws:
IllegalArgumentException
- whencolorName
is empty or blank
-
insertImage
Returns a command that allows inserting an image with the givenimageSrc
in a WYSIWYG editor. If theimageSrc
points to an invalid location, then image won't be inserted.- Parameters:
imageSrc
- the value of thesrc
attribute of the IMG tag- Throws:
IllegalArgumentException
- whenimageSrc
is empty or blank
-
insertHtml
Returns a command that allows inserting the givenhtml
content in a WYSIWYG editor.- Parameters:
html
- an html content to insert.- Throws:
IllegalArgumentException
- whenhtml
is empty or blank
-
insertText
Returns a command that allows inserting the giventext
content in a WYSIWYG editor or a text field.- Parameters:
text
- a text content to insert
-
createLink
Returns a command that allows making the link to the specifiedURL
in a WYSIWYG editor.- Parameters:
url
- the value of thehref
attribute of the A tag- Throws:
IllegalArgumentException
- whenurl
is empty or blank
-
name
Returns theName
of the command. -
value
Returns a string that represents the command value.
-