Interface IUserInterfaceFeedback<RETURN_CODE>

  • Type Parameters:
    RETURN_CODE - The return code.
    All Known Implementing Classes:
    UIFeedBack

    public interface IUserInterfaceFeedback<RETURN_CODE>
    Feed-back to the user of what is going on.
    Author:
    Christopher Mindus
    • Method Detail

      • createDialog

        void createDialog​(int type,
                          java.lang.Object... params)
        Creates the UI dialog.
        Parameters:
        type - Type of dialog: 1=connection feed-back, 2=final data received.
        params - Parameters.
      • processDialogBlocked

        default RETURN_CODE processDialogBlocked()
        When this is method called from an unknown thread, it is blocked until the user feed-back dialog is closed.
        Returns:
        The return code Object, specific to the dialog type, getCancelReturnCode() for canceled by user or programmatically.
      • processDialogBlocked

        RETURN_CODE processDialogBlocked​(java.lang.Thread threadToStart)
        When this is method called from an unknown thread, it is blocked until the user feed-back dialog is closed.
        Parameters:
        threadToStart - Thread to start when dialog is opened, null for none.
        Returns:
        The return code Object, specific to the dialog type, null for CANCEL.
      • updateFeedBack

        java.lang.String updateFeedBack​(java.lang.Object... objects)
        Updates the feed-back dialog. This call can come from any thread.
        Parameters:
        objects - The objects to update.
        Returns:
        The last String encountered, or null for none.
      • setReturnCode

        void setReturnCode​(RETURN_CODE returnCode)
        Assigns the return code BEFORE disposing the dialog. The dispose must be done using dispose(). This method can be called from any thread.
        Parameters:
        returnCode - The return code Object, or null for cancel.
      • getReturnCode

        RETURN_CODE getReturnCode()
        Gets the current return code.
        Returns:
        The return code, or null for none.
      • addCancelListener

        boolean addCancelListener​(java.lang.Runnable listener)
        Adds a cancel listener.
        Parameters:
        listener - The listener to add.
        Returns:
        true if added, false if already added.
      • removeCancelListener

        boolean removeCancelListener​(java.lang.Runnable listener)
        Removes a cancel listener.
        Parameters:
        listener - The listener to remove.
        Returns:
        true if removed, false if already removed or never added.
      • getCancelReturnCode

        RETURN_CODE getCancelReturnCode()
        Gets the cancel return code.
        Returns:
        Return code for canceled operation.
      • cancel

        boolean cancel()
        /** Requests cancel of the feedback or dialog.
        Returns:
        true if cancel is accepted or false if rejected and ignored.
      • isCanceled

        boolean isCanceled()
        Checks if cancel is requested by the user.
        Returns:
        true if cancel is requested, false otherwise.
      • dispose

        void dispose()
        Disposes of the dialog. This method can be called from any thread.