SwingInteractiveReporter

public class SwingInteractiveReporter implements Reporter

A reporter that can wrap another reporter and give you a prompt to approve the new result value.

This is useful for reporters that cannot give you a clear way to create the result file. If for example you are using a reporter that only shows you the resulting value but you cannot move it to the proper result file for the approval.

If you say OK/YES on the prompt then the result will be written to the proper file for the next approval time.

Constructors

SwingInteractiveReporter

SwingInteractiveReporter(Reporter other, FileSystemUtils fileSystemReadWriter)

Methods

approveNew

public void approveNew(byte[] value, File fileForApproval, File fileForVerification)

canApprove

public boolean canApprove(File fileForApproval)

isHeadless

boolean isHeadless()

notTheSame

public void notTheSame(byte[] oldValue, File fileForVerification, byte[] newValue, File fileForApproval)

promptUser

int promptUser()

wrap

public static SwingInteractiveReporter wrap(Reporter reporter)

Wrap another reporter.

Parameters:
  • reporter – the other reporter
Returns:

a new reporter that call the other reporter and then propmts the user