Search in sources :

Example 1 with RadTabbedPane

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

the class AddTabAction method actionPerformed.

protected void actionPerformed(final GuiEditor editor, final List<RadComponent> selection, final AnActionEvent e) {
    RadTabbedPane tabbedPane = (RadTabbedPane) selection.get(0);
    Palette palette = Palette.getInstance(editor.getProject());
    final RadComponent radComponent = InsertComponentProcessor.createPanelComponent(editor);
    final ComponentDropLocation dropLocation = tabbedPane.getDropLocation(null);
    dropLocation.processDrop(editor, new RadComponent[] { radComponent }, null, new ComponentItemDragObject(palette.getPanelItem()));
}
Also used : Palette(com.intellij.uiDesigner.palette.Palette) RadTabbedPane(com.intellij.uiDesigner.radComponents.RadTabbedPane) RadComponent(com.intellij.uiDesigner.radComponents.RadComponent) ComponentItemDragObject(com.intellij.uiDesigner.designSurface.ComponentItemDragObject) ComponentDropLocation(com.intellij.uiDesigner.designSurface.ComponentDropLocation)

Example 2 with RadTabbedPane

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

the class I18nizeTabTitleQuickFix method setStringDescriptorValue.

protected void setStringDescriptorValue(final StringDescriptor descriptor) throws Exception {
    RadTabbedPane tabbedPane = (RadTabbedPane) myComponent.getParent();
    tabbedPane.setTabProperty(myComponent, myPropName, descriptor);
}
Also used : RadTabbedPane(com.intellij.uiDesigner.radComponents.RadTabbedPane)

Example 3 with RadTabbedPane

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

the class GuiEditor method refreshProperties.

private void refreshProperties() {
    final Ref<Boolean> anythingModified = new Ref<>();
    FormEditingUtil.iterate(myRootContainer, new FormEditingUtil.ComponentVisitor() {

        public boolean visit(final IComponent component) {
            final RadComponent radComponent = (RadComponent) component;
            boolean componentModified = false;
            for (IProperty prop : component.getModifiedProperties()) {
                if (prop instanceof IntroStringProperty) {
                    IntroStringProperty strProp = (IntroStringProperty) prop;
                    componentModified = strProp.refreshValue(radComponent) || componentModified;
                }
            }
            if (component instanceof RadContainer) {
                componentModified = ((RadContainer) component).updateBorder() || componentModified;
            }
            if (component.getParentContainer() instanceof RadTabbedPane) {
                componentModified = ((RadTabbedPane) component.getParentContainer()).refreshChildTitle(radComponent) || componentModified;
            }
            if (componentModified) {
                anythingModified.set(Boolean.TRUE);
            }
            return true;
        }
    });
    if (!anythingModified.isNull()) {
        refresh();
        DesignerToolWindow designerToolWindow = DesignerToolWindowManager.getInstance(this);
        ComponentTree tree = designerToolWindow.getComponentTree();
        if (tree != null)
            tree.repaint();
        PropertyInspector inspector = designerToolWindow.getPropertyInspector();
        if (inspector != null)
            inspector.synchWithTree(true);
    }
}
Also used : IComponent(com.intellij.uiDesigner.lw.IComponent) RadComponent(com.intellij.uiDesigner.radComponents.RadComponent) DesignerToolWindow(com.intellij.uiDesigner.propertyInspector.DesignerToolWindow) PropertyInspector(com.intellij.uiDesigner.propertyInspector.PropertyInspector) ComponentTree(com.intellij.uiDesigner.componentTree.ComponentTree) Ref(com.intellij.openapi.util.Ref) RadTabbedPane(com.intellij.uiDesigner.radComponents.RadTabbedPane) IProperty(com.intellij.uiDesigner.lw.IProperty) IntroStringProperty(com.intellij.uiDesigner.propertyInspector.properties.IntroStringProperty) RadContainer(com.intellij.uiDesigner.radComponents.RadContainer)

Aggregations

RadTabbedPane (com.intellij.uiDesigner.radComponents.RadTabbedPane)3 RadComponent (com.intellij.uiDesigner.radComponents.RadComponent)2 Ref (com.intellij.openapi.util.Ref)1 ComponentTree (com.intellij.uiDesigner.componentTree.ComponentTree)1 ComponentDropLocation (com.intellij.uiDesigner.designSurface.ComponentDropLocation)1 ComponentItemDragObject (com.intellij.uiDesigner.designSurface.ComponentItemDragObject)1 IComponent (com.intellij.uiDesigner.lw.IComponent)1 IProperty (com.intellij.uiDesigner.lw.IProperty)1 Palette (com.intellij.uiDesigner.palette.Palette)1 DesignerToolWindow (com.intellij.uiDesigner.propertyInspector.DesignerToolWindow)1 PropertyInspector (com.intellij.uiDesigner.propertyInspector.PropertyInspector)1 IntroStringProperty (com.intellij.uiDesigner.propertyInspector.properties.IntroStringProperty)1 RadContainer (com.intellij.uiDesigner.radComponents.RadContainer)1