Java 类com.intellij.uiDesigner.lw.IButtonGroup 实例源码

项目:intellij-ce-playground    文件:UngroupButtonsAction.java   
public static boolean isSameGroup(final GuiEditor editor, final ArrayList<RadComponent> selectedComponents) {
  final RadRootContainer rootContainer = editor.getRootContainer();
  IButtonGroup group = FormEditingUtil.findGroupForComponent(rootContainer, selectedComponents.get(0));
  if (group == null) {
    return false;
  }
  for(int i=1; i<selectedComponents.size(); i++) {
    if (FormEditingUtil.findGroupForComponent(rootContainer, selectedComponents.get(i)) != group) {
      return false;
    }
  }
  return true;
}
项目:intellij-ce-playground    文件:RadRootContainer.java   
public void setButtonGroups(final IButtonGroup[] buttonGroups) {
  myButtonGroups.clear();
  for(IButtonGroup lwGroup: buttonGroups) {
    final String[] componentIds = lwGroup.getComponentIds();
    if (componentIds.length > 0) {
      RadButtonGroup group = createGroup(lwGroup.getName());
      group.setBound(lwGroup.isBound());
      group.addComponentIds(componentIds);
    }
  }
}
项目:tools-idea    文件:UngroupButtonsAction.java   
public static boolean isSameGroup(final GuiEditor editor, final ArrayList<RadComponent> selectedComponents) {
  final RadRootContainer rootContainer = editor.getRootContainer();
  IButtonGroup group = FormEditingUtil.findGroupForComponent(rootContainer, selectedComponents.get(0));
  if (group == null) {
    return false;
  }
  for(int i=1; i<selectedComponents.size(); i++) {
    if (FormEditingUtil.findGroupForComponent(rootContainer, selectedComponents.get(i)) != group) {
      return false;
    }
  }
  return true;
}
项目:tools-idea    文件:RadRootContainer.java   
public void setButtonGroups(final IButtonGroup[] buttonGroups) {
  myButtonGroups.clear();
  for(IButtonGroup lwGroup: buttonGroups) {
    final String[] componentIds = lwGroup.getComponentIds();
    if (componentIds.length > 0) {
      RadButtonGroup group = createGroup(lwGroup.getName());
      group.setBound(lwGroup.isBound());
      group.addComponentIds(componentIds);
    }
  }
}
项目:consulo-ui-designer    文件:FormEditingUtil.java   
@Nullable
public static IButtonGroup findGroupForComponent(final IRootContainer radRootContainer, @NotNull final IComponent component)
{
    for(IButtonGroup group : radRootContainer.getButtonGroups())
    {
        for(String id : group.getComponentIds())
        {
            if(component.getId().equals(id))
            {
                return group;
            }
        }
    }
    return null;
}
项目:consulo-ui-designer    文件:UngroupButtonsAction.java   
public static boolean isSameGroup(final GuiEditor editor, final ArrayList<RadComponent> selectedComponents) {
  final RadRootContainer rootContainer = editor.getRootContainer();
  IButtonGroup group = FormEditingUtil.findGroupForComponent(rootContainer, selectedComponents.get(0));
  if (group == null) {
    return false;
  }
  for(int i=1; i<selectedComponents.size(); i++) {
    if (FormEditingUtil.findGroupForComponent(rootContainer, selectedComponents.get(i)) != group) {
      return false;
    }
  }
  return true;
}
项目:consulo-ui-designer    文件:RadRootContainer.java   
public void setButtonGroups(final IButtonGroup[] buttonGroups) {
  myButtonGroups.clear();
  for(IButtonGroup lwGroup: buttonGroups) {
    final String[] componentIds = lwGroup.getComponentIds();
    if (componentIds.length > 0) {
      RadButtonGroup group = createGroup(lwGroup.getName());
      group.setBound(lwGroup.isBound());
      group.addComponentIds(componentIds);
    }
  }
}