Class MemoryMonitor.RepaintThread

  • All Implemented Interfaces:
    java.lang.Runnable
    Enclosing class:
    MemoryMonitor

    public static class MemoryMonitor.RepaintThread
    extends java.lang.Thread
    This thread repaints a list of components.
    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
      protected class  MemoryMonitor.RepaintThread.UpdateRunnable  
      • Nested classes/interfaces inherited from class java.lang.Thread

        java.lang.Thread.State, java.lang.Thread.UncaughtExceptionHandler
    • Field Summary

      Fields 
      Modifier and Type Field Description
      protected java.util.List components
      The components to repaint.
      protected java.lang.Runtime runtime
      The runtime.
      protected boolean suspended
      Whether or not the thread was supended.
      protected long timeout
      The repaint timeout
      protected MemoryMonitor.RepaintThread.UpdateRunnable updateRunnable
      Runnable for updating components.
      • Fields inherited from class java.lang.Thread

        MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY
    • Constructor Summary

      Constructors 
      Constructor Description
      RepaintThread​(long timeout, java.util.List components)
      Creates a new Thread.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      protected MemoryMonitor.RepaintThread.UpdateRunnable createUpdateRunnable()  
      void run()
      The thread main method.
      void safeResume()
      Resumes the thread.
      void safeSuspend()
      Suspends the thread.
      • Methods inherited from class java.lang.Thread

        activeCount, checkAccess, clone, countStackFrames, currentThread, dumpStack, enumerate, getAllStackTraces, getContextClassLoader, getDefaultUncaughtExceptionHandler, getId, getName, getPriority, getStackTrace, getState, getThreadGroup, getUncaughtExceptionHandler, holdsLock, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, onSpinWait, resume, setContextClassLoader, setDaemon, setDefaultUncaughtExceptionHandler, setName, setPriority, setUncaughtExceptionHandler, sleep, sleep, start, stop, suspend, toString, yield
      • Methods inherited from class java.lang.Object

        equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
    • Field Detail

      • timeout

        protected long timeout
        The repaint timeout
      • components

        protected java.util.List components
        The components to repaint.
      • runtime

        protected java.lang.Runtime runtime
        The runtime.
      • suspended

        protected boolean suspended
        Whether or not the thread was supended.
    • Constructor Detail

      • RepaintThread

        public RepaintThread​(long timeout,
                             java.util.List components)
        Creates a new Thread.
        Parameters:
        timeout - The time between two repaint in ms.
        components - The components to repaint.
    • Method Detail

      • run

        public void run()
        The thread main method.
        Specified by:
        run in interface java.lang.Runnable
        Overrides:
        run in class java.lang.Thread
      • safeSuspend

        public void safeSuspend()
        Suspends the thread.
      • safeResume

        public void safeResume()
        Resumes the thread.