Package com.iizix.license
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 Summary
Modifier and TypeMethodDescriptionboolean
addCancelListener
(Runnable listener) Adds a cancel listener.boolean
cancel()
/** Requests cancel of the feedback or dialog.void
createDialog
(int type, Object... params) Creates the UI dialog.void
dispose()
Disposes of the dialog.Gets the cancel return code.Gets the current return code.boolean
Checks if cancel is requested by the user.default RETURN_CODE
When this is method called from an unknown thread, it is blocked until the user feed-back dialog is closed.processDialogBlocked
(Thread threadToStart) When this is method called from an unknown thread, it is blocked until the user feed-back dialog is closed.boolean
removeCancelListener
(Runnable listener) Removes a cancel listener.void
setReturnCode
(RETURN_CODE returnCode) Assigns the return code BEFORE disposing the dialog.updateFeedBack
(Object... objects) Updates the feed-back dialog.
Method Details
createDialog
Creates the UI dialog.- Parameters:
type
- Type of dialog: 1=connection feed-back, 2=final data received.params
- Parameters.
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
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
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
Assigns the return code BEFORE disposing the dialog. The dispose must be done usingdispose()
. 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
Adds a cancel listener.- Parameters:
listener
- The listener to add.- Returns:
- true if added, false if already added.
removeCancelListener
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.