Package org.csstudio.opibuilder.util
Class GUIRefreshThread
java.lang.Object
org.csstudio.opibuilder.util.GUIRefreshThread
- All Implemented Interfaces:
Runnable
A singleton back thread which will help to execute tasks for OPI GUI refreshing. This thread sleeps for a time which
can be set in the preference page. It can help throttle the unnecessary repaint caused by fast PV value updating.
-
Method Summary
Modifier and TypeMethodDescriptionvoidAdds the specified runnable to the queue.intstatic GUIRefreshThreadgetInstance(boolean isRuntime) Gets the singleton instance.voidReschedule this task upon the new GUI refresh cycle.voidrun()voidsetGUIRefreshCycle(int guiRefreshCycle) Set GUI Refresh Cycle.
-
Method Details
-
getInstance
Gets the singleton instance.- Returns:
- the singleton instance
-
reLoadGUIRefreshCycle
public void reLoadGUIRefreshCycle()Reschedule this task upon the new GUI refresh cycle. -
setGUIRefreshCycle
public void setGUIRefreshCycle(int guiRefreshCycle) Set GUI Refresh Cycle. This should be temporarily used only. It must be reset by callingreLoadGUIRefreshCycle()to ensure consistency.- Parameters:
guiRefreshCycle-
-
getGUIRefreshCycle
public int getGUIRefreshCycle() -
run
public void run() -
addIgnorableTask
Adds the specified runnable to the queue.- Parameters:
task- the ignorable UI task.
-