Let me elaborate a bit:
Instead of just creating a MonitoredWorkQueue, you can do:
MonitoredWorkQueue<AlbumObject> queue = new MonitoredWorkQueue(window, "Blah") {
@Override
protected void dialogOpening() {
dialog.setLocationRelativeTo(window.mainSettingsPanel);
}
};
To ease things further, I've also added the "lambda" way of achieving the same thing via the onDialogOpening call. Now you can call:
queue.onDialogOpening(d -> d.setLocationRelativeTo(window.mainSettingsPanel));
I also updated the "companion class" Work to allow the onDialogOpening call, so you can run code like this (Groovy):
Work.on(rootFolder.descendants)
.onDialogOpening(d -> d.setLocationRelativeTo(window.mainSettingsPanel))
.forEach(ao) -> {
println ao
Thread.sleep(100)
}
If you just want to give the dialogue a nudge to the right, you can do:
// Code input area
Work.on(rootFolder.descendants)
.onDialogOpening(d -> d.setLocation(d.x+20, d.y+20))
.forEach(ao) -> {
println ao
Thread.sleep(100)
}