# This patch file was generated by NetBeans IDE # Following Index: paths are relative to: D:\projects\nb.tabcontrol\projects\projectui\src\org\netbeans\modules\project\ui\actions # This patch can be applied using context Tools: Patch action on respective folder. # It uses platform neutral UTF-8 encoding and \n newlines. # Above lines and this line are ignored by the patching process. Index: ActiveConfigAction.java *** D:\projects\nb.tabcontrol\projects\projectui\src\org\netbeans\modules\project\ui\actions\ActiveConfigAction.java Base (1.3) --- D:\projects\nb.tabcontrol\projects\projectui\src\org\netbeans\modules\project\ui\actions\ActiveConfigAction.java Locally Modified (Based On 1.3) *************** *** 14,19 **** --- 14,20 ---- package org.netbeans.modules.project.ui.actions; import java.awt.Component; + import java.awt.Container; import java.awt.Dimension; import java.awt.GridBagConstraints; import java.awt.GridBagLayout; *************** *** 118,123 **** --- 119,126 ---- if (configs == null) { configListCombo.setModel(EMPTY_MODEL); configListCombo.setEnabled(false); + if( null != toolbarPanel ) + toolbarPanel.setVisible( false ); } else { DefaultComboBoxModel model = new DefaultComboBoxModel(configs.toArray()); if (pcp.hasCustomizer()) { *************** *** 125,131 **** --- 128,141 ---- } configListCombo.setModel(model); configListCombo.setEnabled(true); + if( null != toolbarPanel ) + toolbarPanel.setVisible( true ); } + if( null != toolbarPanel && null != toolbarPanel.getParent() ) { + Container parentComp = toolbarPanel.getParent(); + parentComp.invalidate(); + parentComp.repaint(); + } if (pcp != null) { activeConfigurationChanged(getActiveConfiguration(pcp)); } *************** *** 173,188 **** assert false; } public Component getToolbarPresenter() { // Do not return combo box directly; looks bad. ! JPanel panel = new JPanel(new GridBagLayout()); ! panel.setOpaque(false); // don't interrupt JToolBar background ! panel.setMaximumSize(new Dimension(150, 80)); ! panel.setMinimumSize(new Dimension(150, 0)); ! panel.setPreferredSize(new Dimension(150, 23)); // XXX top inset of 2 looks better w/ small toolbar, but 1 seems to look better for large toolbar (the default): ! panel.add(configListCombo, new GridBagConstraints(0, 0, 1, 1, 1.0, 1.0, GridBagConstraints.CENTER, GridBagConstraints.HORIZONTAL, new Insets(1, 6, 1, 5), 0, 0)); ! return panel; } class ConfigMenu extends JMenu implements DynamicMenuContent { --- 183,199 ---- assert false; } + private JPanel toolbarPanel; public Component getToolbarPresenter() { // Do not return combo box directly; looks bad. ! toolbarPanel = new JPanel(new GridBagLayout()); ! toolbarPanel.setOpaque(false); // don't interrupt JToolBar background ! toolbarPanel.setMaximumSize(new Dimension(150, 80)); ! toolbarPanel.setMinimumSize(new Dimension(150, 0)); ! toolbarPanel.setPreferredSize(new Dimension(150, 23)); // XXX top inset of 2 looks better w/ small toolbar, but 1 seems to look better for large toolbar (the default): ! toolbarPanel.add(configListCombo, new GridBagConstraints(0, 0, 1, 1, 1.0, 1.0, GridBagConstraints.CENTER, GridBagConstraints.HORIZONTAL, new Insets(1, 6, 1, 5), 0, 0)); ! return toolbarPanel; } class ConfigMenu extends JMenu implements DynamicMenuContent {