Class TLcyPrintAddOn

java.lang.Object
com.luciad.lucy.addons.ALcyAddOn
com.luciad.lucy.addons.print.TLcyPrintAddOn

public class TLcyPrintAddOn extends ALcyAddOn
The print addon offers functionality to get a printed version of a map. The addon supports multipage printing. Therefore the following menu items are added to the menu bar of each map.
  1. Page Setup...: shows a page setup dialog.
  2. Print Preview...: shows a print preview dialog.
  3. Print...: shows a print dialog.
  4. Define Print Area: allows you to draw a print area on the map. If a print area is defined, the addon will use this area as the area that needs to be printed, otherwise the current map view is used.
The page layout and its content is created as a printable component. These components are created by a ALcyPrintableComponentFactory. The factory instance can be explicitly set by using setPrintableComponentFactory or the class can be set by using the configuration file. If no factory is set, a default factory will be used.

The content of the print preview dialog is created by a ALcyPrintPreviewFactory. The factory instance can be explicitly set by using setPrintPreviewFactory or the class can be set by using the configuration file. If no factory is set, a default factory will be used.

The content of the editor used to modify a selected print area, is created by a ILcyObjectCustomizerFactory. The factory instance can be explicitly set using setPrintAreaCustomizerFactory or the class can be set using the configuration file. It is recommended to subclass TLcyPrintAreaCustomizerFactory for this purpose. If no factory is set, a default factory will be used.

A TLcyProperties object is created for every map component. It contains the current stored values of the properties used in the print addon. Initially all configured properties from the configuration file are added. Afterwards, the object is updated each time a property has changed eg. the page orientation, the visibility of the footer text,... The keys that can be used to retrieve information from or set information to the properties (using for example get) are the constants of this class ending in KEY, e.g., PAGE_FORMAT_KEY, HEADER_TEXT_SELECTED_KEY, ... The value that can be expected for every key is documented in the key constant itself, the default value is specified in constants ending in VALUE_DEFAULT.

It is possible to decorate each printed page by overriding createPageDecorator, or to add printed pages by overriding createPrintPageable. For more information, see the javadoc of these methods.

