public abstract class BusyTabsSupport extends Object
TopComponent.makeBusy(boolean)
) it forces repeated repaints of
that tab to allow animation effects. The UI of the tab container then can use
an icon this class provides (getBusyIcon(boolean)
)to indicate
the busy state. The default implementation of this class ensures that the
icon is properly animated in each repaint.TopComponent.makeBusy(boolean)
Modifier and Type | Class and Description |
---|---|
static class |
BusyTabsSupport.DefaultBusyTabsSupport
The default implementation of busy tabs.
|
Constructor and Description |
---|
BusyTabsSupport() |
Modifier and Type | Method and Description |
---|---|
abstract Icon |
getBusyIcon(boolean isTabSelected)
An icon that can be shown in busy tab's header to indicate some lengthy
process is being run in it.
|
static BusyTabsSupport |
getDefault() |
protected abstract int |
getRepaintTimerIntervalMillis() |
void |
install(Tabbed tabContainer,
TabDataModel tabModel)
Track changes in given tab container to have busy tab headers repainted.
|
void |
makeTabBusy(Tabbed tabContainer,
int tabIndex,
boolean busy)
Notification that busy state has changed for a given tab.
|
protected abstract void |
tick()
Invoked between each repaint events.
|
void |
uninstall(Tabbed tabContainer,
TabDataModel tabModel)
Unregister the given tab container.
|
public static BusyTabsSupport getDefault()
BusyTabsSupport.DefaultBusyTabsSupport
public final void install(Tabbed tabContainer, TabDataModel tabModel)
tabContainer
- Tab container. This method should be typically called
from container's addNotify()
.tabModel
- Container data model.public final void uninstall(Tabbed tabContainer, TabDataModel tabModel)
removeNotify()
.tabContainer
- tabModel
- public abstract Icon getBusyIcon(boolean isTabSelected)
isTabSelected
- True to get icon for a selected tab, false to get
icon for regular tab state.public final void makeTabBusy(Tabbed tabContainer, int tabIndex, boolean busy)
tabContainer
- Tab container.tabIndex
- Index of the tab.busy
- protected abstract int getRepaintTimerIntervalMillis()
protected abstract void tick()