Package com.luciad.lucy.addons.print
Class ALcyPrintContext<V extends ILcdView>
java.lang.Object
com.luciad.lucy.addons.print.ALcyPrintContext<V>
- All Implemented Interfaces:
ILcdChangeSource
- 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.
- Since:
- 2013.0
-
Constructor Summary
ModifierConstructorDescriptionprotected
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. -
Method Summary
Modifier and TypeMethodDescriptionvoid
addChangeListener
(ILcdChangeListener aListener) Registers the given listener so it will receive change events from this source.abstract void
dispose()
Dispose this print context.protected final void
Fires a change event to notify that the printable component has changed.abstract Printable
Returns thePrintable
that prints the view.Get the properties object for this printable component.getView()
Returns the view that represents the content of the printable.abstract void
Invalidates the state of thisALcyPrintContext
.void
removeChangeListener
(ILcdChangeListener aListener) Removes the specified listener so it is no longer notified.
-
Constructor Details
-
ALcyPrintContext
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.- Parameters:
aView
- the viewaProperties
- the properties.
-
-
Method Details
-
getView
Returns the view that represents the content of the printable.- Returns:
- the view.
-
dispose
public abstract void dispose()Dispose this print context. -
getProperties
Get the properties object for this printable component. The keys of these properties are the various constants that end inKEY
ofTLcyPrintAddOn
.- Returns:
- the properties object for this printable component.
-
addChangeListener
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 interfaceILcdChangeSource
- Parameters:
aListener
- The listener to be notified when a change has happened.- See Also:
-
removeChangeListener
Description copied from interface:ILcdChangeSource
Removes the specified listener so it is no longer notified.- Specified by:
removeChangeListener
in interfaceILcdChangeSource
- Parameters:
aListener
- The listener to remove.
-
firePrintableComponentChangeEvent
Fires a change event to notify that the printable component has changed.- Parameters:
aEvent
- a change event
-
getPrintable
Returns thePrintable
that prints the view.- Returns:
- the
Printable
that prints the view.
-
invalidate
public abstract void invalidate()Invalidates the state of thisALcyPrintContext
. It can for example be used to refresh the print preview.
-