Note: If the new functionality is not desired, the behavior prior to 6.1 can be used by setting the configuration property "TLcyPrintAddOn.usePriorTo6.1" to true. In this case, no multipage printing is possible and only the 'Print...' menu item is added.

  • Field Details

    • BACKGROUND_COLOR_MAP_KEY

      public static final String BACKGROUND_COLOR_MAP_KEY
      Property name for the background color of the maps in the configuration file. The corresponding property value is of type java.awt.Color.
      See Also:
    • BACKGROUND_COLOR_MAP_VALUE_DEFAULT

      public static final Color BACKGROUND_COLOR_MAP_VALUE_DEFAULT
      Default value for the property BACKGROUND_COLOR_MAP_KEY.
    • BACKGROUND_COLOR_MAP_OVERVIEW_KEY

      public static final String BACKGROUND_COLOR_MAP_OVERVIEW_KEY
      Property name for the background color of the map overviews in the configuration file. The corresponding property value is of type java.awt.Color.
      See Also:
    • BACKGROUND_COLOR_MAP_OVERVIEW_VALUE_DEFAULT

      public static final Color BACKGROUND_COLOR_MAP_OVERVIEW_VALUE_DEFAULT
      Default value for the property BACKGROUND_COLOR_MAP_OVERVIEW_KEY.
    • ORIENTATION_CHOICE_KEY

      public static final String ORIENTATION_CHOICE_KEY
      Property name for the chosen page orientation. The corresponding property value is of type java.lang.String. Use ORIENTATION_CHOICE_VALUE_PORTRAIT or ORIENTATION_CHOICE_VALUE_LANDSCAPE
      See Also:
    • ORIENTATION_CHOICE_VALUE_PORTRAIT

      public static final String ORIENTATION_CHOICE_VALUE_PORTRAIT
      Custom orientation 'portrait' for the property ORIENTATION_CHOICE_KEY.
      See Also:
    • ORIENTATION_CHOICE_VALUE_LANDSCAPE

      public static final String ORIENTATION_CHOICE_VALUE_LANDSCAPE
      Custom orientation 'landscape' for the property ORIENTATION_CHOICE_KEY.
      See Also:
    • ORIENTATION_CHOICE_VALUE_DEFAULT

      public static final String ORIENTATION_CHOICE_VALUE_DEFAULT
      Default value for the property ORIENTATION_CHOICE_KEY.
      See Also:
    • PAGE_FORMAT_KEY

      public static final String PAGE_FORMAT_KEY
      Property name for the chosen page format. The corresponding property value is of type java.awt.print.PageFormat.
      See Also:
    • PRINTER_JOB_KEY

      public static final String PRINTER_JOB_KEY
      Property name for the chosen printer job. The corresponding property value is of type java.awt.print.PrinterJob.
      See Also:
    • SCALE_OR_PAGES_SUFFIX

      public static final String SCALE_OR_PAGES_SUFFIX
      Property suffix which represents a chosen calculation type. The corresponding property value is of type java.lang.String. Use SCALE_OR_PAGES_VALUE_PAGES or SCALE_OR_PAGES_VALUE_SCALE Please refer to PRINTING_AREA_CHOICE_KEY for more information.
      See Also:
    • SCALE_OR_PAGES_VALUE_PAGES

      public static final String SCALE_OR_PAGES_VALUE_PAGES
      Custom 'pages' value for the property SCALE_OR_PAGES_SUFFIX.
      See Also:
    • SCALE_OR_PAGES_VALUE_SCALE

      public static final String SCALE_OR_PAGES_VALUE_SCALE
      Custom 'scale' value for the property SCALE_OR_PAGES_SUFFIX.
      See Also:
    • SCALE_OR_PAGES_VALUE_DEFAULT

      public static final String SCALE_OR_PAGES_VALUE_DEFAULT
      Default value for the property SCALE_OR_PAGES_SUFFIX.
      See Also:
    • COL_COUNT_SUFFIX

      public static final String COL_COUNT_SUFFIX
      Property suffix for the column count. The corresponding property value is of type java.lang.Integer. Please refer to PRINTING_AREA_CHOICE_KEY for more information.
      See Also:
    • COL_COUNT_VALUE_DEFAULT

      public static final int COL_COUNT_VALUE_DEFAULT
      Default value for the property COL_COUNT_SUFFIX.
      See Also:
    • ROW_COUNT_SUFFIX

      public static final String ROW_COUNT_SUFFIX
      Property suffix for the row count. The corresponding property value is of type java.lang.Integer. Please refer to PRINTING_AREA_CHOICE_KEY for more information.
      See Also:
    • ROW_COUNT_VALUE_DEFAULT

      public static final int ROW_COUNT_VALUE_DEFAULT
      Default value for the property ROW_COUNT_SUFFIX.
      See Also:
    • SPECIFIC_SCALE_ITEMS_SUFFIX

      public static final String SPECIFIC_SCALE_ITEMS_SUFFIX
      Property suffix for the paper scales. The corresponding property value is of type java.lang.Double[]. Please refer to PRINTING_AREA_CHOICE_KEY for more information.
      See Also:
    • SPECIFIC_SCALE_ITEMS_VALUE_DEFAULT

      public static final double[] SPECIFIC_SCALE_ITEMS_VALUE_DEFAULT
      Default value for the property SPECIFIC_SCALE_ITEMS_SUFFIX.
    • SPECIFIC_SCALE_SUFFIX

      public static final String SPECIFIC_SCALE_SUFFIX
      Property suffix for the paper scale. If omitted or zero, the converted current view scale is used. The corresponding property value is of type java.lang.Double. Please refer to PRINTING_AREA_CHOICE_KEY for more information.
      See Also:
    • SPECIFIC_SCALE_VALUE_DEFAULT

      public static final double SPECIFIC_SCALE_VALUE_DEFAULT
      Default value for the property SPECIFIC_SCALE_SUFFIX.
      See Also:
    • SNAP_TO_FULL_PAGES_VISIBLE_SUFFIX

      public static final String SNAP_TO_FULL_PAGES_VISIBLE_SUFFIX
      Property suffix which represents the visibility of the 'snap to full pages' checkbox. The corresponding property value is of type java.lang.Boolean. Please refer to PRINTING_AREA_CHOICE_KEY for more information.
      See Also:
    • SNAP_TO_FULL_PAGES_VISIBLE_VALUE_DEFAULT

      public static final boolean SNAP_TO_FULL_PAGES_VISIBLE_VALUE_DEFAULT
      Default value for the property SNAP_TO_FULL_PAGES_VISIBLE_SUFFIX.
      See Also:
    • SNAP_TO_FULL_PAGES_SELECTED_SUFFIX

      public static final String SNAP_TO_FULL_PAGES_SELECTED_SUFFIX
      Property suffix which represents the value of the 'snap to full pages' checkbox. The corresponding property value is of type java.lang.Boolean. Please refer to PRINTING_AREA_CHOICE_KEY for more information.
      See Also:
    • SNAP_TO_FULL_PAGES_SELECTED_VALUE_DEFAULT

      public static final boolean SNAP_TO_FULL_PAGES_SELECTED_VALUE_DEFAULT
      Default value for the property SNAP_TO_FULL_PAGES_SELECTED_SUFFIX.
      See Also:
    • INCLUDES_COVERED_AREA_SUFFIX

      @Deprecated public static final String INCLUDES_COVERED_AREA_SUFFIX
      Deprecated.
      This property has been deprecated. It is handled automatically, based on the value of the PRINTING_AREA_CHOICE_KEY property (PRINTING_AREA_CHOICE_VALUE_PRINT_AREA -> true, otherwise false).
      Property suffix which determines if the header and footer text should be included inside the given print area bounds, PRINT_AREA_SUFFIX. The corresponding property value is of type java.lang.Boolean. Please refer to PRINTING_AREA_CHOICE_KEY for more information.
      See Also:
    • INCLUDES_COVERED_AREA_VALUE_DEFAULT

      @Deprecated public static final boolean INCLUDES_COVERED_AREA_VALUE_DEFAULT
      Deprecated.
      This property has been deprecated. See INCLUDES_COVERED_AREA_SUFFIX.
      Default value for the property INCLUDES_COVERED_AREA_SUFFIX.
      See Also:
    • PRINTING_AREA_CHOICE_KEY

      public static final String PRINTING_AREA_CHOICE_KEY
      Property name representing the printing area to use. The value of this property is a part of the property name of all other 'printingArea' properties. Just add the value between the constant PRINTING_AREA_PREFIX and "." plus the suffix of the property you want to create.

      For example, PRINTING_AREA_PREFIX + PRINTING_AREA_CHOICE_VALUE_VIEW_EXTENTS + "." + COL_COUNT_SUFFIX represents the property key corresponding to the number of columns the printing area PRINTING_AREA_CHOICE_VALUE_VIEW_EXTENTS should use. The corresponding property value is of type java.lang.String.

      See Also:
    • PRINTING_AREA_CHOICE_VALUE_VIEW_EXTENTS

      public static final String PRINTING_AREA_CHOICE_VALUE_VIEW_EXTENTS
      Custom printing area 'viewExtents' for the property PRINTING_AREA_CHOICE_KEY.
      See Also:
    • PRINTING_AREA_CHOICE_VALUE_PRINT_AREA

      public static final String PRINTING_AREA_CHOICE_VALUE_PRINT_AREA
      Custom printing area 'printArea' for the property PRINTING_AREA_CHOICE_KEY.
      See Also:
    • PRINTING_AREA_CHOICE_VALUE_DEFAULT

      public static final String PRINTING_AREA_CHOICE_VALUE_DEFAULT
      Default value for the property PRINTING_AREA_CHOICE_KEY.
      See Also:
    • PRINTING_AREA_PREFIX

      public static final String PRINTING_AREA_PREFIX
      The property prefix to use for the 'printingArea' properties. Please refer to PRINTING_AREA_CHOICE_KEY for more information.
      See Also:
    • CROP_MARKS_VISIBLE_KEY

      public static final String CROP_MARKS_VISIBLE_KEY
      Property name which represents the visibility of the 'crop marks' checkbox. The corresponding property value is of type java.lang.Boolean.
      See Also:
    • CROP_MARKS_VISIBLE_VALUE_DEFAULT

      public static final boolean CROP_MARKS_VISIBLE_VALUE_DEFAULT
      Default value for the property CROP_MARKS_VISIBLE_KEY.
      See Also:
    • CROP_MARKS_SELECTED_KEY

      public static final String CROP_MARKS_SELECTED_KEY
      Property name which represents the value of the 'crop marks' checkbox. The corresponding property value is of type java.lang.Boolean.
      See Also:
    • CROP_MARKS_SELECTED_VALUE_DEFAULT

      public static final boolean CROP_MARKS_SELECTED_VALUE_DEFAULT
      Default value for the property CROP_MARKS_SELECTED_KEY.
      See Also:
    • POSITION_MARKS_VISIBLE_KEY

      public static final String POSITION_MARKS_VISIBLE_KEY
      Property name which represents the visibility of the 'position marks' checkbox. The corresponding property value is of type java.lang.Boolean.
      See Also:
    • POSITION_MARKS_VISIBLE_VALUE_DEFAULT

      public static final boolean POSITION_MARKS_VISIBLE_VALUE_DEFAULT
      Default value for the property POSITION_MARKS_VISIBLE_KEY.
      See Also:
    • POSITION_MARKS_SELECTED_KEY

      public static final String POSITION_MARKS_SELECTED_KEY
      Property name which represents the value of the 'position marks' checkbox. The corresponding property value is of type java.lang.Boolean.
      See Also:
    • POSITION_MARKS_SELECTED_VALUE_DEFAULT

      public static final boolean POSITION_MARKS_SELECTED_VALUE_DEFAULT
      Default value for the property POSITION_MARKS_SELECTED_KEY.
      See Also:
    • TITLE_TEXT_VISIBLE_KEY

      public static final String TITLE_TEXT_VISIBLE_KEY
      Property name which represents the visibility of the 'title text' checkbox. The corresponding property value is of type java.lang.Boolean.
      See Also:
    • TITLE_TEXT_VISIBLE_VALUE_DEFAULT

      public static final boolean TITLE_TEXT_VISIBLE_VALUE_DEFAULT
      Default value for the property TITLE_TEXT_VISIBLE_KEY.
      See Also:
    • TITLE_TEXT_SELECTED_KEY

      public static final String TITLE_TEXT_SELECTED_KEY
      Property name which represents the value of the 'title text' checkbox. The corresponding property value is of type java.lang.Boolean.
      See Also:
    • TITLE_TEXT_SELECTED_VALUE_DEFAULT

      public static final boolean TITLE_TEXT_SELECTED_VALUE_DEFAULT
      Default value for the property TITLE_TEXT_SELECTED_KEY.
      See Also:
    • TITLE_TEXT_FIELD_VISIBLE_KEY

      public static final String TITLE_TEXT_FIELD_VISIBLE_KEY
      Property name which represents the visibility of the 'title text field'. The corresponding property value is of type java.lang.Boolean.
      See Also:
    • TITLE_TEXT_FIELD_VISIBLE_VALUE_DEFAULT

      public static final boolean TITLE_TEXT_FIELD_VISIBLE_VALUE_DEFAULT
      Default value for the property TITLE_TEXT_FIELD_VISIBLE_KEY.
      See Also:
    • TITLE_TEXT_KEY

      public static final String TITLE_TEXT_KEY
      Property name which represents the text to use as 'title text'. The corresponding property value is of type java.lang.String.
      See Also:
    • TITLE_TEXT_VALUE_DEFAULT

      public static final String TITLE_TEXT_VALUE_DEFAULT
      Default value for the property TITLE_TEXT_KEY.
      See Also:
    • MODIFIABLE_HEADER_TEXT_VISIBLE_KEY

      public static final String MODIFIABLE_HEADER_TEXT_VISIBLE_KEY
      Property name which represents the visibility of the 'header text' checkbox. The corresponding property value is of type java.lang.Boolean.

      The difference with the #HEADER_TEXT_* properties is that this property controls the header text which is modifiable in the UI by the user.

      Since:
      2016.1.1
      See Also:
    • MODIFIABLE_HEADER_TEXT_VISIBLE_VALUE_DEFAULT

      public static final boolean MODIFIABLE_HEADER_TEXT_VISIBLE_VALUE_DEFAULT
      Default value for the property MODIFIABLE_HEADER_TEXT_FIELD_VISIBLE_KEY
      Since:
      2016.1.1
      See Also:
    • MODIFIABLE_HEADER_TEXT_SELECTED_KEY

      public static final String MODIFIABLE_HEADER_TEXT_SELECTED_KEY
      Property name which represents the value of the 'header text' checkbox. The corresponding property value is of type java.lang.Boolean.

      The difference with the #HEADER_TEXT_* properties is that this property controls the header text which is modifiable in the UI by the user.

      Since:
      2016.1.1
      See Also:
    • MODIFIABLE_HEADER_TEXT_SELECTED_VALUE_DEFAULT

      public static final boolean MODIFIABLE_HEADER_TEXT_SELECTED_VALUE_DEFAULT
      Default value for the property MODIFIABLE_HEADER_TEXT_SELECTED_KEY
      Since:
      2016.1.1
      See Also:
    • MODIFIABLE_HEADER_TEXT_FIELD_VISIBLE_KEY

      public static final String MODIFIABLE_HEADER_TEXT_FIELD_VISIBLE_KEY
      Property name which represents the value of the 'header text field'. The corresponding property value is of type java.lang.Boolean.

      The difference with the #HEADER_TEXT_* properties is that this property controls the header text which is modifiable in the UI by the user.

      Since:
      2016.1.1
      See Also:
    • MODIFIABLE_HEADER_TEXT_FIELD_VISIBLE_VALUE_DEFAULT

      public static final boolean MODIFIABLE_HEADER_TEXT_FIELD_VISIBLE_VALUE_DEFAULT
      Default value for the property MODIFIABLE_HEADER_TEXT_FIELD_VISIBLE_KEY
      Since:
      2016.1.1
      See Also:
    • MODIFIABLE_HEADER_TEXT_KEY

      public static final String MODIFIABLE_HEADER_TEXT_KEY
      Property name which controls the text to use as 'header text'. The corresponding property value is of type java.lang.String.

      The difference with the #HEADER_TEXT_* properties is that this property controls the header text which is modifiable in the UI by the user.

      Since:
      2016.1.1
      See Also:
    • MODIFIABLE_HEADER_TEXT_VALUE_DEFAULT

      public static final String MODIFIABLE_HEADER_TEXT_VALUE_DEFAULT
      Default value for the property MODIFIABLE_HEADER_TEXT_KEY
      Since:
      2016.1.1
      See Also:
    • CLASSIFICATION_VISIBLE_KEY

      public static final String CLASSIFICATION_VISIBLE_KEY
      Property name which represents the visibility of the 'classification checkbox'. The corresponding property value is of type java.lang.Boolean.
      Since:
      2016.1.1
      See Also:
    • CLASSIFICATION_VISIBLE_VALUE_DEFAULT

      public static final boolean CLASSIFICATION_VISIBLE_VALUE_DEFAULT
      Default value for the property CLASSIFICATION_VISIBLE_KEY
      Since:
      2016.1.1
      See Also:
    • CLASSIFICATION_SELECTED_KEY

      public static final String CLASSIFICATION_SELECTED_KEY
      Property name which represents the value of the 'classification checkbox'. The corresponding property value is of type java.lang.Boolean
      Since:
      2016.1.1
      See Also:
    • CLASSIFICATION_SELECTED_VALUE_DEFAULT

      public static final boolean CLASSIFICATION_SELECTED_VALUE_DEFAULT
      Default value for the property CLASSIFICATION_SELECTED_KEY
      Since:
      2016.1.1
      See Also:
    • CLASSIFICATION_COMBO_BOX_VISIBLE_KEY

      public static final String CLASSIFICATION_COMBO_BOX_VISIBLE_KEY
      Property name which represents the visibility of the 'classification combo box'. The corresponding property value is of type java.lang.Boolean
      Since:
      2016.1.1
      See Also:
    • CLASSIFICATION_COMBO_BOX_VISIBLE_VALUE_DEFAULT

      public static final boolean CLASSIFICATION_COMBO_BOX_VISIBLE_VALUE_DEFAULT
      Default value for the property CLASSIFICATION_COMBO_BOX_VISIBLE_KEY
      Since:
      2016.1.1
      See Also:
    • CLASSIFICATION_KEY

      public static final String CLASSIFICATION_KEY
      Property name which represents the selected value of the 'classification combo box'. The corresponding property value is of type java.lang.String
      Since:
      2016.1.1
      See Also:
    • HEADER_TEXT_VISIBLE_KEY

      public static final String HEADER_TEXT_VISIBLE_KEY
      Property name which represents the visibility of the 'header text' checkbox. The corresponding property value is of type java.lang.Boolean.
      See Also:
    • HEADER_TEXT_VISIBLE_VALUE_DEFAULT

      public static final boolean HEADER_TEXT_VISIBLE_VALUE_DEFAULT
      Default value for the property HEADER_TEXT_VISIBLE_KEY.
      See Also:
    • HEADER_TEXT_SELECTED_KEY

      public static final String HEADER_TEXT_SELECTED_KEY
      Property name which represents the value of the 'header text' checkbox. The corresponding property value is of type java.lang.Boolean.
      See Also:
    • HEADER_TEXT_SELECTED_VALUE_DEFAULT

      public static final boolean HEADER_TEXT_SELECTED_VALUE_DEFAULT
      Default value for the property HEADER_TEXT_SELECTED_KEY.
      See Also:
    • HEADER_TEXT_KEY

      public static final String HEADER_TEXT_KEY
      Property name which represents the html file to use as 'header text'. The corresponding property value is of type java.lang.String.
      See Also:
    • HEADER_TEXT_VALUE_DEFAULT

      public static final String HEADER_TEXT_VALUE_DEFAULT
      Default value for the property HEADER_TEXT_KEY.
      See Also:
    • LEGEND_VISIBLE_KEY

      public static final String LEGEND_VISIBLE_KEY
      Property name which represents the visibility of the 'legend' checkbox. The corresponding property value is of type java.lang.Boolean.
      See Also:
    • LEGEND_VISIBLE_VALUE_DEFAULT

      public static final boolean LEGEND_VISIBLE_VALUE_DEFAULT
      Default value for the property LEGEND_VISIBLE_KEY.
      See Also:
    • LEGEND_SELECTED_KEY

      public static final String LEGEND_SELECTED_KEY
      Property name which represents the value of the 'legend' checkbox. The corresponding property value is of type java.lang.Boolean.
      See Also:
    • LEGEND_SELECTED_VALUE_DEFAULT

      public static final boolean LEGEND_SELECTED_VALUE_DEFAULT
      Default value for the property LEGEND_SELECTED_KEY.
      See Also:
    • OVERVIEW_VISIBLE_KEY

      public static final String OVERVIEW_VISIBLE_KEY
      Property name which represents the visibility of the 'overview' checkbox. The corresponding property value is of type java.lang.Boolean.
      See Also:
    • OVERVIEW_VISIBLE_VALUE_DEFAULT

      public static final boolean OVERVIEW_VISIBLE_VALUE_DEFAULT
      Default value for the property OVERVIEW_VISIBLE_KEY.
      See Also:
    • OVERVIEW_ENABLED_KEY

      public static final String OVERVIEW_ENABLED_KEY
      Property name which represents the enabled state of the 'overview' checkbox. The corresponding property value is of type java.lang.Boolean.
      See Also:
    • OVERVIEW_ENABLED_VALUE_DEFAULT

      public static final boolean OVERVIEW_ENABLED_VALUE_DEFAULT
      Default value for the property OVERVIEW_ENABLED_KEY.
      See Also:
    • OVERVIEW_SELECTED_KEY

      public static final String OVERVIEW_SELECTED_KEY
      Property name which represents the value of the 'overview' checkbox. The corresponding property value is of type java.lang.Boolean.
      See Also:
    • OVERVIEW_SELECTED_VALUE_DEFAULT

      public static final boolean OVERVIEW_SELECTED_VALUE_DEFAULT
      Default value for the property OVERVIEW_SELECTED_KEY.
      See Also:
    • SCALE_ICON_VISIBLE_KEY

      public static final String SCALE_ICON_VISIBLE_KEY
      Property name which represents the visibility of the 'scale icon' checkbox. The corresponding property value is of type java.lang.Boolean.
      See Also:
    • SCALE_ICON_VISIBLE_VALUE_DEFAULT

      public static final boolean SCALE_ICON_VISIBLE_VALUE_DEFAULT
      Default value for the property SCALE_ICON_VISIBLE_KEY.
      See Also:
    • SCALE_ICON_SELECTED_KEY

      public static final String SCALE_ICON_SELECTED_KEY
      Property name which represents the value of the 'scale icon' checkbox. The corresponding property value is of type java.lang.Boolean.
      See Also:
    • SCALE_ICON_SELECTED_VALUE_DEFAULT

      public static final boolean SCALE_ICON_SELECTED_VALUE_DEFAULT
      Default value for the property SCALE_ICON_SELECTED_KEY.
      See Also:
    • SCALE_TEXT_VISIBLE_KEY

      public static final String SCALE_TEXT_VISIBLE_KEY
      Property name which represents the visibility of the 'scale indication' checkbox. The corresponding property value is of type java.lang.Boolean.
      See Also:
    • SCALE_TEXT_VISIBLE_VALUE_DEFAULT

      public static final boolean SCALE_TEXT_VISIBLE_VALUE_DEFAULT
      Default value for the property SCALE_TEXT_VISIBLE_KEY.
      See Also:
    • SCALE_TEXT_SELECTED_KEY

      public static final String SCALE_TEXT_SELECTED_KEY
      Property name which represents the value of the 'scale indication' checkbox. The corresponding property value is of type java.lang.Boolean.
      See Also:
    • SCALE_TEXT_SELECTED_VALUE_DEFAULT

      public static final boolean SCALE_TEXT_SELECTED_VALUE_DEFAULT
      Default value for the property SCALE_TEXT_SELECTED_KEY.
      See Also:
    • RASTERIZATION_QUALITY_KEY

      public static final String RASTERIZATION_QUALITY_KEY
      Property name which represents the rasterization quality in dpi. The corresponding property value is of type java.lang.Integer. Use a value between the values of RASTERIZATION_QUALITY_MINIMUM_KEY and RASTERIZATION_QUALITY_MAXIMUM_KEY.
      See Also:
    • RASTERIZATION_QUALITY_VALUE_DEFAULT

      public static final int RASTERIZATION_QUALITY_VALUE_DEFAULT
      Default value for the property RASTERIZATION_QUALITY_KEY.
      See Also:
    • RASTERIZATION_QUALITY_ITEMS_KEY

      public static final String RASTERIZATION_QUALITY_ITEMS_KEY
      Property that represents an enumeration of the possible rasterization quality values in dpi. The corresponding property value is an array of integers. If set, this property overrides RASTERIZATION_QUALITY_MINIMUM_KEY and RASTERIZATION_QUALITY_MAXIMUM_KEY.
      See Also:
    • RASTERIZATION_QUALITY_ITEMS_VALUE_DEFAULT

      public static final int[] RASTERIZATION_QUALITY_ITEMS_VALUE_DEFAULT
      Default value for the property RASTERIZATION_QUALITY_ITEMS_KEY. The default value is null, which means that the RASTERIZATION_QUALITY_MINIMUM_KEY and RASTERIZATION_QUALITY_MAXIMUM_KEY values should be used to determine the values.
    • RASTERIZATION_QUALITY_LABELS_KEY

      public static final String RASTERIZATION_QUALITY_LABELS_KEY
      Property that represents an enumeration fo the labels for the possible rasterization quality values in dpi. The corresponding property value is an array of String instances (e.g. "low quality", "high quality" ).
      See Also:
    • RASTERIZATION_QUALITY_LABELS_VALUE_DEFAULT

      public static final String[] RASTERIZATION_QUALITY_LABELS_VALUE_DEFAULT
      Default value for the property RASTERIZATION_QUALITY_LABELS_KEY. The default value is null, which means that the labels are based on the values (e.g. a value of 72 gets the label "72 dpi").
    • RASTERIZATION_QUALITY_MINIMUM_KEY

      public static final String RASTERIZATION_QUALITY_MINIMUM_KEY
      Property name which represents the minimum rasterization quality in dpi. The corresponding property value is of type java.lang.Integer.
      See Also:
    • RASTERIZATION_QUALITY_MINIMUM_VALUE_DEFAULT

      public static final int RASTERIZATION_QUALITY_MINIMUM_VALUE_DEFAULT
      Default value for the property RASTERIZATION_QUALITY_MINIMUM_KEY.
      See Also:
    • RASTERIZATION_QUALITY_MAXIMUM_KEY

      public static final String RASTERIZATION_QUALITY_MAXIMUM_KEY
      Property name which represents the maximum rasterization quality in dpi. The corresponding property value is of type java.lang.Integer.
      See Also:
    • RASTERIZATION_QUALITY_MAXIMUM_VALUE_DEFAULT

      public static final int RASTERIZATION_QUALITY_MAXIMUM_VALUE_DEFAULT
      Default value for the property RASTERIZATION_QUALITY_MAXIMUM_KEY.
      See Also:
    • RASTERIZATION_QUALITY_VISIBLE_KEY

      public static final String RASTERIZATION_QUALITY_VISIBLE_KEY
      Property name which represents the visibility of the rasterization quality slider. The corresponding property value is of type java.lang.Boolean.
      See Also:
    • RASTERIZATION_QUALITY_VISIBLE_VALUE_DEFAULT

      public static final boolean RASTERIZATION_QUALITY_VISIBLE_VALUE_DEFAULT
      Default value for the property RASTERIZATION_QUALITY_VISIBLE_KEY.
      See Also:
    • TRANSPARENCY_HANDLING_KEY

      public static final String TRANSPARENCY_HANDLING_KEY
      Property name which represents the way to handle transparency. The corresponding property value is of type java.lang.Integer. Use TRANSPARENCY_HANDLING_VALUE_JAVA_PRINTING, TRANSPARENCY_HANDLING_VALUE_MEMORY_OPTIMIZED or TRANSPARENCY_HANDLING_VALUE_VECTOR_OPTIMIZED
      See Also:
    • TRANSPARENCY_HANDLING_VALUE_DEFAULT

      public static final int TRANSPARENCY_HANDLING_VALUE_DEFAULT
      Default value for the property TRANSPARENCY_HANDLING_KEY
      See Also:
    • TRANSPARENCY_HANDLING_VALUE_JAVA_PRINTING

      public static final int TRANSPARENCY_HANDLING_VALUE_JAVA_PRINTING
      Custom transparency handling for the property TRANSPARENCY_HANDLING_KEY
      See Also:
    • TRANSPARENCY_HANDLING_VALUE_MEMORY_OPTIMIZED

      public static final int TRANSPARENCY_HANDLING_VALUE_MEMORY_OPTIMIZED
      Custom transparency handling for the property TRANSPARENCY_HANDLING_KEY
      See Also:
    • TRANSPARENCY_HANDLING_VALUE_VECTOR_OPTIMIZED

      public static final int TRANSPARENCY_HANDLING_VALUE_VECTOR_OPTIMIZED
      Custom transparency handling for the property TRANSPARENCY_HANDLING_KEY
      See Also:
    • PREVIEW_SCALE_ITEMS_KEY

      public static final String PREVIEW_SCALE_ITEMS_KEY
      Property name for the print preview scales. The corresponding property value is of type java.lang.Double[]. A value of 0.85 means 85%.
      See Also:
    • PREVIEW_SCALE_ITEMS_VALUE_DEFAULT

      public static final double[] PREVIEW_SCALE_ITEMS_VALUE_DEFAULT
      Default value for the property PREVIEW_SCALE_ITEMS_KEY
    • PREVIEW_SCALE_KEY

      public static final String PREVIEW_SCALE_KEY
      Property name for the print preview scale. The corresponding property value is of type java.lang.Double. A value of 0.85 means 85%.
      See Also:
    • PREVIEW_SCALE_VALUE_DEFAULT

      public static final double PREVIEW_SCALE_VALUE_DEFAULT
      Default value for the property PREVIEW_SCALE_KEY
      See Also:
    • PREVIEW_PAGES_LIMIT_KEY

      public static final String PREVIEW_PAGES_LIMIT_KEY
      Property name for the pages limit of the print preview. The corresponding property value is of type java.lang.Integer.
      See Also:
    • PREVIEW_PAGES_LIMIT_VALUE_DEFAULT

      public static final int PREVIEW_PAGES_LIMIT_VALUE_DEFAULT
      Default value for the property PREVIEW_PAGES_LIMIT_KEY
      See Also:
  • Constructor Details

    • TLcyPrintAddOn

      public TLcyPrintAddOn()
      Creates a new print add-on. To plug in the add-on, the plugInto method must also be called. This is typically done by a ILcyLucyEnv instance, upon request of the application front-end.
  • Method Details

    • plugInto

      public void plugInto(ILcyLucyEnv aLucyEnv)
      Description copied from class: ALcyAddOn
      Plugs this addon into the given lucy environment. It is in the implementation of this method that the addon adds its functionality to the Lucy backend.
      Specified by:
      plugInto in class ALcyAddOn
      Parameters:
      aLucyEnv - The lucy environment to plug into.
      See Also:
    • getPrintComponentAction

      @Deprecated public TLcdPrintComponentAction getPrintComponentAction()
      Deprecated.
      only useful in prior to 6.1 mode
      Returns the TLcdPrintComponentAction that this addon delegates to.
      Returns:
      the TLcdPrintComponentAction that this addon delegates to.
    • setPrintComponentAction

      @Deprecated public void setPrintComponentAction(TLcdPrintComponentAction aPrintComponentAction)
      Deprecated.
      only useful in prior to 6.1 mode
      Sets the TLcdPrintComponentAction this addon delegates to.
      Parameters:
      aPrintComponentAction - The print component action.
    • getPrintableComponentFactory

      public ALcyPrintableComponentFactory getPrintableComponentFactory()
      Returns the ALcyPrintableComponentFactory that is used by this addon.
      Returns:
      the ALcyPrintableComponentFactory that is used by this addon.
    • setPrintableComponentFactory

      public void setPrintableComponentFactory(ALcyPrintableComponentFactory aPrintableComponentFactory)
      Sets the ALcyPrintableComponentFactory that should be used by this addon.

      Please refer to TLcyPrintAddOn for more information.

      Parameters:
      aPrintableComponentFactory - The printable component factory.
    • getPrintPreviewFactory

      public ALcyPrintPreviewFactory getPrintPreviewFactory()
      Returns the ALcyPrintPreviewFactory that is used by this addon.
      Returns:
      the ALcyPrintPreviewFactory that is used by this addon.
    • setPrintPreviewFactory

      public void setPrintPreviewFactory(ALcyPrintPreviewFactory aPrintPreviewFactory)
      Sets the ALcyPrintPreviewFactory that should be used by this addon.

      Please refer to TLcyPrintAddOn for more information.

      Parameters:
      aPrintPreviewFactory - The print preview factory.
    • getPrintAreaCustomizerFactory

      public ILcyObjectCustomizerFactory getPrintAreaCustomizerFactory()
      Returns the ILcyObjectCustomizerFactory that is used by this addon.
      Returns:
      the ILcyObjectCustomizerFactory that is used by this addon.
    • setPrintAreaCustomizerFactory

      public void setPrintAreaCustomizerFactory(ILcyObjectCustomizerFactory aPrintAreaCustomizerFactory)
      Sets the ILcyObjectCustomizerFactory that should be used by this addon.

      Please refer to TLcyPrintAddOn for more information.

      Parameters:
      aPrintAreaCustomizerFactory - The object customizer factory.
    • getProperties

      public TLcyProperties getProperties(ILcyMapComponent aMapComponent)
      Returns the TLcyProperties for the given map component. These are the current stored values of the properties used in the print addon.

      Please refer to TLcyPrintAddOn for more information.

      Note that if you want to change the default properties (=the properties used the first time printing is triggered for a certain map component), it is best to override the createDefaultProperties(ILcyMapComponent) method instead.

      Parameters:
      aMapComponent - The map component to query.
      Returns:
      the TLcyProperties for the given map component.
    • createDefaultProperties

      protected TLcyProperties createDefaultProperties(ILcyMapComponent aMapComponent)

      This method is used by the getProperties(ILcyMapComponent) method to retrieve the properties for a certain map component the first time printing is triggered for that map component.

      By default this method returns a TLcyProperties instance containing the settings defined in the configuration file. You can override this method to for example add extra settings to those properties. Note that you can add those extra settings as well by putting them in the configuration file.

      It is important that this method always returns a new TLcyProperties instance to avoid that changing the settings of one map component would affect the settings of another map component.

      Parameters:
      aMapComponent - The map component
      Returns:
      The initial TLcyProperties for the given map component.
      Since:
      2015.1.27
      See Also:
    • getPrintAreaGXYLayerFilter

      public ILcdFilter getPrintAreaGXYLayerFilter()
      Returns an ILcdFilter that returns true if the given object is an ILcdGXYLayer that represents the print area on the map, false otherwise. This can be used by custom legend implementations to avoid listing the print area layer.
      Returns:
      The filter.
    • performQuickPrint

      public void performQuickPrint(TLcyProperties aProperties, ILcyMapComponent aMapComponent)

      Trigger the print action for aMapComponent with aProperties containing all desired settings.

      This method allows you to perform a print action through the API.

      Parameters:
      aProperties - The properties containing the desired print settings.
      aMapComponent - The map component which must be printed.
    • unplugFrom

      public void unplugFrom(ILcyLucyEnv aLucyEnv)
      Description copied from class: ALcyAddOn
      Unplugs this addon from the given Lucy environment. It removes the functionality previously added to the Lucy backend.
      Specified by:
      unplugFrom in class ALcyAddOn
      Parameters:
      aLucyEnv - The lucy environment to unplug from.
      See Also:
    • createPageDecorator

      public Printable createPageDecorator(TLcyPrintContext aPrintContext)

      Creates a Printable that can be used to decorate each page. It is for example possible to add a watermark to each page by overriding this method.

      By default, this method returns null, meaning that no decorations are added.

      Parameters:
      aPrintContext - the print context.
      Returns:
      a Printable that can be used to decorate each page.
    • createPrintPageable

      public Pageable createPrintPageable(Pageable aViewPageable, TLcyPrintContext aPrintContext)

      Returns the Pageable that is used for printing (not for preview printing), based on the given Pageable. The given Pageable is used to print the view. Override this method to return a custom Pageable, e.g. by wrapping the given Pageable. It is for example possible to add a title page by overriding this method.

      By default, this method returns aViewPageable.

      Parameters:
      aViewPageable - the Pageable that is capable to print the view.
      aPrintContext - the print context.
      Returns:
      the Pageable that is used for printing