@API(type=NOT_EXTENDABLE, src=PUBLIC) public interface WSEditor extends WSEditorBase, EditorPageConstants
HIGHLIGHT_CLASS_DEBUGGER_CONTEXT, PAGE_AUTHOR, PAGE_DESIGN, PAGE_DITA_MAP, PAGE_GRID, PAGE_TEXT, PAGE_UNKNOWN
Modifier and Type | Method and Description |
---|---|
void |
addEditorListener(WSEditorListener editorListener)
Add a listener for editor related events.
|
void |
addPageChangedListener(WSEditorPageChangedListener pageChangedListener)
Add a listener for page changed events.
|
void |
addValidationProblemsFilter(ValidationProblemsFilter validationProblemsFilter)
Add a filter for problems encountered during validation of the current editor.
|
void |
changePage(java.lang.String pageID)
Change the current selected page in the editor.
|
boolean |
checkValid()
Check if the current editor is valid, performs manual validation and returns
true if the last validation was finished without errors or warnings. |
boolean |
checkValid(boolean automatic)
Check if the current editor is valid, performs manual validation and returns
true if the last validation was finished without errors or warnings. |
java.lang.Object |
getComponent()
Get the internal component (Swing or SWT based) which represents the editor (the editor in its turn has multiple pages, each with its subcomponent).
|
WSEditorPage |
getCurrentPage()
Get access to the current page.
|
java.lang.String |
getCurrentPageID()
Get the ID of the current page.
|
WSEditorListener[] |
getEditorListeners()
Get a list with all editor listeners, never
null . |
boolean |
isEditable()
Check if the document can be edited.
|
void |
removeEditorListener(WSEditorListener editorListener)
Remove the listener for editor events.
|
void |
removePageChangedListener(WSEditorPageChangedListener pageChangedListener)
Remove the listener for page changed events.
|
void |
removeValidationProblemsFilter(ValidationProblemsFilter validationProblemsFilter)
Remove a filter for problems encountered during validation of the current editor.
|
void |
setEditable(boolean editable)
Sets the specified flag to indicate whether or not this opened editor should be editable.
|
close, createContentInputStream, createContentReader, getDocumentTypeInformation, getEditorLocation, getEncodingForSerialization, isNewDocument, reloadContent, reloadContent, save, saveAs, setEditorTabText, setEditorTabTooltipText, setModified
isModified
runTransformationScenarios
WSEditorPage getCurrentPage()
WSTextEditorPage
.
If the Text page is for an XML Editor, this return an implementation of WSXMLTextEditorPage
.
WSAuthorEditorPage
.
java.lang.String getCurrentPageID()
EditorPageConstants.PAGE_TEXT
, EditorPageConstants.PAGE_AUTHOR
, EditorPageConstants.PAGE_GRID
,
EditorPageConstants.PAGE_DESIGN
, EditorPageConstants.PAGE_DITA_MAP
void addPageChangedListener(WSEditorPageChangedListener pageChangedListener)
pageChangedListener
- The page changed listener.
void removePageChangedListener(WSEditorPageChangedListener pageChangedListener)
pageChangedListener
- The page changed listener.
void addEditorListener(WSEditorListener editorListener)
editorListener
- The editor listener.WSEditorListener[] getEditorListeners()
null
.null
.void removeEditorListener(WSEditorListener editorListener)
editorListener
- The editor listener.void changePage(java.lang.String pageID)
pageID
- The ID of the page, one of the constant fields:
EditorPageConstants.PAGE_TEXT
, EditorPageConstants.PAGE_AUTHOR
, EditorPageConstants.PAGE_GRID
,
EditorPageConstants.PAGE_DESIGN
void addValidationProblemsFilter(ValidationProblemsFilter validationProblemsFilter)
validationProblemsFilter
- a filter for problems encountered during validation of the current editor.void removeValidationProblemsFilter(ValidationProblemsFilter validationProblemsFilter)
validationProblemsFilter
- a filter for problems encountered during validation of the current editor.boolean checkValid()
true
if the last validation was finished without errors or warnings.
For document types which do not support validation, this returns always true
.
If you want to see the problems reported by the validation process you can add a validation problems filter addValidationProblemsFilter(ValidationProblemsFilter)
.true
if right now no error is reported on the editor content.boolean checkValid(boolean automatic)
true
if the last validation was finished without errors or warnings.
For document types which do not support validation, this returns always true
.
If you want to see the problems reported by the validation process you can add a validation problems filter addValidationProblemsFilter(ValidationProblemsFilter)
.automatic
- true
If Oxygen performs automatic validation (identical with the validation performed when the document is modified)
or false
if Oxygen should perform manual validation (identical to the validation made when you press the Validate toolbar action).true
if right now no error is reported on the editor content.java.lang.Object getComponent()
void setEditable(boolean editable)
editable
- true
if the editor should be editable.boolean isEditable()
setEditable(boolean)
method.true
if the document is editable.© Copyright Syncro Soft SRL 2002 - 2019. All rights reserved.