public abstract class ALcyPrintContext<V extends ILcdView> extends Object implements ILcdChangeSource
Instances of this object are created internally in the print add-ons.
Modifier | Constructor and Description |
---|---|
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. |
Modifier and Type | Method and Description |
---|---|
void |
addChangeListener(ILcdChangeListener aListener)
Registers the given listener so it will receive change events from this source.
|
abstract void |
dispose()
Dispose this print context.
|
protected void |
firePrintableComponentChangeEvent(TLcdChangeEvent aEvent)
Fires a change event to notify that the printable component has changed.
|
abstract Printable |
getPrintable()
Returns the
Printable that prints the view. |
TLcyProperties |
getProperties()
Get the properties object for this printable component.
|
V |
getView()
Returns the view that represents the content of the printable.
|
abstract void |
invalidate()
Invalidates the state of this
ALcyPrintContext . |
void |
removeChangeListener(ILcdChangeListener aListener)
Removes the specified listener so it is no longer notified.
|
protected ALcyPrintContext(V aView, TLcyProperties aProperties)
aView
- the viewaProperties
- the properties.public V getView()
public abstract void dispose()
public TLcyProperties getProperties()
KEY
of TLcyPrintAddOn
.public void addChangeListener(ILcdChangeListener aListener)
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.
addChangeListener
in interface ILcdChangeSource
aListener
- The listener to be notified when a change has happened.ILcdChangeSource.removeChangeListener(ILcdChangeListener)
,
ALcdWeakChangeListener
public void removeChangeListener(ILcdChangeListener aListener)
ILcdChangeSource
removeChangeListener
in interface ILcdChangeSource
aListener
- The listener to remove.protected final void firePrintableComponentChangeEvent(TLcdChangeEvent aEvent)
aEvent
- a change eventpublic abstract Printable getPrintable()
Printable
that prints the view.Printable
that prints the view.public abstract void invalidate()
ALcyPrintContext
. It can
for example be used to refresh the print preview.