Class FWImagePopupController
java.lang.Object
java.lang.Thread
net.simplace.ui.popup.FWImagePopupController
- All Implemented Interfaces:
MouseListener, Runnable, EventListener
Thread showing an image popup for a given time. A click on the image keeps it open until the next click; a new
popup interrupts (and hides) the previous one.
- Author:
- Andreas Enders
-
Nested Class Summary
Nested classes/interfaces inherited from class Thread
Thread.Builder, Thread.State, Thread.UncaughtExceptionHandler -
Field Summary
Fields inherited from class Thread
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY -
Method Summary
Modifier and TypeMethodDescriptionvoidvoidvoidvoidvoidvoidrun()static FWImagePopupControllershowPopup(ImageIcon aPopUpImage, int aTimeToShowInSeconds, int aXCoordOnScreen, int aYCoordOnScreen) Shows the image popup in a new thread, interrupting a popup still shown.Methods inherited from class Thread
activeCount, checkAccess, clone, currentThread, dumpStack, enumerate, getAllStackTraces, getContextClassLoader, getDefaultUncaughtExceptionHandler, getId, getName, getPriority, getStackTrace, getState, getThreadGroup, getUncaughtExceptionHandler, holdsLock, interrupt, interrupted, isAlive, isDaemon, isInterrupted, isVirtual, join, join, join, join, ofPlatform, ofVirtual, onSpinWait, setContextClassLoader, setDaemon, setDefaultUncaughtExceptionHandler, setName, setPriority, setUncaughtExceptionHandler, sleep, sleep, sleep, start, startVirtualThread, stop, threadId, toString, yield
-
Method Details
-
showPopup
public static FWImagePopupController showPopup(ImageIcon aPopUpImage, int aTimeToShowInSeconds, int aXCoordOnScreen, int aYCoordOnScreen) Shows the image popup in a new thread, interrupting a popup still shown.- Parameters:
aPopUpImage- the imageaTimeToShowInSeconds- display time in secondsaXCoordOnScreen- x position on the screenaYCoordOnScreen- y position on the screen- Returns:
- the started controller thread
-
run
-
mouseClicked
- Specified by:
mouseClickedin interfaceMouseListener
-
mouseEntered
- Specified by:
mouseEnteredin interfaceMouseListener
-
mouseExited
- Specified by:
mouseExitedin interfaceMouseListener
-
mousePressed
- Specified by:
mousePressedin interfaceMouseListener
-
mouseReleased
- Specified by:
mouseReleasedin interfaceMouseListener
-