Java 类com.intellij.uiDesigner.radComponents.RadTabbedPane 实例源码

项目:intellij-ce-playground    文件:GuiEditor.java   
private Map<String, String> saveTabbedPaneSelectedTabs() {
  final Map<String, String> result = new HashMap<String, String>();
  FormEditingUtil.iterate(getRootContainer(), new FormEditingUtil.ComponentVisitor() {
    public boolean visit(final IComponent component) {
      if (component instanceof RadTabbedPane) {
        RadTabbedPane tabbedPane = (RadTabbedPane)component;
        RadComponent c = tabbedPane.getSelectedTab();
        if (c != null) {
          result.put(tabbedPane.getId(), c.getId());
        }
      }
      return true;
    }
  });
  return result;
}
项目:intellij-ce-playground    文件:GuiEditor.java   
private void restoreTabbedPaneSelectedTabs(final Map<String, String> tabbedPaneSelectedTabs) {
  FormEditingUtil.iterate(getRootContainer(), new FormEditingUtil.ComponentVisitor() {
    public boolean visit(final IComponent component) {
      if (component instanceof RadTabbedPane) {
        RadTabbedPane tabbedPane = (RadTabbedPane)component;
        String selectedTabId = tabbedPaneSelectedTabs.get(tabbedPane.getId());
        if (selectedTabId != null) {
          for (RadComponent c : tabbedPane.getComponents()) {
            if (c.getId().equals(selectedTabId)) {
              tabbedPane.selectTab(c);
              break;
            }
          }
        }
      }
      return true;
    }
  });
}
项目:tools-idea    文件:GuiEditor.java   
private Map<String, String> saveTabbedPaneSelectedTabs() {
  final Map<String, String> result = new HashMap<String, String>();
  FormEditingUtil.iterate(getRootContainer(), new FormEditingUtil.ComponentVisitor() {
    public boolean visit(final IComponent component) {
      if (component instanceof RadTabbedPane) {
        RadTabbedPane tabbedPane = (RadTabbedPane)component;
        RadComponent c = tabbedPane.getSelectedTab();
        if (c != null) {
          result.put(tabbedPane.getId(), c.getId());
        }
      }
      return true;
    }
  });
  return result;
}
项目:tools-idea    文件:GuiEditor.java   
private void restoreTabbedPaneSelectedTabs(final Map<String, String> tabbedPaneSelectedTabs) {
  FormEditingUtil.iterate(getRootContainer(), new FormEditingUtil.ComponentVisitor() {
    public boolean visit(final IComponent component) {
      if (component instanceof RadTabbedPane) {
        RadTabbedPane tabbedPane = (RadTabbedPane)component;
        String selectedTabId = tabbedPaneSelectedTabs.get(tabbedPane.getId());
        if (selectedTabId != null) {
          for (RadComponent c : tabbedPane.getComponents()) {
            if (c.getId().equals(selectedTabId)) {
              tabbedPane.selectTab(c);
              break;
            }
          }
        }
      }
      return true;
    }
  });
}
项目:consulo-ui-designer    文件:GuiEditor.java   
private Map<String, String> saveTabbedPaneSelectedTabs()
{
    final Map<String, String> result = new HashMap<String, String>();
    FormEditingUtil.iterate(getRootContainer(), new FormEditingUtil.ComponentVisitor()
    {
        @Override
        public boolean visit(final IComponent component)
        {
            if(component instanceof RadTabbedPane)
            {
                RadTabbedPane tabbedPane = (RadTabbedPane) component;
                RadComponent c = tabbedPane.getSelectedTab();
                if(c != null)
                {
                    result.put(tabbedPane.getId(), c.getId());
                }
            }
            return true;
        }
    });
    return result;
}
项目:intellij-ce-playground    文件:AddTabAction.java   
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()));
}
项目:intellij-ce-playground    文件:GuiEditor.java   
private void refreshProperties() {
  final Ref<Boolean> anythingModified = new Ref<Boolean>();
  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);
  }
}
项目:tools-idea    文件:AddTabAction.java   
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()));
}
项目:tools-idea    文件:GuiEditor.java   
private void refreshProperties() {
  final Ref<Boolean> anythingModified = new Ref<Boolean>();
  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();
    final UIDesignerToolWindowManager twm = UIDesignerToolWindowManager.getInstance(getProject());
    twm.getComponentTree().repaint();
    twm.getPropertyInspector().synchWithTree(true);
  }
}
项目:consulo-ui-designer    文件:AddTabAction.java   
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()));
}
项目:consulo-ui-designer    文件:GuiEditor.java   
private void restoreTabbedPaneSelectedTabs(final Map<String, String> tabbedPaneSelectedTabs)
{
    FormEditingUtil.iterate(getRootContainer(), new FormEditingUtil.ComponentVisitor()
    {
        @Override
        public boolean visit(final IComponent component)
        {
            if(component instanceof RadTabbedPane)
            {
                RadTabbedPane tabbedPane = (RadTabbedPane) component;
                String selectedTabId = tabbedPaneSelectedTabs.get(tabbedPane.getId());
                if(selectedTabId != null)
                {
                    for(RadComponent c : tabbedPane.getComponents())
                    {
                        if(c.getId().equals(selectedTabId))
                        {
                            tabbedPane.selectTab(c);
                            break;
                        }
                    }
                }
            }
            return true;
        }
    });
}
项目:intellij-ce-playground    文件:AddTabAction.java   
@Override protected void update(@NotNull GuiEditor editor, final ArrayList<RadComponent> selection, final AnActionEvent e) {
  e.getPresentation().setVisible(selection.size() == 1 && selection.get(0) instanceof RadTabbedPane);
}
项目:intellij-ce-playground    文件:I18nFormInspection.java   
private static boolean isPropertyDescriptor(final IProperty prop) {
  return !prop.getName().equals(BorderProperty.NAME) && !prop.getName().equals(RadTabbedPane.TAB_TITLE_PROPERTY) &&
         !prop.getName().equals(RadTabbedPane.TAB_TOOLTIP_PROPERTY);
}
项目:intellij-ce-playground    文件:I18nizeTabTitleQuickFix.java   
protected StringDescriptor getStringDescriptorValue() {
  RadTabbedPane tabbedPane = (RadTabbedPane) myComponent.getParent();
  return tabbedPane.getTabProperty(myComponent, myPropName);
}
项目:intellij-ce-playground    文件:I18nizeTabTitleQuickFix.java   
protected void setStringDescriptorValue(final StringDescriptor descriptor) throws Exception {
  RadTabbedPane tabbedPane = (RadTabbedPane) myComponent.getParent();
  tabbedPane.setTabProperty(myComponent, myPropName, descriptor);
}
项目:tools-idea    文件:AddTabAction.java   
@Override protected void update(@NotNull GuiEditor editor, final ArrayList<RadComponent> selection, final AnActionEvent e) {
  e.getPresentation().setVisible(selection.size() == 1 && selection.get(0) instanceof RadTabbedPane);
}
项目:tools-idea    文件:I18nFormInspection.java   
private static boolean isPropertyDescriptor(final IProperty prop) {
  return !prop.getName().equals(BorderProperty.NAME) && !prop.getName().equals(RadTabbedPane.TAB_TITLE_PROPERTY) &&
         !prop.getName().equals(RadTabbedPane.TAB_TOOLTIP_PROPERTY);
}
项目:tools-idea    文件:I18nizeTabTitleQuickFix.java   
protected StringDescriptor getStringDescriptorValue() {
  RadTabbedPane tabbedPane = (RadTabbedPane) myComponent.getParent();
  return tabbedPane.getTabProperty(myComponent, myPropName);
}
项目:tools-idea    文件:I18nizeTabTitleQuickFix.java   
protected void setStringDescriptorValue(final StringDescriptor descriptor) throws Exception {
  RadTabbedPane tabbedPane = (RadTabbedPane) myComponent.getParent();
  tabbedPane.setTabProperty(myComponent, myPropName, descriptor);
}
项目:consulo-ui-designer    文件:AddTabAction.java   
@Override protected void update(@NotNull GuiEditor editor, final ArrayList<RadComponent> selection, final AnActionEvent e) {
  e.getPresentation().setVisible(selection.size() == 1 && selection.get(0) instanceof RadTabbedPane);
}
项目:consulo-ui-designer    文件:GuiEditor.java   
private void refreshProperties()
{
    final Ref<Boolean> anythingModified = new Ref<Boolean>();
    FormEditingUtil.iterate(myRootContainer, new FormEditingUtil.ComponentVisitor()
    {
        @Override
        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);
        }
    }
}
项目:consulo-ui-designer    文件:I18nFormInspection.java   
private static boolean isPropertyDescriptor(final IProperty prop) {
  return !prop.getName().equals(BorderProperty.NAME) && !prop.getName().equals(RadTabbedPane.TAB_TITLE_PROPERTY) &&
         !prop.getName().equals(RadTabbedPane.TAB_TOOLTIP_PROPERTY);
}
项目:consulo-ui-designer    文件:I18nizeTabTitleQuickFix.java   
protected StringDescriptor getStringDescriptorValue() {
  RadTabbedPane tabbedPane = (RadTabbedPane) myComponent.getParent();
  return tabbedPane.getTabProperty(myComponent, myPropName);
}
项目:consulo-ui-designer    文件:I18nizeTabTitleQuickFix.java   
protected void setStringDescriptorValue(final StringDescriptor descriptor) throws Exception {
  RadTabbedPane tabbedPane = (RadTabbedPane) myComponent.getParent();
  tabbedPane.setTabProperty(myComponent, myPropName, descriptor);
}