Search in sources :

Example 1 with RadLayoutManager

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

the class LayoutManagerProperty method getValue.

public String getValue(RadContainer component) {
    RadContainer container = component;
    while (container != null) {
        final RadLayoutManager layoutManager = container.getLayoutManager();
        if (layoutManager != null) {
            return layoutManager.getName();
        }
        container = container.getParent();
    }
    return UIFormXmlConstants.LAYOUT_INTELLIJ;
}
Also used : RadLayoutManager(com.intellij.uiDesigner.radComponents.RadLayoutManager) RadContainer(com.intellij.uiDesigner.radComponents.RadContainer)

Example 2 with RadLayoutManager

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

the class LayoutManagerProperty method setValueImpl.

protected void setValueImpl(RadContainer component, String value) throws Exception {
    final RadLayoutManager oldLayout = component.getLayoutManager();
    if (oldLayout != null && Comparing.equal(oldLayout.getName(), value)) {
        return;
    }
    RadLayoutManager newLayoutManager = LayoutManagerRegistry.createLayoutManager(value);
    newLayoutManager.changeContainerLayout(component);
}
Also used : RadLayoutManager(com.intellij.uiDesigner.radComponents.RadLayoutManager)

Aggregations

RadLayoutManager (com.intellij.uiDesigner.radComponents.RadLayoutManager)2 RadContainer (com.intellij.uiDesigner.radComponents.RadContainer)1