@Nullable public static ComponentItem replaceAnyComponentItem(GuiEditor editor, ComponentItem item, final String title) { if(item.isAnyComponent()) { ComponentItem newItem = item.clone(); ComponentItemDialog dlg = new ComponentItemDialog(editor.getProject(), editor, newItem, true); dlg.setTitle(title); dlg.show(); if(!dlg.isOK()) { return null; } return newItem; } return item; }
@Nullable public static ComponentItem replaceAnyComponentItem(GuiEditor editor, ComponentItem item, final String title) { if (item.isAnyComponent()) { ComponentItem newItem = item.clone(); ComponentItemDialog dlg = new ComponentItemDialog(editor.getProject(), editor, newItem, true); dlg.setTitle(title); if (!dlg.showAndGet()) { return null; } return newItem; } return item; }
@Nullable public static ComponentItem replaceAnyComponentItem(GuiEditor editor, ComponentItem item, final String title) { if (item.isAnyComponent()) { ComponentItem newItem = item.clone(); ComponentItemDialog dlg = new ComponentItemDialog(editor.getProject(), editor, newItem, true); dlg.setTitle(title); dlg.show(); if (!dlg.isOK()) { return null; } return newItem; } return item; }