Oxygen XML Editor 14.2 Author API

ro.sync.ecss.extensions.api.component
Interface EditorComponentProvider

All Known Implementing Classes:
AuthorComponentProvider

@API(type=NOT_EXTENDABLE,
     src=PUBLIC)
public interface EditorComponentProvider

Provides access to a created editor + helper views and additional panels. The editor might have multiple editor pages.

Since:
14.2

*********************************
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.


Method Summary
 void addAuthorComponentListener(AuthorComponentListener listener)
          Adds an author component listener.
 javax.swing.JComponent getAdditionalEditHelper(int helperID)
          Get an additional edit helper panel.
 java.awt.Component getEditorComponent()
          Get the main editor panel.
 java.awt.Component getStatusComponent()
          Get the status panel which shows the status of the edited document.
 WSEditor getWSEditorAccess()
          Get the access to the WS Editor.
 void load(java.net.URL url, java.io.Reader reader)
          Sets the content to edit.
 void print(boolean preview)
          Print the author component content.
 void removeAuthorComponentListener(AuthorComponentListener listener)
          Removes an author component listener.
 void showLocation(java.net.URL url, java.io.Reader reader)
          Show the location referenced by a given URL in the editor.
 

Method Detail

getWSEditorAccess

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

Returns:
The author access.

load

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).

showLocation

void showLocation(java.net.URL url,
                  java.io.Reader reader)
                  throws AuthorComponentException
Show the location referenced by a given URL in the editor.
If the document pointed by this URL is different than the document currently loaded in the editor page, this URL will be used to set the content to edit, to solve relative references (eg: images) and to show the location pointed by the URL reference part.
If the document pointed by this URL is currently loaded in the editor page, only the reference part of the given URL will be used to show the corresponding location in the editor.

Parameters:
url - The URL to show location for.
reader - The reader over the URL, can be null.
Throws:
AuthorComponentException - When there was a load problem (eg: IOException).

addAuthorComponentListener

void addAuthorComponentListener(AuthorComponentListener listener)
Adds an author component listener.

Parameters:
listener - The listener.

removeAuthorComponentListener

void removeAuthorComponentListener(AuthorComponentListener listener)
Removes an author component listener.

Parameters:
listener - The listener.

getAdditionalEditHelper

javax.swing.JComponent getAdditionalEditHelper(int helperID)
Get an additional edit helper panel. It can be the outline, attributes, entities, elements or model helper component, depending on the ID.

Parameters:
helperID - One of:
  • AuthorComponentProvider.ATTRIBUTES_PANEL_ID,
  • AuthorComponentProvider.ELEMENTS_PANEL_ID,
  • AuthorComponentProvider.ENTITIES_PANEL_ID,
  • AuthorComponentProvider.MODEL_PANEL_ID,
  • AuthorComponentProvider.OUTLINER_PANEL_ID constants.
Returns:
The additional component.

getEditorComponent

java.awt.Component getEditorComponent()
Get the main editor panel.

Returns:
The editor panel.

getStatusComponent

java.awt.Component getStatusComponent()
Get the status panel which shows the status of the edited document.

Returns:
The status panel.

print

void print(boolean preview)
Print the author 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.