Java Swing UI Thread Event isEDT()

Here you can find the source of isEDT()

Description

is EDT

License

Open Source License

Declaration

public static void isEDT() 

Method Source Code

//package com.java2s;
/**/* ww w.java2  s. co m*/
 * @(#)GUIUtil.java 1.0 26.09.06 (dd.mm.yy)
 *
 * Copyright (2003) Bro3
 * 
 * This program is free software; you can redistribute it and/or modify it under
 * the terms of the GNU General Public License as published by the Free Software
 * Foundation; either version 2, or any later version.
 * 
 * This program is distributed in the hope that it will be useful, but WITHOUT
 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
 * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
 * 
 * You should have received a copy of the GNU General Public License along with 
 * this program; if not, write to the Free Software Foundation, Inc., 59 Temple
 * Place, Boston, MA 02111.
 * 
 * Contact: bro3@users.sourceforge.net
 **/

import javax.swing.SwingUtilities;

public class Main {
    public static void isEDT() {
        if (!SwingUtilities.isEventDispatchThread()) {
            throw new Error("assertion failed: not on EDT");
        }
    }
}

Related

  1. invokeOnEventDispatchThreadIfRequired(final Runnable runnable)
  2. invokeOnEventThread(Runnable r)
  3. invokeOnEventThread(Runnable r)
  4. invokeOnEventThread(Runnable runnable)
  5. isEDT()
  6. isEDT()
  7. isEventDispatchThread()
  8. isEventDispatchThread()
  9. isLinefeedTag(HTML.Tag tag)