Oxygen XML Editor 14.2 Author API

ro.sync.ecss.extensions.api.component.ditamap
Class DITAMapTreeComponentProvider

java.lang.Object
  extended by ro.sync.ecss.extensions.api.component.InternalComponentProvider
      extended by ro.sync.ecss.extensions.api.component.ditamap.DITAMapTreeComponentProvider

@API(type=NOT_EXTENDABLE,
     src=PRIVATE)
public class DITAMapTreeComponentProvider
extends InternalComponentProvider

A component encapsulating editing a DITA Map in a DITA Maps Manager tree-like structure.

Since:
14

*********************************
EXPERIMENTAL - Subject to change
********************************

Please note that this API is not marked as final and it can change in one of the next versions of the application. If you have suggestions, comments about it, please let us know.


Field Summary
protected  boolean detectionFinished
          True if the detection finished
 
Constructor Summary
DITAMapTreeComponentProvider(DITAMapComponentEditorManager parentEditorManager, ro.sync.exml.editor.EditorManager mainFileOpener, java.awt.Frame parentFrame)
          Constructor.
 
Method Summary
 void addDITAMapTreeComponentListener(DITAMapTreeComponentListener listener)
          Adds a component listener.
 java.io.Reader createReader()
          Create a reader over the editor's current page content
 WSDITAMapEditorPage getDITAAccess()
          Get the page access used to perform various operations on the DITA Map tree.
 java.util.Map<java.lang.String,javax.swing.AbstractAction> getDITACommonActions()
          Get the map of DITA Map common actions (undo, redo, cut, copy, paste, etc).
 java.awt.Component getEditorComponent()
           
protected  ro.sync.exml.editor.AbstractEditor getEditorKey()
           
 java.awt.Component getStatusComponent()
           
 WSEditor getWSEditorAccess()
          Get the access to the WS Editor.
 boolean isModified()
           
 void load(java.net.URL url, java.io.Reader reader)
          Sets the content to edit.
 void print(boolean preview)
          Print the DITA Map component content.
 void removeAuthorComponentListener(DITAMapTreeComponentListener listener)
          Removes a component listener.
 void save()
          Save the content back to the original URL from where it was loaded using the internal support.
 void setEditorPopUpCustomizer(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.
 void setModified(boolean modified)
          Sets the modified status.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

detectionFinished

protected boolean detectionFinished
True if the detection finished

Constructor Detail

DITAMapTreeComponentProvider

public DITAMapTreeComponentProvider(DITAMapComponentEditorManager parentEditorManager,
                                    ro.sync.exml.editor.EditorManager mainFileOpener,
                                    java.awt.Frame parentFrame)
                             throws AuthorComponentException
Constructor.

Parameters:
parentEditorManager - The parent editor manager
mainFileOpener - The main file opener
parentFrame - The parent frame.
Throws:
AuthorComponentException
Method Detail

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

public void load(java.net.URL url,
                 java.io.Reader reader)
          throws AuthorComponentException
Sets the content to edit.

This does not guarantee that the set content has been interpreted, you should set an AuthorComponentListener and listen for documentTypeChanged() before using the author extension actions.

Parameters:
url - URL to load, can be null if 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

public java.io.Reader createReader()
Create a reader over the editor's current page content

Returns:
The reader over the current page's content

addDITAMapTreeComponentListener

public void addDITAMapTreeComponentListener(DITAMapTreeComponentListener listener)
Adds a component listener.

Parameters:
listener - The listener.

removeAuthorComponentListener

public void removeAuthorComponentListener(DITAMapTreeComponentListener listener)
Removes a component listener.

Parameters:
listener - The listener.

getEditorComponent

public java.awt.Component getEditorComponent()
Returns:
The editor panel.

getStatusComponent

public java.awt.Component getStatusComponent()
Returns:
The status panel.

getDITACommonActions

public java.util.Map<java.lang.String,javax.swing.AbstractAction> getDITACommonActions()
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:
true if the component is modified.

setModified

public void setModified(boolean modified)
Sets the modified status.

Parameters:
modified - true to flag as modified.

getWSEditorAccess

public WSEditor getWSEditorAccess()
Get the access to the WS Editor.

Returns:
The editor access.

getEditorKey

protected ro.sync.exml.editor.AbstractEditor getEditorKey()
Specified by:
getEditorKey in class InternalComponentProvider
Returns:
The editor.

getDITAAccess

public WSDITAMapEditorPage getDITAAccess()
Get the page access used to perform various operations on the DITA Map tree.

Returns:
The page access.

setEditorPopUpCustomizer

public void setEditorPopUpCustomizer(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. 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.

Parameters:
preview - true to show the Print Preview dialog, false to show the Print dialog.

Oxygen XML Editor 14.2 Author API

© Copyright SyncRO Soft SRL 2002 - 2013. All rights reserved.