Package limn.backend.spi
Interface TrayPeer
public interface TrayPeer
What a backend does for
Tray: keep one icon in the system's place for one.
A backend owes four things. Every method here is called on the UI thread and returns at
once: what the system needs time for is done elsewhere. Every call it makes on its
TrayHost is on the UI thread. The menu is asked of the host each time the
system is about to open it, never kept from one opening to the next. And dispose() takes
the icon away, as does closing the backend.
-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionvoiddispose()Takes the icon away.voidhide()Takes the icon out of the tray until the nextupdate(limn.backend.spi.TrayState), which puts it back as the first one did.booleanvoidShows this state.
-
Field Details
-
NONE
The peer of a backend with no desktop under it: no icon, and never available.
-
-
Method Details
-
update
Shows this state. The first call is what puts the icon in the tray.- Parameters:
state- everything the icon shows
-
hide
void hide()Takes the icon out of the tray until the nextupdate(limn.backend.spi.TrayState), which puts it back as the first one did. The peer is not available meanwhile. Nothing happens when no icon is shown. -
isAvailable
boolean isAvailable()- Returns:
- whether the system took the icon. Not whether somebody sees it: no system says that
-
dispose
void dispose()Takes the icon away. Idempotent; nothing is called on the host afterwards.
-