sos.reports
Class TemplateReportEditorModel

java.lang.Object
  |
  +--sos.reports.TemplateReportEditorModel
All Implemented Interfaces:
ReportEditorModel

public class TemplateReportEditorModel
extends java.lang.Object
implements ReportEditorModel

A report editor model that bases the editor model on the name of the report template.

Since:
1.0
See Also:
DefaultReportEditorModel, TierReportEditorModel

Constructor Summary
TemplateReportEditorModel()
          Creates an instance of TemplateReportEditorModel.
TemplateReportEditorModel(java.lang.String templateName, ReportEditorModel editorModel)
          Creates an instance of TemplateReportEditorModel.
 
Method Summary
 ElementEditor getEditor(Element element)
          Returns the editor that can edit the specified element, or null, if the element cannot be edited.
 void reportChanged(ReportEvent event)
          Updates itself (if necessary) as a result of a report modification.
 void setTemplateEditorModel(java.lang.String templateName, ReportEditorModel editorModel)
          Associates the specified editor model with the specified template name.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TemplateReportEditorModel

public TemplateReportEditorModel()
Creates an instance of TemplateReportEditorModel.


TemplateReportEditorModel

public TemplateReportEditorModel(java.lang.String templateName,
                                 ReportEditorModel editorModel)
Creates an instance of TemplateReportEditorModel. with an initial mapping of editorModel to templateName.

Parameters:
templateName - name of template for which to associate editorModel
editorModel - editor model to use when elements belonging to reports generated by a template named templateName are edited
Method Detail

getEditor

public ElementEditor getEditor(Element element)
Description copied from interface: ReportEditorModel
Returns the editor that can edit the specified element, or null, if the element cannot be edited.

Specified by:
getEditor in interface ReportEditorModel
Parameters:
element - report element to be edited
Returns:
an editor to edit element, or null

reportChanged

public void reportChanged(ReportEvent event)
Description copied from interface: ReportEditorModel
Updates itself (if necessary) as a result of a report modification.

Specified by:
reportChanged in interface ReportEditorModel
Parameters:
event - the event describing how the report has changed

setTemplateEditorModel

public void setTemplateEditorModel(java.lang.String templateName,
                                   ReportEditorModel editorModel)
Associates the specified editor model with the specified template name.

When the client tries to edit an element generated by a report template named templateName, this editor model will use editorModel. A null editorModel unassociates any editor model from the template name.

Parameters:
templateName - name of template for which to associate editorModel
editorModel - editor model to use when elements belonging to reports generated by a template named templateName are edited


Copyright 2003, 2004 Side of Software (SOS). All rights reserved.