A bindTextComponentToLiveValue_scrollDown(final A tc, final LiveValue lv) {
return bindLiveValueListenerToComponent(tc, lv, new Runnable() {
public void run() {
try {
setTextAndMoveCaretToEnd(tc, strOrNull(lv.get()));
} catch (Exception __e) {
throw rethrow(__e);
}
}
public String toString() {
return "setTextAndMoveCaretToEnd(tc, strOrNull(lv.get()))";
}
});
}
static public void lock(Lock lock) {
try {
ping();
if (lock == null)
return;
try {
lock.lockInterruptibly();
} catch (InterruptedException e) {
print("Locking interrupted! I probably deadlocked, oops.");
printStackTrace(e);
rethrow(e);
}
ping();
} catch (Exception __e) {
throw rethrow(__e);
}
}
static public void lock(Lock lock, String msg) {
print("Locking: " + msg);
lock(lock);
}
static public void lock(Lock lock, String msg, long timeout) {
print("Locking: " + msg);
lockOrFail(lock, timeout);
}
static public ReentrantLock lock() {
return fairLock();
}
static public Class getFieldType(Object o, String field) {
return fieldType(o, field);
}
static public void unlock(Lock lock, String msg) {
if (lock == null)
return;
print("Unlocking: " + msg);
lock.unlock();
}
static public void unlock(Lock lock) {
if (lock == null)
return;
lock.unlock();
}
static public void dm_inQ(Runnable r) {
dm_q().add(r);
}
static public void disposeWindow(final Window window) {
if (window != null) {
swing(new Runnable() {
public void run() {
try {
window.dispatchEvent(new WindowEvent(window, WindowEvent.WINDOW_CLOSING));
myFrames_list.remove(window);
window.dispose();
} catch (Exception __e) {
throw rethrow(__e);
}
}
public String toString() {
return "window.dispatchEvent(new WindowEvent(window, WindowEvent.WINDOW_CLOSING)); //...";
}
});
}
}
static public void disposeWindow(final Component c) {
disposeWindow(getWindow(c));
}
static public void disposeWindow(Object o) {
if (o != null)
disposeWindow(((Component) o));
}
static public void disposeWindow() {
disposeWindow(heldInstance(Component.class));
}
static public boolean showAnimationInTopRightCorner_alwaysOnTop = true;
static public boolean showAnimationInTopRightCorner_on = true;
static public JWindow showAnimationInTopRightCorner(String imageID, String text) {
if (isHeadless() || !showAnimationInTopRightCorner_on)
return null;
return showAnimationInTopRightCorner(imageIcon(imageID), text);
}
static public JWindow showAnimationInTopRightCorner(final Image image, final String text) {
if (image == null || isHeadless() || !showAnimationInTopRightCorner_on)
return null;
return showAnimationInTopRightCorner(imageIcon(image), text);
}
static public JWindow showAnimationInTopRightCorner(final ImageIcon imageIcon, final String text) {
if (isHeadless() || !showAnimationInTopRightCorner_on)
return null;
return (JWindow) swingAndWait(new F0