Java 类com.intellij.uiDesigner.palette.ComponentItemDialog 实例源码

项目:consulo-ui-designer    文件:InsertComponentProcessor.java   
@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;
}
项目:intellij-ce-playground    文件:InsertComponentProcessor.java   
@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;
}
项目:tools-idea    文件:InsertComponentProcessor.java   
@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;
}