Package com.biglybt.ui.swt.uiupdater
Class UIUpdaterSWT
java.lang.Object
com.biglybt.core.util.AEThread2
com.biglybt.ui.swt.uiupdater.UIUpdaterSWT
- All Implemented Interfaces:
ParameterListener
,UIUpdater
-
Nested Class Summary
Nested classes/interfaces inherited from class com.biglybt.core.util.AEThread2
AEThread2.threadWrapper
Nested classes/interfaces inherited from interface com.biglybt.ui.common.updater.UIUpdater
UIUpdater.UIUpdaterListener
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate CopyOnWriteList
<UIUpdatable> (package private) WeakHashMap
<UIUpdatable, Long[]> private static final String
private static final String
private static final boolean
Calculate timer statistics for GUI updateprivate WeakHashMap
<UIUpdatable, String> private static final boolean
private boolean
private int
private int
private static final LogIDs
private CopyOnWriteList
<UIUpdatable> private int
private int
private CopyOnWriteList
<UIUpdatable> private AEMonitor
private static UIUpdater
private int
Fields inherited from class com.biglybt.core.util.AEThread2
TRACE_TIMES
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
addListener
(UIUpdater.UIUpdaterListener listener) void
addPeriodicUpdater
(UIUpdatable updateable) TriggerUIUpdatable.updateUI()
every secondvoid
addUpdater
(UIUpdatable updateable) static void
static UIUpdater
boolean
isAdded
(UIUpdatable updateable) private void
makeDebugToolTip
(Map<UIUpdatable, Long> timeMap) void
parameterChanged
(String parameterName) Called, when a parameter has changed.void
removeListener
(UIUpdater.UIUpdaterListener listener) void
removePeriodicUpdater
(UIUpdatable updateable) void
removeUpdater
(UIUpdatable updateable) void
run()
void
stopIt()
private void
update
(CopyOnWriteList<UIUpdatable> updateables, boolean is_visible) Methods inherited from class com.biglybt.core.util.AEThread2
createAndStartDaemon, createAndStartDaemon2, getName, interrupt, isAlive, isCurrentThread, isOurThread, join, setName, setOurThread, setOurThread, setPriority, start, toString
-
Field Details
-
LOGID
-
CFG_REFRESH_INTERVAL
- See Also:
-
CFG_REFRESH_INACTIVE_FACTOR
- See Also:
-
DEBUG_TIMER
private static final boolean DEBUG_TIMERCalculate timer statistics for GUI update -
DEBUG_UPDATEABLES
private static final boolean DEBUG_UPDATEABLES -
updater
-
waitTimeMS
private int waitTimeMS -
finished
private boolean finished -
updateables
-
debug_Updateables
-
alwaysUpdateables
-
updateables_mon
-
inactiveFactor
private int inactiveFactor -
inactiveTicks
private int inactiveTicks -
averageTimes
WeakHashMap<UIUpdatable,Long[]> averageTimes -
update_count
private int update_count -
listeners
-
perioidic_updateables
-
pu_counter
private int pu_counter
-
-
Constructor Details
-
UIUpdaterSWT
public UIUpdaterSWT()
-
-
Method Details
-
getInstance
-
destroyInstance
public static void destroyInstance() -
run
public void run() -
parameterChanged
Description copied from interface:ParameterListener
Called, when a parameter has changed. The listener could only react if the parameter name is relevant. Or the listener can just read all parameters again.- Specified by:
parameterChanged
in interfaceParameterListener
- Parameters:
parameterName
- the name of the parameter that has changed
-
addUpdater
- Specified by:
addUpdater
in interfaceUIUpdater
-
isAdded
-
removeUpdater
- Specified by:
removeUpdater
in interfaceUIUpdater
-
stopIt
public void stopIt() -
update
-
makeDebugToolTip
-
addListener
- Specified by:
addListener
in interfaceUIUpdater
-
removeListener
- Specified by:
removeListener
in interfaceUIUpdater
-
addPeriodicUpdater
Description copied from interface:UIUpdater
TriggerUIUpdatable.updateUI()
every second- Specified by:
addPeriodicUpdater
in interfaceUIUpdater
-
removePeriodicUpdater
- Specified by:
removePeriodicUpdater
in interfaceUIUpdater
-