Class TLcyLspPrintPreviewFactory

java.lang.Object
com.luciad.lucy.addons.print.ALcyPrintPreviewFactory<TLcyLspPrintContext>
com.luciad.lucy.addons.print.lightspeed.TLcyLspPrintPreviewFactory

public class TLcyLspPrintPreviewFactory extends ALcyPrintPreviewFactory<TLcyLspPrintContext>
Factory for the creation of the content of the print preview dialog. This factory was designed so that it is easy to modify small parts of the creation process. This can be done by subclassing this class and overriding certain methods.

The main create function createPrintPreview first creates all actions, all components and then all panels using the functions createAction, createComponent and createPanel. Then it calls createPrintPreviewContent, which will create the content of the print preview using the created panels by calling getPanel. And finally it will create the actual content of the print preview dialog.

Note however that ID's are used. This is because there are different types of, for example, panels that can be created: the option panel, the printing area settings panel,... All possible ID's that can be passed to the createPanel method all end with the same suffix "PANEL". The same thing goes for "COMPONENT" (createComponent, getComponent) and "ACTION" (createAction, getAction).

As an example, imagine you want to change the behaviour of the options panel. Browsing this class learns there is a OPTIONS_PANEL constant. Because it ends with "PANEL", this constant can only be passed to the createPanel method. Therefore we can override the method createPanel, check if the ID is OPTIONS_PANEL and return a custom panel. Or use super.createComponent and change some settings before returning it. If you want to remove the component completely, you can simply return null.

The method createPrintPreview should not be overridden without using the super function. Changing the layout of the content of the print preview dialog can be done by overriding createPrintPreviewContent. The internal elements are already created and should be retrieved by calling getComponent.

Note that this class requires a default constructor to be able to configure it in the configuration file of the print add-on.

Since:
2013.0