public class EditorWidget extends ControlTextWidget<EditorConfig> implements EditorInterface, ReplaceInterface, MaxCharsElement, BoxInterface, ScrollbarVerticalElement, ScrollbarHorizontalElement, InnerLines, SelectableText, Hoverable
BaseEntity.CharsPixels
Modifier and Type | Field and Description |
---|---|
static int |
FIND_CASE_SENSITIVE
Find & replace flags: the search is performed in case sensitive.
|
static int |
FIND_GLOBAL
Find & replace flags.
|
static int |
FIND_NEXT_OCCURRENCE
Find & replace flags: find next occurrence from the cursor.
|
static int |
FIND_PREV_OCCURRENCE
Find & replace flags: find previous occurrence from the cursor.
|
static int |
FIND_SELECT
Find & replace flags: the occurrence is selected, otherwise the cursor is moved at its
beginning.
|
static int |
FIND_WRAP_AROUND
Find & replace flags: search loops from the beginning if the pattern is not found from the
current cursor position up to the end of the text.
|
ALIGN_COLON, ALIGN_LEFT, ALIGN_RIGHT
group
config, deleted, frame
name, nextSibling, prevSibling
instProc
Constructor and Description |
---|
EditorWidget()
Default constructor.
|
EditorWidget(boolean dynamic)
Default constructor.
|
Modifier and Type | Method and Description |
---|---|
void |
afterConfigUpdate(EditorConfig beforeUpdate)
The method is called after the configuration associated with
the implementor changes.
|
logical |
clearSelection()
Clears text selection.
|
logical |
deleteLine()
Implements the DELETE-LINE() method which deletes the line of text in which the cursor is
positioned.
|
integer |
getCursorChar()
Get the value of the CURSOR-CHAR attribute which is the current cursor position as a
1-based index on the current line.
|
integer |
getCursorLine()
Get the value of the CURSOR-LINE attribute which is the current cursor position as a
1-based line number.
|
integer |
getCursorOffset()
Obtains the index position of the cursor in a text editing widget.
|
integer |
getInnerChars()
Gets the value of the INNER-CHARS attribute which defines the number of character
columns in the widget.
|
integer |
getInnerLines()
Gets the value of the INNER-LINES attribute which defines the number of text lines
in the widget.
|
integer |
getLength()
Get the value of the LENGTH attribute
|
integer |
getMaxChars()
Get value of the MAX-CHARS attribute.
|
java.lang.String |
getMousePointerImpl()
Get the MOUSE-POINTER attribute
|
integer |
getNumLines()
Get the value of the NUM-LINES attribute which is the number of lines of text in the
editor.
|
(package private) character |
getScreenValue(boolean initialized,
BaseDataType bdt,
java.lang.String fmt,
boolean ignoreFormat)
Internal worker for getting the SCREEN-VALUE on a per-widget basis.
|
integer |
getSelectionEnd()
Get SELECTION-END attribute.
|
integer |
getSelectionStart()
Get SELECTION-START attribute.
|
character |
getSelectionText()
Get SELECTION-TEXT attribute.
|
logical |
insertFile(character file)
Attempts to insert the content of a text file at the current position of the caret.
|
logical |
insertFile(java.lang.String file)
Attempts to insert the content of a text file at the current position of the caret.
|
logical |
insertString(character txt)
Implements the INSERT-STRING() method which inserts the given text into the editor at the
location at which the cursor is positioned.
|
logical |
insertString(java.lang.String txt)
Implements the INSERT-STRING() method which inserts the given text into the editor at the
location at which the cursor is positioned.
|
private void |
invalidPosition(java.lang.String attr,
int value)
Report invalid cursor positioning attribute
|
logical |
isBox()
Get the value of the BOX attribute
|
logical |
isReturnInserted()
Get the value of the RETURN-INSERTED attribute
|
logical |
isScrollbarHorizontal()
Get the value of the SCROLLBAR-HORIZONTAL attribute which controls whether the widget must
draw the horizontal scroll-bar if the inner width is more than the visible width.
|
logical |
isScrollbarVertical()
Get value of the SCROLLBAR-VERTICAL attribute.
|
logical |
isTextSelected()
Get TEXT-SELECTED attribute.
|
logical |
isWordWrap()
Get the value of the WORD-WRAP attribute
|
logical |
moveCaretToEof()
Moves the caret position at the end of the current text
|
logical |
readFile(character name)
Implements the READ-FILE() method which replaces the editor's contents with those read
from the specified file.
|
logical |
readFile(java.lang.String name)
Implements the READ-FILE() method which replaces the editor's contents with those read
from the specified file.
|
logical |
removeSelection()
Removes the currently selected text.
|
logical |
replace(character newLabel,
BaseDataType newValue,
character oldItem)
REPLACE(character, BaseDataType, character) method and its variations
not applicable to the EDITOR widget
|
logical |
replace(character newLabel,
BaseDataType newValue,
int listIndex)
REPLACE (new-label, new-value, list-index) method for COMBO-BOX/SELECTION-LIST
|
logical |
replace(character newLabel,
BaseDataType newValue,
integer listIndex)
REPLACE (new-label, new-value, list-index) method for COMBO-BOX/SELECTION-LIST
|
logical |
replace(character newLabel,
BaseDataType newValue,
java.lang.String oldItem)
REPLACE(character, BaseDataType, character) method and its variations
not applicable to the EDITOR widget
|
logical |
replace(character from,
character to)
Implements the REPLACE() method with default FIND-NEXT-OCCURRENCE mode.
|
logical |
replace(character from,
character to,
int flag)
Implements the REPLACE() method.
|
logical |
replace(character from,
character to,
integer flag)
Implements the REPLACE() method.
|
logical |
replace(character newItemList,
int listIndex)
REPLACE(character, integer) method and its variations
not applicable to the EDITOR widget
|
logical |
replace(character newItemList,
integer listIndex)
REPLACE(character, integer) method and its variations
not applicable to the EDITOR widget
|
logical |
replace(character from,
java.lang.String to)
Implements the REPLACE() method with default FIND-NEXT-OCCURRENCE mode.
|
logical |
replace(character newLabel,
java.lang.String newValue,
character oldItem)
REPLACE(character, BaseDataType, character) method and its variations
not applicable to the EDITOR widget
|
logical |
replace(character from,
java.lang.String to,
int flag)
Implements the REPLACE() method.
|
logical |
replace(character from,
java.lang.String to,
integer flag)
Implements the REPLACE() method.
|
logical |
replace(character newLabel,
java.lang.String newValue,
java.lang.String oldItem)
REPLACE(character, BaseDataType, character) method and its variations
not applicable to the EDITOR widget
|
logical |
replace(java.lang.String newLabel,
BaseDataType newValue,
character oldItem)
REPLACE(character, BaseDataType, character) method and its variations
not applicable to the EDITOR widget
|
logical |
replace(java.lang.String newLabel,
BaseDataType newValue,
int listIndex)
REPLACE (new-label, new-value, list-index) method for COMBO-BOX/SELECTION-LIST
|
logical |
replace(java.lang.String newLabel,
BaseDataType newValue,
integer listIndex)
REPLACE (new-label, new-value, list-index) method for COMBO-BOX/SELECTION-LIST
|
logical |
replace(java.lang.String newLabel,
BaseDataType newValue,
java.lang.String oldItem)
REPLACE(character, BaseDataType, character) method and its variations
not applicable to the EDITOR widget
|
logical |
replace(java.lang.String from,
character to)
Implements the REPLACE() method with default FIND-NEXT-OCCURRENCE mode.
|
logical |
replace(java.lang.String from,
character to,
int flag)
Implements the REPLACE() method.
|
logical |
replace(java.lang.String from,
character to,
integer flag)
Implements the REPLACE() method.
|
logical |
replace(java.lang.String newItemList,
int listIndex)
REPLACE(character, integer) method and its variations
not applicable to the EDITOR widget
|
logical |
replace(java.lang.String newItemList,
integer listIndex)
REPLACE(character, integer) method and its variations
not applicable to the EDITOR widget
|
logical |
replace(java.lang.String from,
java.lang.String to)
Implements the REPLACE() method with default FIND-NEXT-OCCURRENCE mode.
|
logical |
replace(java.lang.String newLabel,
java.lang.String newValue,
character oldItem)
REPLACE(character, BaseDataType, character) method and its variations
not applicable to the EDITOR widget
|
logical |
replace(java.lang.String from,
java.lang.String to,
int flag)
Implements the REPLACE() method.
|
logical |
replace(java.lang.String from,
java.lang.String to,
integer flag)
Implements the REPLACE() method.
|
logical |
replace(java.lang.String newLabel,
java.lang.String newValue,
java.lang.String oldItem)
REPLACE(character, BaseDataType, character) method and its variations
not applicable to the EDITOR widget
|
logical |
replaceSelectionText(character txt)
Implements the REPLACE-SELECTION-TEXT() method which replaces the editor's currently
selected text with the given text.
|
logical |
replaceSelectionText(java.lang.String txt)
Implements the REPLACE-SELECTION-TEXT() method which replaces the editor's currently
selected text with the given text.
|
logical |
saveFile(character name)
Implements the SAVE-FILE() method which write the editor's contents to the specified file.
|
logical |
saveFile(java.lang.String name)
Implements the SAVE-FILE() method which write the editor's contents to the specified file.
|
logical |
search(character pattern,
int64 mode)
Searches for a specified string starting from the current text caret position.
|
logical |
search(character pattern,
long mode)
Searches for a specified string starting from the current text caret position.
|
logical |
search(java.lang.String pattern,
int64 mode)
Searches for a specified string starting from the current text caret position.
|
logical |
search(java.lang.String pattern,
long mode)
Searches for a specified string starting from the current text caret position.
|
void |
setBox(boolean value)
Set the value of the BOX attribute
|
void |
setBox(logical value)
Set the value of the BOX attribute
|
void |
setBufferChars(int chars)
Set value of the BUFFER-CHARS attribute.
|
void |
setBufferChars(NumberType chars)
Set value of the BUFFER-CHARS attribute.
|
void |
setBufferLines(int lines)
Set value of the BUFFER-LINES attribute.
|
void |
setBufferLines(NumberType lines)
Set value of the BUFFER-LINES attribute.
|
void |
setCursorChar(double idx)
Set the value of the CURSOR-CHAR attribute which moves the cursor position to the
specified 1-based index on the current line.
|
void |
setCursorChar(NumberType idx)
Set the value of the CURSOR-CHAR attribute which moves the cursor position to the
specified 1-based index on the current line.
|
void |
setCursorLine(double line)
Set the value of the CURSOR-LINE attribute which moves the cursor position to the
specified 1-based line number.
|
void |
setCursorLine(NumberType line)
Set the value of the CURSOR-LINE attribute which moves the cursor position to the
specified 1-based line number.
|
void |
setCursorOffset(double offset)
Sets the index position of the cursor in a text editing widget.
|
void |
setCursorOffset(NumberType offset)
Sets the index position of the cursor in a text editing widget.
|
protected void |
setHeightCharsWorker(double height)
The method that actually performs assignment of the HEIGHT-CHARS attribute.
|
void |
setInitialInnerLines(double lines)
Sets the value of the INNER-LINES attribute which defines the number of text lines
in the widget.
|
void |
setInnerChars(double chars)
Sets the value of the INNER-CHARS attribute which defines the number of character
columns in the widget.
|
void |
setInnerChars(NumberType chars)
Sets the value of the INNER-CHARS attribute which defines the number of character
columns in the widget.
|
void |
setInnerLines(double lines)
Sets the value of the INNER-LINES attribute which defines the number of text lines
in the widget.
|
void |
setInnerLines(NumberType lines)
Sets the value of the INNER-LINES attribute which defines the number of text lines
in the widget.
|
void |
setLarge(boolean large)
Mark this EDITOR widget as EDITOR LARGE, which can be used to display a value of type
LONGCHAR . |
void |
setMaxChars(double chars)
Set value of the MAX-CHARS attribute.
|
void |
setMaxChars(NumberType chars)
Set value of the MAX-CHARS attribute.
|
void |
setMousePointerName(java.lang.String name)
Set the MOUSE-POINTER attribute
|
void |
setNoBox(boolean box)
Set value of the BOX attribute as opposite to passed value.
|
void |
setNoBox(logical box)
Set value of the BOX attribute as opposite to passed value.
|
void |
setNoWordWrap(boolean wordwrap)
Set value of the WORD-WRAP attribute as opposite to passed value.
|
void |
setNoWordWrap(logical wordwrap)
Set value of the WORD-WRAP attribute as opposite to passed value.
|
void |
setReturnInserted(boolean value)
Set the value of the RETURN-INSERTED attribute
|
void |
setReturnInserted(logical value)
Set the value of the RETURN-INSERTED attribute
|
(package private) boolean |
setScreenValue(ScreenBuffer frameBuf,
java.lang.Object value,
boolean inUIStmt)
Internal worker for setting the SCREEN-VALUE on a per-widget basis.
|
void |
setScrollbarHorizontal(boolean horiz)
Set the value of the SCROLLBAR-HORIZONTAL attribute which controls whether the widget must
draw the horizontal scroll-bar if the inner width is more than the visible width.
|
void |
setScrollbarHorizontal(logical horiz)
Set the value of the SCROLLBAR-HORIZONTAL attribute which controls whether the widget must
draw the horizontal scroll-bar if the inner width is more than the visible width.
|
void |
setScrollbarVertical(boolean vertical)
Set value of the SCROLLBAR-VERTICAL attribute.
|
void |
setScrollbarVertical(logical vertical)
Set value of the SCROLLBAR-VERTICAL attribute.
|
logical |
setSelection(int64 start,
int end)
Selects text in a widget between start and end points.
|
logical |
setSelection(int64 start,
int64 end)
Selects text in a widget between start and end points.
|
logical |
setSelection(int start,
int end)
Selects text in a widget between start and end points.
|
logical |
setSelection(int start,
int64 end)
Selects text in a widget between start and end points.
|
protected void |
setWidthCharsWorker(double width)
The method that actually performs assignment of the WIDTH-CHARS attribute.
|
void |
setWordWrap(boolean value)
Set the value of the WORD-WRAP attribute
|
void |
setWordWrap(logical value)
Set the value of the WORD-WRAP attribute
|
isReadOnly, setAt, setAtFormatLength, setHeader, setReadOnly, setStatic
changeFontWorker, getColon, getDataClass, getDataType, getIndex, getNextTabItem, getSideLabelHandle, getTitle, hasSideLabelHandle, isAutoResize, isDropTarget, isModified, processSideLabel, resetAutoResize, setAttrSpace, setAutoResize, setAutoResize, setColumnLabel, setColumnLabel, setDataType, setDataType, setDropTarget, setForceLabel, setForceLabel, setHeightPixelsWorker, setIndex, setIndex, setModified, setModified, setNoAttrSpace, setNoLabels, setTitle, setTitle, setTo, setTo, setWidthPixelsWorker, validateFields
canSetPixelPositionInChui, getBgColor, getColumn, getDColor, getFgColor, getFont, getFrameColumn, getFrameRow, getFrameX, getFrameY, getHeightChars, getHeightPixels, getNextSibling, getParent, getParent, getPfColor, getPrevSibling, getRow, getTooltip, getValidParentTypes, getWidthChars, getWidthPixels, getX, getY, isMovable, isResizable, isSelected, isTabStop, prepareSizeChars, prepareSizePixels, setAlign, setBgColor, setBgColor, setBgColor, setColon, setColon, setColumn, setColumn, setColumnOrRow, setColumnOrRowWorker, setDColor, setDColor, setDColor, setFgColor, setFgColor, setFgColor, setFont, setGroup, setHeightChars, setHeightChars, setHeightPixels, setHeightPixels, setMaxHeightCharsWorker, setMaxHeightPixelsWorker, setMaxWidthCharsWorker, setMaxWidthPixelsWorker, setMinHeightCharsWorker, setMinHeightPixelsWorker, setMinWidthCharsWorker, setMinWidthPixelsWorker, setMovable, setMovable, setParent, setPfColor, setPfColor, setPfColor, setResizable, setResizable, setRow, setRow, setSelected, setSelected, setSizeChars, setSizePixels, setTabStop, setTabStop, setTooltip, setTooltip, setVirtHeightCharsWorker, setVirtHeightPixelsWorker, setVirtWidthCharsWorker, setVirtWidthPixelsWorker, setWidthChars, setWidthChars, setWidthPixels, setWidthPixels, setX, setX, setXOrYWorker, setY, setY, useHandleChainSiblings, validateParent, validateSize, validColumnOrRow
_dynamic, _getDbName, _getFormat, _getTable, _isEntered, _isHidden, _isNotEntered, _isRealized, _isVisible, _setDynamic, _setVisible, apply, apply, apply, apply, asWidgetHandle, canAccess, canDelete, cleanup, colorDisplay, colorPrompt, config, deselectRows, disable, dynamic, enable, finishConfigProcessing, finishSetup, getColumnFont, getColumnLabel, getContextHelpId, getConvert3D, getDbName, getFirstTabItem, getFormat, getFrame, getFrameHandle, getHelp, getHWND, getId, getLabel, getLabelFont, getLabelStr, getMaxHeightChars, getMaxWidthChars, getMenuKey, getMenuMouse, getMousePointer, getMousePosition, getNumColumns, getNumSelectedRows, getParentHandle, getPopupMenu, getPreviousTabItem, getQuery, getRetainShape, getScreenValue, getStretchToFit, getTable, getTitleFont, getTransparent, getVirtHeight, getVirtHeightPixels, getVirtWidth, getVirtWidthPixels, getWidgetId, getWindow, hasNameReadOnly, hasParent, hide, hide, implicitDeletion, inputValue, isChained, isChecked, isEntered, isFocusedRowSelected, isHidden, isKeepFrameZOrder, isManualHighlight, isMultiple, isNotEntered, isScrollable, isSelectable, isSelected, isSelected, isSensitive, isThreeD, isValidatable, isVisible, labelSizeCheck, loadImage, loadImage, loadImage, loadImage, loadImage, loadImage, loadImage, loadImage, loadImage, loadImage, loadMousePointer, loadMousePointer, moveAfterTab, moveAfterTab, moveBeforeTabItem, moveBeforeTabItem, moveToBottom, moveToTop, moveToWorker, name, notQueryable, notSettable, notWorker, preRealizeCheck, pushScreenDefinition, readOnlyError, realize, refresh, resourceDelete, selectAll, selectFocusedRow, setAutoReturn, setBlank, setChecked, setChecked, setColumnFont, setColumnFont, setContextHelpId, setContextHelpId, setConvert3D, setConvert3D, setDbname, setDeblank, setDisableAutoZap, setFirstTabItem, setFont, setFormat, setFormat, setFrame, setFrame, setFrame, setFrameHandle, setFrameHandle, setFrameHandle, setHelp, setHelp, setHelpDefault, setHelpStatic, setHidden, setHidden, setId, setKeepFrameZOrder, setKeepFrameZOrder, setLabel, setLabel, setLabelFont, setLabelFont, setLabelInt, setManualHighlight, setManualHighlight, setMaxHeightChars, setMaxWidthChars, setMenuKey, setMenuKey, setMenuMouse, setMenuMouse, setMultiple, setMultiple, setNextTabItem, setNoAutoValidate, setNumSelectedRows, setParentHandle, setParentHandle, setPopupMenu, setPopupMenu, setQuery, setRetainShape, setRetainShape, setScreenLock, setScreenValue, setScrollable, setScrollable, setSelectable, setSelectable, setSensitive, setSensitive, setSensitive, setSensitive, setSideLabelHandle, setStretchToFit, setStretchToFit, setTable, setThreeD, setThreeD, setTitleFont, setTitleFont, setTransparent, setTransparent, setValidation, setValidation, setVertical, setVirtHeight, setVirtHeightPixels, setVirtWidth, setVirtWidthPixels, setVisible, setVisible, setWidgetId, setWidgetId, truncatePixelSize, underline, underline, valid, validate, validateFields, validateFields, validateFields, validateLayout, view, widgetName
delete, firstResource, firstResource, getHead, getNextSibling, getPrevSibling, getPrivateData, getTail, hasName, hasNextSibling, hasPrevSibling, hasPrivateData, interlink, lastResource, lastResource, name, name, setHead, setNextSibling, setNextSibling, setPrevSibling, setPrevSibling, setPrivateData, setPrivateData, setPrivateData
getResourceType, id, id, instantiatingProcedure, invalidAttribute, setInstantiatingProcedure, type, unknown
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
replace, replace, replace, replace, replace, replace, replace, replace
endFileDrop, getDroppedFile, getDroppedFile, getNumDroppedFiles, setDropTarget
setScreenValue
getPrivateData, setPrivateData, setPrivateData
getResourceType
id, id, unknown
public static final int FIND_NEXT_OCCURRENCE
public static final int FIND_PREV_OCCURRENCE
public static final int FIND_CASE_SENSITIVE
public static final int FIND_GLOBAL
public static final int FIND_WRAP_AROUND
public static final int FIND_SELECT
public EditorWidget()
public EditorWidget(boolean dynamic)
dynamic
- Flag indicating if this is a static or dynamic resource.public void setLarge(boolean large)
LONGCHAR
.large
- When true
, this is a EDITOR LARGE widget.public integer getInnerLines()
getInnerLines
in interface InnerLines
public void setInitialInnerLines(double lines)
setInitialInnerLines
in interface InnerLines
lines
- The new number of lines.public void setInnerLines(double lines)
setInnerLines
in interface InnerLines
lines
- The new number of lines.public void setInnerLines(NumberType lines)
setInnerLines
in interface InnerLines
lines
- The new number of lines.public integer getInnerChars()
getInnerChars
in interface ScrollbarHorizontalElement
public void setInnerChars(double chars)
setInnerChars
in interface ScrollbarHorizontalElement
chars
- The new value for the attribute.public void setInnerChars(NumberType chars)
setInnerChars
in interface ScrollbarHorizontalElement
chars
- The new value for the attribute.public void setMaxChars(double chars)
setMaxChars
in interface MaxCharsElement
chars
- The new value for the attribute.public void setMaxChars(NumberType chars)
setMaxChars
in interface MaxCharsElement
chars
- The new value for the attribute.public integer getMaxChars()
getMaxChars
in interface MaxCharsElement
public void setBufferChars(int chars)
chars
- The new value for the attribute.public void setBufferChars(NumberType chars)
chars
- The new value for the attribute.public void setBufferLines(int lines)
lines
- The new value for the attribute.public void setBufferLines(NumberType lines)
lines
- The new value for the attribute.public void setNoBox(boolean box)
box
- The new value for the attribute.public void setNoBox(logical box)
box
- The new value for the attribute.public void setNoWordWrap(boolean wordwrap)
wordwrap
- The new value for the attribute.public void setNoWordWrap(logical wordwrap)
wordwrap
- The new value for the attribute.public void setScrollbarVertical(boolean vertical)
setScrollbarVertical
in interface ScrollbarVerticalElement
vertical
- The new value for the attribute.public void setScrollbarVertical(logical vertical)
setScrollbarVertical
in interface ScrollbarVerticalElement
vertical
- The new value for the attribute.public logical isScrollbarVertical()
isScrollbarVertical
in interface ScrollbarVerticalElement
public logical isScrollbarHorizontal()
isScrollbarHorizontal
in interface ScrollbarHorizontalElement
public void setScrollbarHorizontal(logical horiz)
setScrollbarHorizontal
in interface ScrollbarHorizontalElement
horiz
- The new value for the attribute.public void setScrollbarHorizontal(boolean horiz)
setScrollbarHorizontal
in interface ScrollbarHorizontalElement
horiz
- The new value for the attribute.public logical setSelection(int64 start, int64 end)
setSelection
in interface SelectableText
start
- Starting offset.end
- Ending offset.true
if the operation succeeded.public logical setSelection(int64 start, int end)
setSelection
in interface SelectableText
start
- Starting offset.end
- Ending offset.true
if the operation succeeded.public logical setSelection(int start, int64 end)
setSelection
in interface SelectableText
start
- Starting offset.end
- Ending offset.true
if the operation succeeded.public logical setSelection(int start, int end)
setSelection
in interface SelectableText
start
- Starting offset.end
- Ending offset.true
if the operation succeeded.public logical clearSelection()
clearSelection
in interface SelectableText
public logical removeSelection()
removeSelection
in interface SelectableText
yes
.public logical deleteLine()
deleteLine
in interface EditorInterface
true
if the line was deleted.public logical insertString(character txt)
insertString
in interface EditorInterface
txt
- The text to be inserted.true
if the text was inserted.public logical insertString(java.lang.String txt)
insertString
in interface EditorInterface
txt
- The text to be inserted.true
if the text was inserted.public logical readFile(character name)
readFile
in interface EditorInterface
name
- The relative or absolute file name.true
if the file was successfully read.public logical readFile(java.lang.String name)
readFile
in interface EditorInterface
name
- The relative or absolute file name.true
if the file was successfully read.public logical replaceSelectionText(character txt)
replaceSelectionText
in interface EditorInterface
txt
- The replacement text.true
if the text was successfully replaced.public logical replaceSelectionText(java.lang.String txt)
replaceSelectionText
in interface EditorInterface
txt
- The replacement text.true
if the text was successfully replaced.public logical saveFile(java.lang.String name)
saveFile
in interface EditorInterface
name
- The relative or absolute file name.true
if the file was successfully written.public logical saveFile(character name)
saveFile
in interface EditorInterface
name
- The relative or absolute file name.true
if the file was successfully written.public integer getCursorChar()
getCursorChar
in interface EditorInterface
public void setCursorChar(double idx)
setCursorChar
in interface EditorInterface
idx
- The 1-based position to which to move.public void setCursorChar(NumberType idx)
setCursorChar
in interface EditorInterface
idx
- The 1-based position to which to move.public integer getCursorLine()
getCursorLine
in interface EditorInterface
public void setCursorLine(double line)
setCursorLine
in interface EditorInterface
line
- The line to which to move.public void setCursorLine(NumberType line)
setCursorLine
in interface EditorInterface
line
- The line to which to move.public integer getCursorOffset()
getCursorOffset
in interface CommonWidget
getCursorOffset
in class GenericWidget<EditorConfig>
public void setCursorOffset(double offset)
setCursorOffset
in interface CommonWidget
setCursorOffset
in class GenericWidget<EditorConfig>
offset
- The character index at which the cursor is to be placed.public void setCursorOffset(NumberType offset)
setCursorOffset
in interface CommonWidget
setCursorOffset
in class GenericWidget<EditorConfig>
offset
- The character index at which the cursor is to be placed.public integer getNumLines()
getNumLines
in interface EditorInterface
protected void setHeightCharsWorker(double height)
setHeightCharsWorker
in class ControlEntity<EditorConfig>
height
- The attribute value.protected void setWidthCharsWorker(double width)
setWidthCharsWorker
in class ControlEntity<EditorConfig>
width
- The attribute value.public logical isReturnInserted()
isReturnInserted
in interface EditorInterface
public void setReturnInserted(logical value)
setReturnInserted
in interface EditorInterface
value
- the new value of the attributepublic void setReturnInserted(boolean value)
setReturnInserted
in interface EditorInterface
value
- the new value of the attributepublic logical isWordWrap()
isWordWrap
in interface EditorInterface
public void setWordWrap(logical value)
setWordWrap
in interface EditorInterface
value
- the new value of the attributepublic void setWordWrap(boolean value)
setWordWrap
in interface EditorInterface
value
- the new value of the attributepublic logical isBox()
isBox
in interface BoxInterface
public void setBox(logical value)
setBox
in interface BoxInterface
value
- the new value of the attributepublic void setBox(boolean value)
setBox
in interface BoxInterface
value
- the new value of the attributepublic integer getLength()
getLength
in interface EditorInterface
public character getSelectionText()
getSelectionText
in interface SelectableText
public integer getSelectionEnd()
getSelectionEnd
in interface SelectableText
public integer getSelectionStart()
getSelectionStart
in interface SelectableText
public logical isTextSelected()
isTextSelected
in interface SelectableText
isTextSelected
in class GenericWidget<EditorConfig>
public logical replace(character from, character to, integer flag)
replace
in interface ReplaceInterface
from
- The source text.to
- The replacement text.flag
- The type of search to be performed..true
if the text was successfully replaced.public logical replace(java.lang.String from, character to, integer flag)
replace
in interface ReplaceInterface
from
- The source text.to
- The replacement text.flag
- The type of search to be performed..true
if the text was successfully replaced.public logical replace(character from, java.lang.String to, integer flag)
replace
in interface ReplaceInterface
from
- The source text.to
- The replacement text.flag
- The type of search to be performed..true
if the text was successfully replaced.public logical replace(character from, character to, int flag)
replace
in interface ReplaceInterface
from
- The source text.to
- The replacement text.flag
- The type of search to be performed..true
if the text was successfully replaced.public logical replace(java.lang.String from, character to, int flag)
replace
in interface ReplaceInterface
from
- The source text.to
- The replacement text.flag
- The type of search to be performed..true
if the text was successfully replaced.public logical replace(character from, java.lang.String to, int flag)
replace
in interface ReplaceInterface
from
- The source text.to
- The replacement text.flag
- The type of search to be performed..true
if the text was successfully replaced.public logical replace(java.lang.String from, java.lang.String to, integer flag)
replace
in interface ReplaceInterface
from
- The source text.to
- The replacement text.flag
- The type of search to be performed..true
if the text was successfully replaced.public logical replace(java.lang.String from, java.lang.String to, int flag)
replace
in interface ReplaceInterface
from
- The source text.to
- The replacement text.flag
- The type of search to be performed..true
if the text was successfully replaced.public logical replace(character from, character to)
replace
in interface ReplaceInterface
from
- The source text.to
- The replacement text.true
if the text was successfully replaced.public logical replace(character from, java.lang.String to)
replace
in interface ReplaceInterface
from
- The source text.to
- The replacement text.true
if the text was successfully replaced.public logical replace(java.lang.String from, character to)
replace
in interface ReplaceInterface
from
- The source text.to
- The replacement text.true
if the text was successfully replaced.public logical replace(java.lang.String from, java.lang.String to)
replace
in interface ReplaceInterface
from
- The source text.to
- The replacement text.true
if the text was successfully replaced.public logical replace(character newItemList, integer listIndex)
replace
in interface ReplaceInterface
newItemList
- new item listlistIndex
- old item's indextrue
if the operation was successful.public logical replace(character newItemList, int listIndex)
replace
in interface ReplaceInterface
newItemList
- new item listlistIndex
- old item's indextrue
if the operation was successful.public logical replace(java.lang.String newItemList, integer listIndex)
replace
in interface ReplaceInterface
newItemList
- new item listlistIndex
- old item's indextrue
if the operation was successful.public logical replace(java.lang.String newItemList, int listIndex)
replace
in interface ReplaceInterface
newItemList
- new item listlistIndex
- old item's indextrue
if the operation was successful.public logical replace(character newLabel, BaseDataType newValue, character oldItem)
replace
in interface ReplaceInterface
newLabel
- new item's labelnewValue
- new item's valueoldItem
- oldItem (old-label for the READIO-SET, and list-item for the
COMBO-BOX/SELECTION-LIST)true
if the operation was successful.public logical replace(java.lang.String newLabel, BaseDataType newValue, character oldItem)
replace
in interface ReplaceInterface
newLabel
- new item's labelnewValue
- new item's valueoldItem
- oldItem (old-label for the READIO-SET, and list-item for the
COMBO-BOX/SELECTION-LIST)true
if the operation was successful.public logical replace(character newLabel, java.lang.String newValue, character oldItem)
replace
in interface ReplaceInterface
newLabel
- new item's labelnewValue
- new item's valueoldItem
- oldItem (old-label for the READIO-SET, and list-item for the
COMBO-BOX/SELECTION-LIST)true
if the operation was successful.public logical replace(java.lang.String newLabel, java.lang.String newValue, character oldItem)
replace
in interface ReplaceInterface
newLabel
- new item's labelnewValue
- new item's valueoldItem
- oldItem (old-label for the READIO-SET, and list-item for the
COMBO-BOX/SELECTION-LIST)true
if the operation was successful.public logical replace(character newLabel, BaseDataType newValue, java.lang.String oldItem)
replace
in interface ReplaceInterface
newLabel
- new item's labelnewValue
- new item's valueoldItem
- oldItem (old-label for the READIO-SET, and list-item for the
COMBO-BOX/SELECTION-LIST)true
if the operation was successful.public logical replace(java.lang.String newLabel, BaseDataType newValue, java.lang.String oldItem)
replace
in interface ReplaceInterface
newLabel
- new item's labelnewValue
- new item's valueoldItem
- oldItem (old-label for the READIO-SET, and list-item for the
COMBO-BOX/SELECTION-LIST)true
if the operation was successful.public logical replace(character newLabel, java.lang.String newValue, java.lang.String oldItem)
replace
in interface ReplaceInterface
newLabel
- new item's labelnewValue
- new item's valueoldItem
- oldItem (old-label for the READIO-SET, and list-item for the
COMBO-BOX/SELECTION-LIST)true
if the operation was successful.public logical replace(java.lang.String newLabel, java.lang.String newValue, java.lang.String oldItem)
replace
in interface ReplaceInterface
newLabel
- new item's labelnewValue
- new item's valueoldItem
- oldItem (old-label for the READIO-SET, and list-item for the
COMBO-BOX/SELECTION-LIST)true
if the operation was successful.public logical replace(character newLabel, BaseDataType newValue, integer listIndex)
replace
in interface ReplaceInterface
newLabel
- new item's labelnewValue
- new item's valuelistIndex
- index of the item to be replacedtrue
if the operation was successful.public logical replace(java.lang.String newLabel, BaseDataType newValue, integer listIndex)
replace
in interface ReplaceInterface
newLabel
- new item's labelnewValue
- new item's valuelistIndex
- index of the item to be replacedtrue
if the operation was successful.public logical replace(character newLabel, BaseDataType newValue, int listIndex)
replace
in interface ReplaceInterface
newLabel
- new item's labelnewValue
- new item's valuelistIndex
- index of the item to be replacedtrue
if the operation was successful.public logical replace(java.lang.String newLabel, BaseDataType newValue, int listIndex)
replace
in interface ReplaceInterface
newLabel
- new item's labelnewValue
- new item's valuelistIndex
- index of the item to be replacedtrue
if the operation was successful.private void invalidPosition(java.lang.String attr, int value)
attr
- attribute namevalue
- attribute valuepublic void afterConfigUpdate(EditorConfig beforeUpdate)
afterConfigUpdate
in interface ConfigOwner<EditorConfig>
afterConfigUpdate
in class ControlTextWidget<EditorConfig>
beforeUpdate
- public void setMousePointerName(java.lang.String name)
setMousePointerName
in interface Hoverable
name
- the attribute valuepublic java.lang.String getMousePointerImpl()
getMousePointerImpl
in interface Hoverable
character getScreenValue(boolean initialized, BaseDataType bdt, java.lang.String fmt, boolean ignoreFormat)
getScreenValue
in class GenericWidget<EditorConfig>
initialized
- Flag indicating if the widget is realized or not.bdt
- The current value in the frame's buffer.fmt
- The format to be applied, in case this is a formatted value.ignoreFormat
- Flag indicating if the format needs to be ignored.boolean setScreenValue(ScreenBuffer frameBuf, java.lang.Object value, boolean inUIStmt)
setScreenValue
in class GenericWidget<EditorConfig>
frameBuf
- The frame buffer where to save the value.value
- The value to be set via SCREEN-VALUE attribute.inUIStmt
- Flag indicating this call originates from a UI statement.true
if the caller can proceed, as the screen-value can be set.public logical insertFile(java.lang.String file)
insertFile
in interface EditorInterface
file
- The file whose content should be inserted. Full or relative path may be used. In
latter case, the PROPATH
is used to find the file.yes
.public logical insertFile(character file)
insertFile
in interface EditorInterface
file
- The file whose content should be inserted. Full or relative path may be used. In
latter case, the PROPATH
is used to find the file.yes
.public logical search(java.lang.String pattern, long mode)
search
in interface EditorInterface
pattern
- The string to be search. No wildcard allowed.mode
- a combinations of flags that specifies the type of search to be performed. The
following values are accepted:
Type of search | Flag value |
---|---|
FIND-NEXT-OCCURRENCE | 1 |
FIND-PREV-OCCURRENCE | 2 |
FIND-CASE-SENSITIVE | 4 |
FIND-WRAP-AROUND | 16 |
FIND-SELECT | 32 |
yes
.public logical search(character pattern, long mode)
search
in interface EditorInterface
pattern
- The string to be search. No wildcard allowed.mode
- a combinations of flags that specifies the type of search to be performed. The
following values are accepted:
Type of search | Flag value |
---|---|
FIND-NEXT-OCCURRENCE | 1 |
FIND-PREV-OCCURRENCE | 2 |
FIND-CASE-SENSITIVE | 4 |
FIND-WRAP-AROUND | 16 |
FIND-SELECT | 32 |
yes
.public logical search(java.lang.String pattern, int64 mode)
search
in interface EditorInterface
pattern
- The string to be search. No wildcard allowed.mode
- a combinations of flags that specifies the type of search to be performed. The
following values are accepted:
Type of search | Flag value |
---|---|
FIND-NEXT-OCCURRENCE | 1 |
FIND-PREV-OCCURRENCE | 2 |
FIND-CASE-SENSITIVE | 4 |
FIND-WRAP-AROUND | 16 |
FIND-SELECT | 32 |
yes
.public logical search(character pattern, int64 mode)
search
in interface EditorInterface
pattern
- The string to be search. No wildcard allowed.mode
- a combinations of flags that specifies the type of search to be performed. The
following values are accepted:
Type of search | Flag value |
---|---|
FIND-NEXT-OCCURRENCE | 1 |
FIND-PREV-OCCURRENCE | 2 |
FIND-CASE-SENSITIVE | 4 |
FIND-WRAP-AROUND | 16 |
FIND-SELECT | 32 |
yes
.public logical moveCaretToEof()
moveCaretToEof
in interface EditorInterface
yes
.