Class ALcyPrintContext<V extends ILcdView>

All Implemented Interfaces:
Direct Known Subclasses:
TLcyLspPrintContext, TLcyPrintContext

public abstract class ALcyPrintContext<V extends ILcdView> extends Object implements ILcdChangeSource
Represents all that is needed to print, preview, modify, ... a component which can be printed to one or more pages.

Instances of this object are created internally in the print add-ons.

  • Constructor Details

    • ALcyPrintContext

      protected ALcyPrintContext(V aView, TLcyProperties aProperties)
      Creates a new print context for the given view and properties.
      Instances of this object should only be created internally by the print add-ons.
      aView - the view
      aProperties - the properties.
  • Method Details

    • getView

      public V getView()
      Returns the view that represents the content of the printable.
      the view.
    • dispose

      public abstract void dispose()
      Dispose this print context.
    • getProperties

      public TLcyProperties getProperties()
      Get the properties object for this printable component. The keys of these properties are the various constants that end in KEY of TLcyPrintAddOn.
      the properties object for this printable component.
    • addChangeListener

      public void addChangeListener(ILcdChangeListener aListener)
      Description copied from interface: ILcdChangeSource

      Registers the given listener so it will receive change events from this source.

      In case you need to register a listener which keeps a reference to an object with a shorter life-time than this change source, you can use a ALcdWeakChangeListener instance as change listener.

      Specified by:
      addChangeListener in interface ILcdChangeSource
      aListener - The listener to be notified when a change has happened.
      See Also:
    • removeChangeListener

      public void removeChangeListener(ILcdChangeListener aListener)
      Description copied from interface: ILcdChangeSource
      Removes the specified listener so it is no longer notified.
      Specified by:
      removeChangeListener in interface ILcdChangeSource
      aListener - The listener to remove.
    • firePrintableComponentChangeEvent

      protected final void firePrintableComponentChangeEvent(TLcdChangeEvent aEvent)
      Fires a change event to notify that the printable component has changed.
      aEvent - a change event
    • getPrintable

      public abstract Printable getPrintable()
      Returns the Printable that prints the view.
      the Printable that prints the view.
    • invalidate

      public abstract void invalidate()
      Invalidates the state of this ALcyPrintContext. It can for example be used to refresh the print preview.