mirror of
https://github.com/hneemann/Digital.git
synced 2025-09-19 09:54:49 -04:00
removed SwingUtilities.getWindowAncestor() from ItemPicker.
This commit is contained in:
parent
86e751c7cd
commit
e7a0b19ae7
@ -1294,7 +1294,7 @@ public class CircuitComponent extends JComponent implements Circuit.ChangedListe
|
||||
if (list.size() == 1)
|
||||
vp = list.get(0);
|
||||
else if (list.size() > 1) {
|
||||
ItemPicker<VisualElement> picker = new ItemPicker<>(CircuitComponent.this, list);
|
||||
ItemPicker<VisualElement> picker = new ItemPicker<>(parent, list);
|
||||
vp = picker.select();
|
||||
}
|
||||
return vp;
|
||||
|
@ -28,7 +28,7 @@ public class ItemPicker<T> extends JDialog {
|
||||
* @param parent the parent frame
|
||||
* @param items the list of items
|
||||
*/
|
||||
public ItemPicker(Component parent, final java.util.List<T> items) {
|
||||
public ItemPicker(Window parent, final java.util.List<T> items) {
|
||||
this(parent, Lang.get("win_itempicker_title"), items);
|
||||
}
|
||||
|
||||
@ -39,8 +39,8 @@ public class ItemPicker<T> extends JDialog {
|
||||
* @param title title of the dialog
|
||||
* @param items the list of items
|
||||
*/
|
||||
public ItemPicker(Component parent, final String title, final java.util.List<T> items) {
|
||||
super(SwingUtilities.getWindowAncestor(parent), title, ModalityType.APPLICATION_MODAL);
|
||||
public ItemPicker(Window parent, final String title, final java.util.List<T> items) {
|
||||
super(parent, title, ModalityType.APPLICATION_MODAL);
|
||||
this.items = items;
|
||||
setDefaultCloseOperation(DISPOSE_ON_CLOSE);
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user