Class RXBuild.UI.RXEditor
The RXBuild.UI.RXEditor Is the main controller class for things related to editing a regular expression
Defined in: ui_regex_editor.js.
Constructor Attributes | Constructor Name and Description |
---|---|
RXBuild.UI.RXEditor(containerDiv, headerDiv, textBox, sampleInputTextBox)
Creates a new instance of RXBuild.UI.RXEditor
|
Field Attributes | Field Name and Description |
---|---|
The html dom element that will parent the main pane of the editor
|
|
The html dom element that will parent toolbar items of the editor
|
|
An event that is fired when it is appropriate for an auto-refresh
|
|
An event that is fired immediately when the user changes the regexp
|
|
An event that is fired immediately when the regexp is no longer valid
|
|
The html dom element that lets the user edit the pattern input text
|
|
The html dom element that is the actual pattern text editor
|
Method Attributes | Method Name and Description |
---|---|
getInput()
Reads the UI and returns the current sample input text
|
|
getRX()
Reads the UI and returns an equivalent RXBuild.RegExp instance
|
|
initUI()
Initialises the whole user interface
|
|
insertIntoRegexp(str)
Inserts the provided string into the regular expression at the current cursor position, overwriting the selection if any,
and selecting the insertion (in some browsers apparently)
|
|
Updates the caret position display div (positioning and content)
|
Class Detail
RXBuild.UI.RXEditor(containerDiv, headerDiv, textBox, sampleInputTextBox)
Creates a new instance of RXBuild.UI.RXEditor
- Parameters:
- {String|HTMLElement} containerDiv
- The id or dom element that will parent the main pane of the editor
- {String|HTMLElement} headerDiv
- The id or dom element that will parent toolbar items of the editor
- {String|HTMLElement} textBox
- The id or html dom element that is the actual pattern text editor
- {String|HTMLElement} sampleInputTextBox
- The id or html dom element that lets the user edit the pattern input text
Field Detail
{HTMLElement}
container
The html dom element that will parent the main pane of the editor
{HTMLElement}
header
The html dom element that will parent toolbar items of the editor
{YAHOO.util.CustomEvent}
onRegExpApplyChanges
An event that is fired when it is appropriate for an auto-refresh
{YAHOO.util.CustomEvent}
onRegExpChanged
An event that is fired immediately when the user changes the regexp
{YAHOO.util.CustomEvent}
onRegExpInvalidated
An event that is fired immediately when the regexp is no longer valid
{HTMLElement}
sampleInputTextBox
The html dom element that lets the user edit the pattern input text
{HTMLElement}
textBox
The html dom element that is the actual pattern text editor
Method Detail
explainRegexp()
{String}
getInput()
Reads the UI and returns the current sample input text
- Returns:
- {String} The current sample input text
{RXBuild.RegExp}
getRX()
Reads the UI and returns an equivalent RXBuild.RegExp instance
- Returns:
- {RXBuild.RegExp} A object describing the expression being edited
initUI()
Initialises the whole user interface
insertIntoRegexp(str)
Inserts the provided string into the regular expression at the current cursor position, overwriting the selection if any,
and selecting the insertion (in some browsers apparently)
- Parameters:
- {String} str
- The text to insert as-is into the regular expression
updateCaretPositionDisplay()
Updates the caret position display div (positioning and content)