Search in sources :

Example 1 with IdentifierValidator

use of com.intellij.uiDesigner.propertyInspector.properties.IdentifierValidator in project intellij-community by JetBrains.

the class GroupButtonsAction method groupButtons.

public static void groupButtons(final GuiEditor editor, final List<RadComponent> selectedComponents) {
    if (!editor.ensureEditable())
        return;
    String groupName = Messages.showInputDialog(editor.getProject(), UIDesignerBundle.message("group.buttons.name.prompt"), UIDesignerBundle.message("group.buttons.title"), Messages.getQuestionIcon(), editor.getRootContainer().suggestGroupName(), new IdentifierValidator(editor.getProject()));
    if (groupName == null)
        return;
    RadRootContainer rootContainer = editor.getRootContainer();
    RadButtonGroup group = rootContainer.createGroup(groupName);
    for (RadComponent component : selectedComponents) {
        rootContainer.setGroupForComponent(component, group);
    }
    editor.refreshAndSave(true);
}
Also used : RadButtonGroup(com.intellij.uiDesigner.radComponents.RadButtonGroup) RadRootContainer(com.intellij.uiDesigner.radComponents.RadRootContainer) RadComponent(com.intellij.uiDesigner.radComponents.RadComponent) IdentifierValidator(com.intellij.uiDesigner.propertyInspector.properties.IdentifierValidator)

Aggregations

IdentifierValidator (com.intellij.uiDesigner.propertyInspector.properties.IdentifierValidator)1 RadButtonGroup (com.intellij.uiDesigner.radComponents.RadButtonGroup)1 RadComponent (com.intellij.uiDesigner.radComponents.RadComponent)1 RadRootContainer (com.intellij.uiDesigner.radComponents.RadRootContainer)1