void (final RadContainer container, final RadComponent component, final int index) { final JTabbedPane tabbedPane = getTabbedPane(); LwTabbedPane.Constraints constraints = null; if (component.getCustomLayoutConstraints() instanceof LwTabbedPane.Constraints) { constraints = ((LwTabbedPane.Constraints)component.getCustomLayoutConstraints()); } component.setCustomLayoutConstraints(null); final HashMap<String, LwTabbedPane.Constraints> id2Constraints = getId2Constraints(RadTabbedPane.this); id2Constraints.put(component.getId(), constraints); final @NlsSafe String tabName = calcTabName(constraints == null ? null : constraints.myTitle); @NlsSafe String toolTip = null; Icon icon = null; if (constraints != null) { toolTip = getDescriptorText(constraints.myToolTip); if (constraints.myIcon != null) { IntroIconProperty.ensureIconLoaded(getModule(), constraints.myIcon); icon = constraints.myIcon.getIcon(); } } tabbedPane.insertTab(tabName, icon, component.getDelegee(), toolTip, index); if (constraints != null) { if (constraints.myDisabledIcon != null) { IntroIconProperty.ensureIconLoaded(getModule(), constraints.myDisabledIcon); tabbedPane.setDisabledIconAt(index, constraints.myDisabledIcon.getIcon()); } tabbedPane.setEnabledAt(index, constraints.myEnabled); } }