static int awtOnConceptChanges_defaultDelay = 1000; static void awtOnConceptChanges(Component component, O runnable) { awtOnConceptChanges(componentToJComponent(component), runnable, true); } static void awtOnConceptChanges(JComponent component, final O runnable, bool runOnFirstTime) { awtOnConceptChanges(component, awtOnConceptChanges_defaultDelay, 0, runnable, runOnFirstTime); } static void awtOnConceptChanges(JComponent component, int delay, final O runnable) { awtOnConceptChanges(component, delay, delay, runnable); } static void awtOnConceptChanges(JComponent component, int delay, int firstDelay, O runnable) { awtOnConceptChanges(component, delay, firstDelay, runnable, true); } sbool awtOnConceptChanges_debug; static void awtOnConceptChanges(JComponent component, int delay, int firstDelay, final O runnable, final bool runOnFirstTime) { installTimer(component, delay, firstDelay, new Runnable { long c = runOnFirstTime ? -1 : changeCount(); public void run() { long _c = changeCount(); if (awtOnConceptChanges_debug) print("awtOnConceptChanges: " + _c + " / " + c); if (_c != c) { c = _c; call(runnable); } } }); }