net.sf.jomic.comic
Class ConversionReportItem

java.lang.Object
  extended by net.sf.jomic.comic.ConversionReportItem

public class ConversionReportItem
extends java.lang.Object

Information about the current state of the conversion of one particular comic.

Author:
Thomas Aglassinger
See Also:
ComicToConvert

Field Summary
static java.lang.String STATE_CANCELLED
          State indicating that the conversion for this item has been cancelled.
static java.lang.String STATE_CONVERTING
          State indicating that the item is currently converted.
static java.lang.String STATE_DONE
          State indicating that the item was sucessfully converted.
static java.lang.String STATE_ERROR_DURING_CONVERSION
          State indicating that the conversion failed because of some error.
static java.lang.String STATE_ERROR_NOT_UNIQUE
          State indicating that the specified target could not be converted because another source comic already resulted in the same target.
static java.lang.String STATE_SKIPPED_DUPLICATE
          State indicating that thespecified source and target already where converted by another item.
static java.lang.String STATE_WAITING
          State indicating that the item is waiting to be converted.
 
Constructor Summary
ConversionReportItem(ComicToConvert comicToConvert)
           
 
Method Summary
 void addChangeListener(javax.swing.event.ChangeListener listener)
           
 java.lang.Throwable getError()
          Get details about the error that prevented the conversion to succeed.
 java.io.File getSourceFile()
           
 long getSourceFileSize()
           
 java.lang.String getState()
           
 javax.swing.Icon getStateIcon()
           
 java.io.File getTargetFile()
           
 long getTargetFileSize()
           
 void removeChangeListener(javax.swing.event.ChangeListener listener)
           
 void setConversionError(java.lang.Throwable newError)
          Set state to STATE_ERROR_DURING_CONVERSION and the related error information to newError .
 void setState(java.lang.String newState)
          Set the state of the conversion to any of the STATE_xxx values.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

STATE_CANCELLED

public static final java.lang.String STATE_CANCELLED
State indicating that the conversion for this item has been cancelled.

See Also:
Constant Field Values

STATE_CONVERTING

public static final java.lang.String STATE_CONVERTING
State indicating that the item is currently converted.

See Also:
Constant Field Values

STATE_DONE

public static final java.lang.String STATE_DONE
State indicating that the item was sucessfully converted.

See Also:
Constant Field Values

STATE_ERROR_DURING_CONVERSION

public static final java.lang.String STATE_ERROR_DURING_CONVERSION
State indicating that the conversion failed because of some error.

See Also:
Constant Field Values

STATE_ERROR_NOT_UNIQUE

public static final java.lang.String STATE_ERROR_NOT_UNIQUE
State indicating that the specified target could not be converted because another source comic already resulted in the same target.

See Also:
Constant Field Values

STATE_SKIPPED_DUPLICATE

public static final java.lang.String STATE_SKIPPED_DUPLICATE
State indicating that thespecified source and target already where converted by another item.

See Also:
Constant Field Values

STATE_WAITING

public static final java.lang.String STATE_WAITING
State indicating that the item is waiting to be converted.

See Also:
Constant Field Values
Constructor Detail

ConversionReportItem

public ConversionReportItem(ComicToConvert comicToConvert)
Method Detail

setConversionError

public void setConversionError(java.lang.Throwable newError)
Set state to STATE_ERROR_DURING_CONVERSION and the related error information to newError .


setState

public void setState(java.lang.String newState)
Set the state of the conversion to any of the STATE_xxx values. If the state changes to STATE_DONE, obtain the file size of the target file.

See Also:
STATE_DONE, getTargetFileSize()

getError

public java.lang.Throwable getError()
Get details about the error that prevented the conversion to succeed.

See Also:
setConversionError(Throwable)

getSourceFile

public java.io.File getSourceFile()

getSourceFileSize

public long getSourceFileSize()

getState

public java.lang.String getState()

getStateIcon

public javax.swing.Icon getStateIcon()

getTargetFile

public java.io.File getTargetFile()

getTargetFileSize

public long getTargetFileSize()

addChangeListener

public void addChangeListener(javax.swing.event.ChangeListener listener)

removeChangeListener

public void removeChangeListener(javax.swing.event.ChangeListener listener)