ExtendedDialog ed = new ExtendedDialog(Main.parent, tr("Set track visibility for {0}", layer.getName()), new String[]{tr("Show all"), tr("Show selected only"), tr("Cancel")});
ed.setButtonIcons(new String[]{"dialogs/layerlist/eye", "dialogs/filter", "cancel"});
ed.setContent(msg, false);
ed.setDefaultButton(2);
ed.setCancelButton(3);
ed.configureContextsensitiveHelp("/Action/ChooseTrackVisibility", true);
ed.setRememberWindowGeometry(getClass().getName() + ".geometry", WindowGeometry.centerInWindow(Main.parent, new Dimension(1000, 500)));
ed.showDialog();
dateFilter.saveInPrefs();
int v = ed.getValue();
// cancel for unknown buttons and copy back original settings