com.businessobjects.crystalreports.designer.sdk
Interface ICrystalReportsEditor

All Superinterfaces:
ICrystalDocumentChangedService

public interface ICrystalReportsEditor
extends ICrystalDocumentChangedService

This interface defines an editor that can view or edit a Crystal report. This interface is not intended to be implemented by clients.

See Also:
EditorUtilities

Field Summary
static java.lang.String CR_EDITOR_ID
          The identifier of the Crystal Reports editor.
 
Method Summary
 void addClosedListener(IEditorClosedListener l)
          Adds an listener that listens to when the editor is closed.
 void changeInput(IEditorInput newInput)
          Sets the input for this editor to a new IEditorInput object.
 void close()
          Closes the editor.
 ICrystalReportsEditorPage getActiveEditorPage()
          Returns the page that is currently displayed in the Crystal Reports editor.
 IReportClientDocument getReportClientDocument()
          Returns the active IReportClientDocument object.
 void removeClosedListener(IEditorClosedListener l)
          Removes a listener that listens to when the editor is closed.
 void setActiveEditor(ICrystalReportsEditorPage editor)
          Sets a page to be active.
 void setActiveEditor(java.lang.String editorId)
          Sets a page to be active.
 
Methods inherited from interface com.businessobjects.crystalreports.designer.sdk.ICrystalDocumentChangedService
addDocumentChangedListener, removeDocumentChangedListener
 

Field Detail

CR_EDITOR_ID

static final java.lang.String CR_EDITOR_ID
The identifier of the Crystal Reports editor. This identifier is identical to the identifier declared in the plugin.xml file.

See Also:
Constant Field Values
Method Detail

getReportClientDocument

IReportClientDocument getReportClientDocument()
Returns the active IReportClientDocument object. If the editor is loading a report when this method is called, this method will block until the report has been loaded. This method must only be called from the Display thread.

Returns:
the active IReportClientDocument object

changeInput

void changeInput(IEditorInput newInput)
                 throws java.lang.reflect.InvocationTargetException,
                        java.lang.InterruptedException
Sets the input for this editor to a new IEditorInput object. If the newInput parameter represents a different IEditorInput object, this method fires a IEditorPart.PROP_INPUT event. If the IEditorInput object does not represent a new input, this method throws an exception and does not change the input.

Parameters:
newInput - the new editor input
Throws:
java.lang.InterruptedException - if the input change is canceled or if a loading error has occurred and has already been handled
java.lang.reflect.InvocationTargetException - if the input change failed

getActiveEditorPage

ICrystalReportsEditorPage getActiveEditorPage()
Returns the page that is currently displayed in the Crystal Reports editor.

Returns:
the active editor page

setActiveEditor

void setActiveEditor(ICrystalReportsEditorPage editor)
Sets a page to be active. This method does nothing if the page does not belong to this instance of the editor.

Parameters:
editor - the page to set active

setActiveEditor

void setActiveEditor(java.lang.String editorId)
Sets a page to be active. This method does nothing if the editor does not contain a page with the given identifier.

Parameters:
editorId - the identifier of the page to set active

addClosedListener

void addClosedListener(IEditorClosedListener l)
Adds an listener that listens to when the editor is closed.

Parameters:
l - the listener to add

removeClosedListener

void removeClosedListener(IEditorClosedListener l)
Removes a listener that listens to when the editor is closed.

Parameters:
l - listener to remove

close

void close()
Closes the editor.