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
ConstructorsModifierConstructorDescriptionprotectedALcyPrintContext(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 TypeMethodDescriptionvoidaddChangeListener(ILcdChangeListener aListener) Registers the given listener so it will receive change events from this source.abstract voiddispose()Dispose this print context.protected final voidFires a change event to notify that the printable component has changed.abstract PrintableReturns thePrintablethat prints the view.Get the properties object for this printable component.getView()Returns the view that represents the content of the printable.abstract voidInvalidates the state of thisALcyPrintContext.voidremoveChangeListener(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 inKEYofTLcyPrintAddOn.- Returns:
- the properties object for this printable component.
-
addChangeListener
Description copied from interface:ILcdChangeSourceRegisters 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
ALcdWeakChangeListenerinstance as change listener.- Specified by:
addChangeListenerin interfaceILcdChangeSource- Parameters:
aListener- The listener to be notified when a change has happened.- See Also:
-
removeChangeListener
Description copied from interface:ILcdChangeSourceRemoves the specified listener so it is no longer notified.- Specified by:
removeChangeListenerin 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 thePrintablethat prints the view.- Returns:
- the
Printablethat prints the view.
-
invalidate
public abstract void invalidate()Invalidates the state of thisALcyPrintContext. It can for example be used to refresh the print preview.
-