Search in sources :

Example 1 with RadScrollPane

use of com.intellij.uiDesigner.radComponents.RadScrollPane in project intellij-community by JetBrains.

the class IntroComponentProperty method updateLabelForBinding.

void updateLabelForBinding(final RadComponent component) {
    String value = getValue(component);
    String text = FormInspectionUtil.getText(component.getModule(), component);
    if (text != null && value != null) {
        RadRootContainer root = (RadRootContainer) FormEditingUtil.getRoot(component);
        if (root != null) {
            RadComponent valueComponent = (RadComponent) FormEditingUtil.findComponent(root, value);
            if (valueComponent != null) {
                if (valueComponent instanceof RadScrollPane && ((RadScrollPane) valueComponent).getComponentCount() == 1) {
                    valueComponent = ((RadScrollPane) valueComponent).getComponent(0);
                }
                BindingProperty.checkCreateBindingFromText(valueComponent, text);
            }
        }
    }
}
Also used : RadRootContainer(com.intellij.uiDesigner.radComponents.RadRootContainer) RadComponent(com.intellij.uiDesigner.radComponents.RadComponent) RadScrollPane(com.intellij.uiDesigner.radComponents.RadScrollPane)

Aggregations

RadComponent (com.intellij.uiDesigner.radComponents.RadComponent)1 RadRootContainer (com.intellij.uiDesigner.radComponents.RadRootContainer)1 RadScrollPane (com.intellij.uiDesigner.radComponents.RadScrollPane)1