com.levigo.jadice.printer.event
Class PrintEvent

java.lang.Object
  extended by java.util.EventObject
      extended by com.levigo.jadice.printer.event.PrintEvent
All Implemented Interfaces:
Serializable

public class PrintEvent
extends EventObject

Instances of PrintEvents will be reported by print jobs executed by jadice print api to let listeners know of the progress in the processing of the document print job.

See Also:
Serialized Form

Nested Class Summary
static class PrintEvent.PrintEventType
           
 
Field Summary
 
Fields inherited from class java.util.EventObject
source
 
Constructor Summary
PrintEvent(Object printSource, PrintEvent.PrintEventType type, Document document, Page page, String eventMessage)
          Creates a new PrintEvent.
 
Method Summary
 Document getDocument()
          Return the document which this event pertains to.
 String getErrorMessage()
          Return an error message describing the problem which may appear while printing or null if no error occurred.
 Page getPage()
          Gets the page.
 Object getPrintSource()
          The print source on which this event initially occurred.
 PrintEvent.PrintEventType getType()
          Gets the type of this event
 String paramString()
          Returns a parameter string identifying this event.
 String toString()
           
 
Methods inherited from class java.util.EventObject
getSource
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

PrintEvent

public PrintEvent(Object printSource,
                  PrintEvent.PrintEventType type,
                  Document document,
                  Page page,
                  String eventMessage)
Creates a new PrintEvent.

Parameters:
printSource - The source of the event, usually an instance of AbstractPrinter or a subclass of it
type - The type of event to be created
document - the Document to which the event is related to.
page - the Page to which the event is related to.
eventMessage - an error message describing the problem which may appear while printing
Method Detail

getPrintSource

public Object getPrintSource()
The print source on which this event initially occurred.

Returns:
The source of the event, usually an instance of AbstractPrinter or a subclass of it

getErrorMessage

public String getErrorMessage()
Return an error message describing the problem which may appear while printing or null if no error occurred.

Returns:
the error message

getType

public PrintEvent.PrintEventType getType()
Gets the type of this event

Returns:
event type

getPage

public Page getPage()
Gets the page.

Returns:
Returns the associated instance of Page or null if none present.

getDocument

public Document getDocument()
Return the document which this event pertains to.

Returns:
The associated instance of Document or null if none present.

paramString

public String paramString()
Returns a parameter string identifying this event. This method is useful for event-logging and for debugging.

Returns:
a string identifying the event and its attributes

toString

public String toString()
Overrides:
toString in class EventObject
See Also:
Object.toString()


Copyright © 1995-2020 levigo holding gmbh. All Rights Reserved.