Class DITAMapTreeComponentProvider
java.lang.Object
ro.sync.ecss.extensions.api.component.InternalComponentProvider
ro.sync.ecss.extensions.api.component.ditamap.DITAMapTreeComponentProvider
- All Implemented Interfaces:
ComponentProvider
@API(type=NOT_EXTENDABLE,
src=PRIVATE)
public class DITAMapTreeComponentProvider
extends ro.sync.ecss.extensions.api.component.InternalComponentProvider
implements ComponentProvider
A component encapsulating editing a DITA Map in a DITA Maps Manager tree-like structure.
- Since:
- 14
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected booleanTrue if the detection finishedprotected static final ro.sync.i18n.MessageBundleThe messages resource bundle. -
Constructor Summary
ConstructorsConstructorDescriptionDITAMapTreeComponentProvider(ro.sync.exml.workspace.impl.component.DITAMapComponentEditorManager parentEditorManager, ro.sync.exml.editor.EditorManager mainFileOpener, Frame parentFrame) Constructor. -
Method Summary
Modifier and TypeMethodDescriptionvoidAdds a component listener.Create a reader over the editor's current page contentGet the page access used to perform various operations on the DITA Map tree.Deprecated.Please use instead the method getDITAAccess().getActionsProvider().getActions().Get the main editor panel.ro.sync.exml.editor.AbstractEditorGet the status panel which shows the status of the edited document.Get the access to the WS Editor.booleanvoidSets the content to edit.voidprint(boolean preview) Print the DITA Map component content.voidRemoves a component listener.voidsave()Save the content back to the original URL from where it was loaded using the internal support.voidsetEditorPopUpCustomizer(DITAMapPopupMenuCustomizer popUpCustomizer) The Pop-up customizer can be used to add/remove actions from the pop-up menu in the DITA Map tree editor before showing it.voidsetModified(boolean modified) Sets the modified status.
-
Field Details
-
messages
protected static final ro.sync.i18n.MessageBundle messagesThe messages resource bundle. -
detectionFinished
protected boolean detectionFinishedTrue if the detection finished
-
-
Constructor Details
-
DITAMapTreeComponentProvider
public DITAMapTreeComponentProvider(ro.sync.exml.workspace.impl.component.DITAMapComponentEditorManager parentEditorManager, ro.sync.exml.editor.EditorManager mainFileOpener, Frame parentFrame) throws AuthorComponentException Constructor.- Parameters:
parentEditorManager- The parent editor managermainFileOpener- The main file openerparentFrame- The parent frame.- Throws:
AuthorComponentException
-
-
Method Details
-
save
public void save()Save the content back to the original URL from where it was loaded using the internal support. Useful only when you provide an initial URL from which the component is loaded. -
load
Sets the content to edit.This does not guarantee that the set content has been interpreted, you should set an
AuthorComponentListenerand listen fordocumentTypeChanged()before using the author extension actions.- Specified by:
loadin interfaceComponentProvider- Parameters:
url- URL to load, can benullif the reader is specified If no XML content reader is given, the URL will be used both to obtain the content and to solve relative references (eg: images). If the XML content reader is also given, the URL will only be used to solve relative references from the file.reader- The reader.- Throws:
AuthorComponentException- When there was a load problem (eg: IOException).
-
createReader
Create a reader over the editor's current page content- Returns:
- The reader over the current page's content
-
addDITAMapTreeComponentListener
Adds a component listener.- Parameters:
listener- The listener.
-
removeAuthorComponentListener
Removes a component listener.- Parameters:
listener- The listener.
-
getEditorComponent
Description copied from interface:ComponentProviderGet the main editor panel.- Specified by:
getEditorComponentin interfaceComponentProvider- Returns:
- The editor panel.
-
getStatusComponent
Description copied from interface:ComponentProviderGet the status panel which shows the status of the edited document.- Specified by:
getStatusComponentin interfaceComponentProvider- Returns:
- The status panel.
-
getDITACommonActions
Deprecated.Please use instead the method getDITAAccess().getActionsProvider().getActions().Get the map of DITA Map common actions (undo, redo, cut, copy, paste, etc).- Returns:
- The map with (action id, AbstractAction) pairs with the actions defined for working in the DITA Map.
-
isModified
public boolean isModified()- Returns:
trueif the component is modified.
-
setModified
public void setModified(boolean modified) Sets the modified status.- Parameters:
modified-trueto flag as modified.
-
getWSEditorAccess
Get the access to the WS Editor.- Specified by:
getWSEditorAccessin interfaceComponentProvider- Returns:
- The editor access.
-
getEditorKey
public ro.sync.exml.editor.AbstractEditor getEditorKey()- Specified by:
getEditorKeyin classro.sync.ecss.extensions.api.component.InternalComponentProvider- Returns:
- The editor.
-
getDITAAccess
Get the page access used to perform various operations on the DITA Map tree.- Returns:
- The page access.
-
setEditorPopUpCustomizer
The Pop-up customizer can be used to add/remove actions from the pop-up menu in the DITA Map tree editor before showing it. If everything is removed then the menu will not be shown.- Parameters:
popUpCustomizer- The pop Up Customizer.
-
print
public void print(boolean preview) Print the DITA Map component content. Shows the Print dialog.- Specified by:
printin interfaceComponentProvider- Parameters:
preview-trueto show the Print Preview dialog,falseto show the Print dialog.
-