List of utility methods to do Swing UI Thread Event
void | invokeOnEventThread(Runnable r) GUI operations should be performed only on the AWT event dispatching thread. if (SwingUtilities.isEventDispatchThread()) { r.run(); } else { SwingUtilities.invokeAndWait(r); |
void | invokeOnEventThread(Runnable runnable) A wrapper around invokeOnEventThread. if (SwingUtilities.isEventDispatchThread()) { runnable.run(); } else { SwingUtilities.invokeLater(runnable); |
void | isEDT() is EDT if (!SwingUtilities.isEventDispatchThread()) { throw new Error("assertion failed: not on EDT"); |
boolean | isEDT() Returns true if the current thread is the Event Dispatcher Thread (EDT) return SwingUtilities.isEventDispatchThread();
|
boolean | isEDT() Returns TRUE if current thread is EDT. Boolean bool; synchronized (EDT_FLAG) { bool = EDT_FLAG.get(); if (bool == null) { bool = SwingUtilities.isEventDispatchThread(); EDT_FLAG.set(bool); return bool; |
boolean | isEventDispatchThread() is Event Dispatch Thread try { return SwingUtilities.isEventDispatchThread(); } catch (final NullPointerException e) { return false; |
boolean | isEventDispatchThread() Calls java.awt.EventQueue.isEventDispatchThread . return java.awt.EventQueue.isDispatchThread();
|
boolean | isLinefeedTag(HTML.Tag tag) is Linefeed Tag final List<HTML.Tag> breakers = new ArrayList<HTML.Tag>(); breakers.add(HTML.Tag.DIV); breakers.add(HTML.Tag.H1); breakers.add(HTML.Tag.H2); breakers.add(HTML.Tag.H3); breakers.add(HTML.Tag.H4); breakers.add(HTML.Tag.H5); breakers.add(HTML.Tag.LI); ... |
void | onShowingChanged(final JComponent component, final Runnable callback) on Showing Changed component.addHierarchyListener(new HierarchyListener() { public void hierarchyChanged(final HierarchyEvent e) { if (e.getComponent() == component && (e.getChangeFlags() & HierarchyEvent.SHOWING_CHANGED) > 0) { callback.run(); }); |
void | processOnSwingEventThread(Runnable todo, boolean wait) process On Swing Event Thread if (todo == null) { throw new IllegalArgumentException("Runnable == null"); if (wait) { if (SwingUtilities.isEventDispatchThread()) { todo.run(); } else { try { ... |