# This patch file was generated by NetBeans IDE # Following Index: paths are relative to: D:\projects\nb.m7 # 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: openide/awt/src/org/openide/awt/resources/xp_close_pressed.png *** D:\projects\nb.m7\openide\awt\src\org\openide\awt\resources\xp_close_pressed.png No Base Revision --- D:\projects\nb.m7\openide\awt\src\org\openide\awt\resources\xp_close_pressed.png Locally New *************** *** 1,0 **** --- 1,1 ---- + [Binary File Locally New] Index: core/output2/src/org/netbeans/core/output2/resources/xp_close_rollover.png *** D:\projects\nb.m7\core\output2\src\org\netbeans\core\output2\resources\xp_close_rollover.png Base (1.1) --- D:\projects\nb.m7\core\output2\src\org\netbeans\core\output2\resources\xp_close_rollover.png Locally Deleted *************** *** 1,1 **** - [Binary File Base (1.1)] --- 1,0 ---- Index: core/output2/src/org/netbeans/core/output2/resources/xp_close_enabled.png *** D:\projects\nb.m7\core\output2\src\org\netbeans\core\output2\resources\xp_close_enabled.png Base (1.1) --- D:\projects\nb.m7\core\output2\src\org\netbeans\core\output2\resources\xp_close_enabled.png Locally Deleted *************** *** 1,1 **** - [Binary File Base (1.1)] --- 1,0 ---- Index: core/output2/src/org/netbeans/core/output2/resources/mac_close_rollover.png *** D:\projects\nb.m7\core\output2\src\org\netbeans\core\output2\resources\mac_close_rollover.png Base (1.1) --- D:\projects\nb.m7\core\output2\src\org\netbeans\core\output2\resources\mac_close_rollover.png Locally Deleted *************** *** 1,1 **** - [Binary File Base (1.1)] --- 1,0 ---- Index: openide/awt/src/org/openide/awt/resources/metal_close_pressed.png *** D:\projects\nb.m7\openide\awt\src\org\openide\awt\resources\metal_close_pressed.png No Base Revision --- D:\projects\nb.m7\openide\awt\src\org\openide\awt\resources\metal_close_pressed.png Locally New *************** *** 1,0 **** --- 1,1 ---- + [Binary File Locally New] Index: openide/awt/manifest.mf *** D:\projects\nb.m7\openide\awt\manifest.mf Base (1.10) --- D:\projects\nb.m7\openide\awt\manifest.mf Locally Modified (Based On 1.10) Index: openide/awt/src/org/openide/awt/resources/metal_close_rollover.png *** D:\projects\nb.m7\openide\awt\src\org\openide\awt\resources\metal_close_rollover.png No Base Revision --- D:\projects\nb.m7\openide\awt\src\org\openide\awt\resources\metal_close_rollover.png Locally New *************** *** 1,0 **** --- 1,1 ---- + [Binary File Locally New] Index: openide/awt/src/org/openide/awt/resources/xp_close_rollover.png *** D:\projects\nb.m7\openide\awt\src\org\openide\awt\resources\xp_close_rollover.png No Base Revision --- D:\projects\nb.m7\openide\awt\src\org\openide\awt\resources\xp_close_rollover.png Locally New *************** *** 1,0 **** --- 1,1 ---- + [Binary File Locally New] Index: openide/awt/src/org/openide/awt/resources/win_close_enabled.png *** D:\projects\nb.m7\openide\awt\src\org\openide\awt\resources\win_close_enabled.png No Base Revision --- D:\projects\nb.m7\openide\awt\src\org\openide\awt\resources\win_close_enabled.png Locally New *************** *** 1,0 **** --- 1,1 ---- + [Binary File Locally New] Index: core/output2/src/org/netbeans/core/output2/resources/mac_close_pressed.png *** D:\projects\nb.m7\core\output2\src\org\netbeans\core\output2\resources\mac_close_pressed.png Base (1.1) --- D:\projects\nb.m7\core\output2\src\org\netbeans\core\output2\resources\mac_close_pressed.png Locally Deleted *************** *** 1,1 **** - [Binary File Base (1.1)] --- 1,0 ---- Index: openide/awt/src/org/openide/awt/resources/vista_close_rollover.png *** D:\projects\nb.m7\openide\awt\src\org\openide\awt\resources\vista_close_rollover.png No Base Revision --- D:\projects\nb.m7\openide\awt\src\org\openide\awt\resources\vista_close_rollover.png Locally New *************** *** 1,0 **** --- 1,1 ---- + [Binary File Locally New] Index: openide/awt/src/org/openide/awt/resources/mac_close_enabled.png *** D:\projects\nb.m7\openide\awt\src\org\openide\awt\resources\mac_close_enabled.png No Base Revision --- D:\projects\nb.m7\openide\awt\src\org\openide\awt\resources\mac_close_enabled.png Locally New *************** *** 1,0 **** --- 1,1 ---- + [Binary File Locally New] Index: core/output2/src/org/netbeans/core/output2/resources/win_close_rollover.png *** D:\projects\nb.m7\core\output2\src\org\netbeans\core\output2\resources\win_close_rollover.png Base (1.1) --- D:\projects\nb.m7\core\output2\src\org\netbeans\core\output2\resources\win_close_rollover.png Locally Deleted *************** *** 1,1 **** - [Binary File Base (1.1)] --- 1,0 ---- Index: core/output2/src/org/netbeans/core/output2/resources/metal_close_pressed.png *** D:\projects\nb.m7\core\output2\src\org\netbeans\core\output2\resources\metal_close_pressed.png Base (1.1) --- D:\projects\nb.m7\core\output2\src\org\netbeans\core\output2\resources\metal_close_pressed.png Locally Deleted *************** *** 1,1 **** - [Binary File Base (1.1)] --- 1,0 ---- Index: openide/awt/src/org/openide/awt/resources/vista_close_pressed.png *** D:\projects\nb.m7\openide\awt\src\org\openide\awt\resources\vista_close_pressed.png No Base Revision --- D:\projects\nb.m7\openide\awt\src\org\openide\awt\resources\vista_close_pressed.png Locally New *************** *** 1,0 **** --- 1,1 ---- + [Binary File Locally New] Index: openide/awt/src/org/openide/awt/CloseButtonTabbedPane.java *** D:\projects\nb.m7\openide\awt\src\org\openide\awt\CloseButtonTabbedPane.java No Base Revision --- D:\projects\nb.m7\openide\awt\src\org\openide\awt\CloseButtonTabbedPane.java Locally New *************** *** 1,0 **** --- 1,478 ---- + /* + * The contents of this file are subject to the terms of the Common Development + * and Distribution License (the License). You may not use this file except in + * compliance with the License. + * + * You can obtain a copy of the License at http://www.netbeans.org/cddl.html + * or http://www.netbeans.org/cddl.txt. + * + * When distributing Covered Code, include this CDDL Header Notice in each file + * and include the License file at http://www.netbeans.org/cddl.txt. + * If applicable, add the following below the CDDL Header, with the fields + * enclosed by brackets [] replaced by your own identifying information: + * "Portions Copyrighted [year] [name of copyright owner]" + * + * The Original Software is NetBeans. The Initial Developer of the Original + * Software is Sun Microsystems, Inc. Portions Copyright 1997-2006 Sun + * Microsystems, Inc. All Rights Reserved. + */ + + package org.openide.awt; + + import java.awt.AWTEvent; + import java.awt.Component; + import java.awt.Container; + import java.awt.Dimension; + import java.awt.FocusTraversalPolicy; + import java.awt.Graphics; + import java.awt.Image; + import java.awt.Point; + import java.awt.Rectangle; + import java.awt.Toolkit; + import javax.swing.plaf.UIResource; + import org.openide.util.Utilities; + import javax.swing.event.ChangeEvent; + import javax.swing.event.ChangeListener; + import java.awt.event.AWTEventListener; + import java.awt.event.MouseEvent; + import java.util.logging.Level; + import java.util.logging.Logger; + import javax.swing.JComponent; + import javax.swing.JTabbedPane; + import javax.swing.SwingUtilities; + import javax.swing.UIManager; + import org.openide.util.Exceptions; + + /** + * Copy of original CloseButtonTabbedPane from the NetBeans 3.4 winsys. Old code never dies. + * + * @author Tran Duc Trung + * @author S. Aubrecht + * @since 6.9.0 + * + */ + final class CloseButtonTabbedPane extends JTabbedPane { + + private Image closeTabImage; + private Image closeTabPressedImage; + private Image closeTabMouseOverImage; + + static final String PROP_CLOSE = "close"; + + CloseButtonTabbedPane() { + addChangeListener( new ChangeListener() { + public void stateChanged(ChangeEvent e) { + reset(); + } + }); + CloseButtonListener.install(); + //Bugfix #28263: Disable focus. + setFocusable(false); + setBorder(javax.swing.BorderFactory.createEmptyBorder()); + setFocusCycleRoot(true); + setFocusTraversalPolicy(new CBTPPolicy()); + } + + private Component sel() { + // workaround for JDK bug 6420152 - please remove after JDK bug is fixed + int tabC = getTabCount(); + int selIndex = getSelectedIndex(); + if (selIndex != -1 && selIndex >= tabC) { + // JDK bug 6420152 - selection model and tab model not in sync + return tabC > 0 ? getComponentAt(tabC - 1) : this; + } + // end of workaround + Component c = getSelectedComponent(); + return c == null ? this : c; + } + + private class CBTPPolicy extends FocusTraversalPolicy { + public Component getComponentAfter(Container aContainer, Component aComponent) { + return sel(); + } + + public Component getComponentBefore(Container aContainer, Component aComponent) { + return sel(); + } + + public Component getFirstComponent(Container aContainer) { + return sel(); + } + + public Component getLastComponent(Container aContainer) { + return sel(); + } + + public Component getDefaultComponent(Container aContainer) { + return sel(); + } + } + + private int pressedCloseButtonIndex = -1; + private int mouseOverCloseButtonIndex = -1; + private boolean draggedOut = false; + + public Component add (Component c) { + Component result = super.add(c); + // #75317 - don't try to set the title if LF (such as Substance LF) + // is adding some custom UI components into tabbed pane + if (!(c instanceof UIResource)) { + String s = c.getName(); + if (s != null) { + s += " "; + } + setTitleAt (getComponentCount() - 1, s); + } + return result; + } + + public void setTitleAt(int idx, String title) { + String nue = title.indexOf("") != -1 ? //NOI18N + Utilities.replaceString(title, "", "  ") //NOI18N + : title + " "; + if (!title.equals(getTitleAt(idx))) { + super.setTitleAt(idx, nue); + } + } + + private void reset() { + setMouseOverCloseButtonIndex(-1); + setPressedCloseButtonIndex(-1); + draggedOut = false; + } + + private Rectangle getCloseButtonBoundsAt(int i) { + Rectangle b = getBoundsAt(i); + if (b == null) + return null; + else { + b = new Rectangle(b); + fixGetBoundsAt(b); + + Dimension tabsz = getSize(); + if (b.x + b.width >= tabsz.width + || b.y + b.height >= tabsz.height) + return null; + + if( (isWindowsVistaLaF() || isWindowsXPLaF() || isWindowsLaF()) && i == getSelectedIndex() ) { + b.x -= 3; + b.y -= 2; + } else if( isWindowsXPLaF() || isWindowsLaF() || isAquaLaF() ) { + b.x -= 2; + } + if( i == getTabCount()-1 ) { + if( isMetalLaF() ) + b.x--; + else if( isAquaLaF() ) + b.x -= 3; + } + return new Rectangle(b.x + b.width - 13, + b.y + b.height / 2 - 5, + 12, + 12); + } + } + + + private boolean isWindowsVistaLaF() { + String osName = System.getProperty ("os.name"); + return osName.indexOf("Vista") >= 0 + || (osName.equals( "Windows NT (unknown)" ) && "6.0".equals( System.getProperty("os.version") )); + } + + private boolean isWindowsXPLaF() { + Boolean isXP = (Boolean)Toolkit.getDefaultToolkit(). + getDesktopProperty("win.xpstyle.themeActive"); //NOI18N + return isWindowsLaF() && (isXP == null ? false : isXP.booleanValue()); + } + + private boolean isWindowsLaF () { + String lfID = UIManager.getLookAndFeel().getID(); + return lfID.endsWith("Windows"); //NOI18N + } + + private boolean isAquaLaF() { + return "Aqua".equals( UIManager.getLookAndFeel().getID() ); + } + + private boolean isMetalLaF () { + String lfID = UIManager.getLookAndFeel().getID(); + return "Metal".equals( lfID ); //NOI18N + } + + public void paint(Graphics g) { + super.paint(g); + + // Have a look at + // http://ui.netbeans.org/docs/ui/closeButton/closeButtonUISpec.html + // to see how the buttons are specified to be drawn. + + int selectedIndex = getSelectedIndex(); + for (int i = 0, n = getTabCount(); i < n; i++) { + Rectangle r = getCloseButtonBoundsAt(i); + if (r == null) + continue; + + if (i == mouseOverCloseButtonIndex + || (i == pressedCloseButtonIndex && draggedOut)) { + g.drawImage(getCloseTabMouseOverImage(), r.x, r.y , this); + } else if (i == pressedCloseButtonIndex) { + g.drawImage(getCloseTabPressedImage(), r.x, r.y , this); + } else { + g.drawImage(getCloseTabImage(), r.x, r.y , this); + } + } + } + + private Image getCloseTabImage() { + if( null == closeTabImage ) { + if( isWindowsVistaLaF() ) { + closeTabImage = org.openide.util.Utilities.loadImage("org/openide/awt/resources/vista_close_enabled.png"); // NOI18N + } else if( isWindowsXPLaF() ) { + closeTabImage = org.openide.util.Utilities.loadImage("org/openide/awt/resources/xp_close_enabled.png"); // NOI18N + } else if( isWindowsLaF() ) { + closeTabImage = org.openide.util.Utilities.loadImage("org/openide/awt/resources/win_close_enabled.png"); // NOI18N + } else if( isAquaLaF() ) { + closeTabImage = org.openide.util.Utilities.loadImage("org/openide/awt/resources/mac_close_enabled.png"); // NOI18N + } else { + closeTabImage = org.openide.util.Utilities.loadImage("org/openide/awt/resources/metal_close_enabled.png"); // NOI18N + } + } + return closeTabImage; + } + + private Image getCloseTabPressedImage() { + if( null == closeTabPressedImage ) { + if( isWindowsVistaLaF() ) { + closeTabPressedImage = org.openide.util.Utilities.loadImage("org/openide/awt/resources/vista_close_pressed.png"); // NOI18N + } else if( isWindowsXPLaF() ) { + closeTabPressedImage = org.openide.util.Utilities.loadImage("org/openide/awt/resources/xp_close_pressed.png"); // NOI18N + } else if( isWindowsLaF() ) { + closeTabPressedImage = org.openide.util.Utilities.loadImage("org/openide/awt/resources/win_close_pressed.png"); // NOI18N + } else if( isAquaLaF() ) { + closeTabPressedImage = org.openide.util.Utilities.loadImage("org/openide/awt/resources/mac_close_pressed.png"); // NOI18N + } else { + closeTabPressedImage = org.openide.util.Utilities.loadImage("org/openide/awt/resources/metal_close_pressed.png"); // NOI18N + } + } + return closeTabPressedImage; + } + + private Image getCloseTabMouseOverImage() { + if( null == closeTabMouseOverImage ) { + if( isWindowsVistaLaF() ) { + closeTabMouseOverImage = org.openide.util.Utilities.loadImage("org/openide/awt/resources/vista_close_rollover.png"); // NOI18N + } else if( isWindowsXPLaF() ) { + closeTabMouseOverImage = org.openide.util.Utilities.loadImage("org/openide/awt/resources/xp_close_rollover.png"); // NOI18N + } else if( isWindowsLaF() ) { + closeTabMouseOverImage = org.openide.util.Utilities.loadImage("org/openide/awt/resources/win_close_rollover.png"); // NOI18N + } else if( isAquaLaF() ) { + closeTabMouseOverImage = org.openide.util.Utilities.loadImage("org/openide/awt/resources/mac_close_rollover.png"); // NOI18N + } else { + closeTabMouseOverImage = org.openide.util.Utilities.loadImage("org/openide/awt/resources/metal_close_rollover.png"); // NOI18N + } + } + return closeTabMouseOverImage; + } + + private void setPressedCloseButtonIndex(int index) { + if (pressedCloseButtonIndex == index) + return; + + if (pressedCloseButtonIndex >= 0 + && pressedCloseButtonIndex < getTabCount()) { + Rectangle r = getCloseButtonBoundsAt(pressedCloseButtonIndex); + repaint(r.x, r.y, r.width + 2, r.height + 2); + + JComponent c = (JComponent) + getComponentAt(pressedCloseButtonIndex); + setToolTipTextAt(pressedCloseButtonIndex, c.getToolTipText()); + } + + pressedCloseButtonIndex = index; + + if (pressedCloseButtonIndex >= 0 + && pressedCloseButtonIndex < getTabCount()) { + Rectangle r = getCloseButtonBoundsAt(pressedCloseButtonIndex); + repaint(r.x, r.y, r.width + 2, r.height + 2); + setMouseOverCloseButtonIndex(-1); + setToolTipTextAt(pressedCloseButtonIndex, null); + } + } + + private void setMouseOverCloseButtonIndex(int index) { + if (mouseOverCloseButtonIndex == index) + return; + + if (mouseOverCloseButtonIndex >= 0 + && mouseOverCloseButtonIndex < getTabCount()) { + Rectangle r = getCloseButtonBoundsAt(mouseOverCloseButtonIndex); + repaint(r.x, r.y, r.width + 2, r.height + 2); + JComponent c = (JComponent) + getComponentAt(mouseOverCloseButtonIndex); + setToolTipTextAt(mouseOverCloseButtonIndex, c.getToolTipText()); + } + + mouseOverCloseButtonIndex = index; + + if (mouseOverCloseButtonIndex >= 0 + && mouseOverCloseButtonIndex < getTabCount()) { + Rectangle r = getCloseButtonBoundsAt(mouseOverCloseButtonIndex); + repaint(r.x, r.y, r.width + 2, r.height + 2); + setPressedCloseButtonIndex(-1); + setToolTipTextAt(mouseOverCloseButtonIndex, null); + } + } + + private void fireCloseRequest(Component c) { + firePropertyChange(PROP_CLOSE, null, c); + } + + static void fixGetBoundsAt(Rectangle b) { + if (b.y < 0) + b.y = -b.y; + if (b.x < 0) + b.x = -b.x; + } + + static int findTabForCoordinate(JTabbedPane tab, int x, int y) { + for (int i = 0; i < tab.getTabCount(); i++) { + Rectangle b = tab.getBoundsAt(i); + if (b != null) { + b = new Rectangle(b); + fixGetBoundsAt(b); + + if (b.contains(x, y)) { + return i; + } + } + } + return -1; + } + + + protected void processMouseEvent (MouseEvent me) { + try { + super.processMouseEvent (me); + } catch (ArrayIndexOutOfBoundsException aioobe) { + //Bug in BasicTabbedPaneUI$Handler: The focusIndex field is not + //updated when tabs are removed programmatically, so it will try to + //repaint a tab that's not there + Exceptions.attachLocalizedMessage(aioobe, + "Suppressed AIOOBE bug in BasicTabbedPaneUI"); //NOI18N + Logger.getAnonymousLogger().log(Level.WARNING, null, aioobe); + } + } + + + private static class CloseButtonListener implements AWTEventListener + { + private static boolean installed = false; + + private CloseButtonListener() {} + + private static synchronized void install() { + if (installed) + return; + + installed = true; + Toolkit.getDefaultToolkit().addAWTEventListener( + new CloseButtonListener(), + AWTEvent.MOUSE_EVENT_MASK | AWTEvent.MOUSE_MOTION_EVENT_MASK); + } + + public void eventDispatched (AWTEvent ev) { + MouseEvent e = (MouseEvent) ev; + + Component c = (Component) e.getSource(); + while (c != null && !(c instanceof CloseButtonTabbedPane)) + c = c.getParent(); + if (c == null) + return; + final CloseButtonTabbedPane tab = (CloseButtonTabbedPane) c; + + Point p = SwingUtilities.convertPoint((Component) e.getSource(), + e.getPoint(), + tab); + + if (e.getID() == MouseEvent.MOUSE_CLICKED) { + //Not interested in clicked, and it can cause an NPE + return; + } + + int index = findTabForCoordinate(tab, p.x, p.y); + + Rectangle r = null; + if (index >= 0) + r = tab.getCloseButtonBoundsAt(index); + if (r == null) + r = new Rectangle(0,0,0,0); + + switch(e.getID()) { + case MouseEvent.MOUSE_PRESSED: + if (r.contains(p)) { + tab.setPressedCloseButtonIndex(index); + tab.draggedOut = false; + e.consume(); + return; + } + break; + + case MouseEvent.MOUSE_RELEASED: + if (r.contains(p) && tab.pressedCloseButtonIndex >= 0) { + Component tc = + tab.getComponentAt(tab.pressedCloseButtonIndex); + tab.reset(); + + tab.fireCloseRequest(tc); + e.consume(); + return; + } + else { + tab.reset(); + } + break; + + case MouseEvent.MOUSE_ENTERED: + break; + + case MouseEvent.MOUSE_EXITED: + //tab.reset(); + + // XXX(-ttran) when the user clicks on the close button on + // an unfocused (internal) frame the focus is transferred + // to the frame and an unexpected MOUSE_EXITED event is + // fired. If we call reset() at every MOUSE_EXITED event + // then when the mouse button is released the tab is not + // closed. See bug #24450 + + break; + + case MouseEvent.MOUSE_MOVED: + if (r.contains(p)) { + tab.setMouseOverCloseButtonIndex(index); + tab.draggedOut = false; + e.consume(); + return; + } + else if (tab.mouseOverCloseButtonIndex >= 0) { + tab.setMouseOverCloseButtonIndex(-1); + tab.draggedOut = false; + e.consume(); + } + break; + + case MouseEvent.MOUSE_DRAGGED: + if (tab.pressedCloseButtonIndex >= 0) { + if (tab.draggedOut != !r.contains(p)) { + tab.draggedOut = !r.contains(p); + tab.repaint(r.x, r.y, r.width + 2+6, r.height + 2+6); + } + e.consume(); + return; + } + break; + } + } + } + } Index: openide/awt/src/org/openide/awt/TabbedPaneFactory.java *** D:\projects\nb.m7\openide\awt\src\org\openide\awt\TabbedPaneFactory.java No Base Revision --- D:\projects\nb.m7\openide\awt\src\org\openide\awt\TabbedPaneFactory.java Locally New *************** *** 1,0 **** --- 1,53 ---- + /* + * The contents of this file are subject to the terms of the Common Development + * and Distribution License (the License). You may not use this file except in + * compliance with the License. + * + * You can obtain a copy of the License at http://www.netbeans.org/cddl.html + * or http://www.netbeans.org/cddl.txt. + * + * When distributing Covered Code, include this CDDL Header Notice in each file + * and include the License file at http://www.netbeans.org/cddl.txt. + * If applicable, add the following below the CDDL Header, with the fields + * enclosed by brackets [] replaced by your own identifying information: + * "Portions Copyrighted [year] [name of copyright owner]" + * + * The Original Software is NetBeans. The Initial Developer of the Original + * Software is Sun Microsystems, Inc. Portions Copyright 1997-2007 Sun + * Microsystems, Inc. All Rights Reserved. + */ + + package org.openide.awt; + + import javax.swing.JTabbedPane; + + /** + * Factory class for TabbedPanes with closeable tabs. + * + * @author S. Aubrecht + * @since 6.9.0 + */ + public class TabbedPaneFactory { + + /** + * Name of the property that is fired from the closeable tabbed pane + * when the user clicks close button on a tab. + */ + public static final String PROP_CLOSE = CloseButtonTabbedPane.PROP_CLOSE; + + /** Creates a new instance of TabbedPaneFactory */ + private TabbedPaneFactory() { + } + + /** + * Creates a special {@link JTabbedPane} that displays a small 'close' button in each tab. + * When user clicks the close button a {@link java.beans.PropertyChangeEvent} is fired from the + * tabbed pane. The property name is {@link #PROP_CLOSE} and the property + * value is the inner component inside the clicked tab. + * + * @return Special TabbedPane with closeable tabs. + */ + public static JTabbedPane createCloseButtonTabbedPane() { + return new CloseButtonTabbedPane(); + } + } Index: core/output2/src/org/netbeans/core/output2/resources/win_close_pressed.png *** D:\projects\nb.m7\core\output2\src\org\netbeans\core\output2\resources\win_close_pressed.png Base (1.1) --- D:\projects\nb.m7\core\output2\src\org\netbeans\core\output2\resources\win_close_pressed.png Locally Deleted *************** *** 1,1 **** - [Binary File Base (1.1)] --- 1,0 ---- Index: core/output2/src/org/netbeans/core/output2/resources/metal_close_enabled.png *** D:\projects\nb.m7\core\output2\src\org\netbeans\core\output2\resources\metal_close_enabled.png Base (1.1) --- D:\projects\nb.m7\core\output2\src\org\netbeans\core\output2\resources\metal_close_enabled.png Locally Deleted *************** *** 1,1 **** - [Binary File Base (1.1)] --- 1,0 ---- Index: openide/awt/src/org/openide/awt/resources/mac_close_rollover.png *** D:\projects\nb.m7\openide\awt\src\org\openide\awt\resources\mac_close_rollover.png No Base Revision --- D:\projects\nb.m7\openide\awt\src\org\openide\awt\resources\mac_close_rollover.png Locally New *************** *** 1,0 **** --- 1,1 ---- + [Binary File Locally New] Index: core/output2/src/org/netbeans/core/output2/resources/vista_close_enabled.png *** D:\projects\nb.m7\core\output2\src\org\netbeans\core\output2\resources\vista_close_enabled.png Base (1.1) --- D:\projects\nb.m7\core\output2\src\org\netbeans\core\output2\resources\vista_close_enabled.png Locally Deleted *************** *** 1,1 **** - [Binary File Base (1.1)] --- 1,0 ---- Index: core/output2/src/org/netbeans/core/output2/ui/AbstractOutputWindow.java *** D:\projects\nb.m7\core\output2\src\org\netbeans\core\output2\ui\AbstractOutputWindow.java Base (1.18) --- D:\projects\nb.m7\core\output2\src\org\netbeans\core\output2\ui\AbstractOutputWindow.java Locally Modified (Based On 1.18) *************** *** 28,33 **** --- 28,34 ---- import org.netbeans.core.output2.Controller; import org.openide.util.Utilities; import org.openide.windows.TopComponent; + import org.openide.awt.TabbedPaneFactory; import javax.swing.*; import javax.swing.event.ChangeEvent; *************** *** 46,52 **** * @author Tim Boudreau */ public abstract class AbstractOutputWindow extends TopComponent implements ChangeListener, PropertyChangeListener { ! protected JTabbedPane pane = new CloseButtonTabbedPane(); private static final String ICON_PROP = "tabIcon"; //NOI18N private JToolBar toolbar = null; --- 47,53 ---- * @author Tim Boudreau */ public abstract class AbstractOutputWindow extends TopComponent implements ChangeListener, PropertyChangeListener { ! protected JTabbedPane pane = TabbedPaneFactory.createCloseButtonTabbedPane(); private static final String ICON_PROP = "tabIcon"; //NOI18N private JToolBar toolbar = null; *************** *** 53,59 **** /** Creates a new instance of AbstractOutputWindow */ public AbstractOutputWindow() { pane.addChangeListener(this); ! pane.addPropertyChangeListener(CloseButtonTabbedPane.PROP_CLOSE, this); setFocusable(true); setBackground(UIManager.getColor("text")); //NOI18N toolbar = new JToolBar(); --- 54,60 ---- /** Creates a new instance of AbstractOutputWindow */ public AbstractOutputWindow() { pane.addChangeListener(this); ! pane.addPropertyChangeListener(TabbedPaneFactory.PROP_CLOSE, this); setFocusable(true); setBackground(UIManager.getColor("text")); //NOI18N toolbar = new JToolBar(); *************** *** 88,94 **** } public void propertyChange(PropertyChangeEvent pce) { ! if (CloseButtonTabbedPane.PROP_CLOSE.equals(pce.getPropertyName())) { AbstractOutputTab tab = (AbstractOutputTab) pce.getNewValue(); closeRequest(tab); } --- 89,95 ---- } public void propertyChange(PropertyChangeEvent pce) { ! if (TabbedPaneFactory.PROP_CLOSE.equals(pce.getPropertyName())) { AbstractOutputTab tab = (AbstractOutputTab) pce.getNewValue(); closeRequest(tab); } *************** *** 322,327 **** --- 323,331 ---- } public void stateChanged(ChangeEvent e) { + if (pane.getSelectedComponent() instanceof AbstractOutputPane) { + ((AbstractOutputPane) pane.getSelectedComponent()).ensureCaretPosition(); + } fire(lastKnownSelection); } Index: openide/awt/nbproject/project.properties *** D:\projects\nb.m7\openide\awt\nbproject\project.properties Base (1.8) --- D:\projects\nb.m7\openide\awt\nbproject\project.properties Locally Modified (Based On 1.8) *************** *** 22,25 **** #javadoc.apichanges=${basedir}/api/apichanges.xml javadoc.apichanges=${basedir}/apichanges.xml ! spec.version.base=6.8.0 --- 22,25 ---- #javadoc.apichanges=${basedir}/api/apichanges.xml javadoc.apichanges=${basedir}/apichanges.xml ! spec.version.base=6.9.0 Index: openide/awt/src/org/openide/awt/resources/vista_close_enabled.png *** D:\projects\nb.m7\openide\awt\src\org\openide\awt\resources\vista_close_enabled.png No Base Revision --- D:\projects\nb.m7\openide\awt\src\org\openide\awt\resources\vista_close_enabled.png Locally New *************** *** 1,0 **** --- 1,1 ---- + [Binary File Locally New] Index: core/output2/src/org/netbeans/core/output2/resources/win_close_enabled.png *** D:\projects\nb.m7\core\output2\src\org\netbeans\core\output2\resources\win_close_enabled.png Base (1.1) --- D:\projects\nb.m7\core\output2\src\org\netbeans\core\output2\resources\win_close_enabled.png Locally Deleted *************** *** 1,1 **** - [Binary File Base (1.1)] --- 1,0 ---- Index: core/output2/src/org/netbeans/core/output2/ui/CloseButtonTabbedPane.java *** D:\projects\nb.m7\core\output2\src\org\netbeans\core\output2\ui\CloseButtonTabbedPane.java Base (1.15) --- D:\projects\nb.m7\core\output2\src\org\netbeans\core\output2\ui\CloseButtonTabbedPane.java Locally Deleted *************** *** 1,484 **** - /* - * The contents of this file are subject to the terms of the Common Development - * and Distribution License (the License). You may not use this file except in - * compliance with the License. - * - * You can obtain a copy of the License at http://www.netbeans.org/cddl.html - * or http://www.netbeans.org/cddl.txt. - * - * When distributing Covered Code, include this CDDL Header Notice in each file - * and include the License file at http://www.netbeans.org/cddl.txt. - * If applicable, add the following below the CDDL Header, with the fields - * enclosed by brackets [] replaced by your own identifying information: - * "Portions Copyrighted [year] [name of copyright owner]" - * - * The Original Software is NetBeans. The Initial Developer of the Original - * Software is Sun Microsystems, Inc. Portions Copyright 1997-2006 Sun - * Microsystems, Inc. All Rights Reserved. - */ - - package org.netbeans.core.output2.ui; - - import java.awt.AWTEvent; - import java.awt.Component; - import java.awt.Container; - import java.awt.Dimension; - import java.awt.FocusTraversalPolicy; - import java.awt.Graphics; - import java.awt.Image; - import java.awt.Point; - import java.awt.Rectangle; - import java.awt.Toolkit; - import javax.swing.plaf.UIResource; - import org.openide.util.Utilities; - import javax.swing.event.ChangeEvent; - import javax.swing.event.ChangeListener; - import java.awt.event.AWTEventListener; - import java.awt.event.MouseEvent; - import java.util.logging.Level; - import java.util.logging.Logger; - import javax.swing.JComponent; - import javax.swing.JTabbedPane; - import javax.swing.SwingUtilities; - import javax.swing.UIManager; - import org.openide.util.Exceptions; - - // #21380. - /** - * Copy of original CloseButtonTabbedPane from the NetBeans 3.4 winsys. Old code never dies. - * - * @author Tran Duc Trung - * - */ - final class CloseButtonTabbedPane extends JTabbedPane implements ChangeListener /*, Runnable */ { - - private Image closeTabImage; - private Image closeTabPressedImage; - private Image closeTabMouseOverImage; - - public static final String PROP_CLOSE = "close"; - - CloseButtonTabbedPane() { - addChangeListener(this); - CloseButtonListener.install(); - //Bugfix #28263: Disable focus. - setFocusable(false); - setBorder(javax.swing.BorderFactory.createEmptyBorder()); - setFocusCycleRoot(true); - setFocusTraversalPolicy(new CBTPPolicy()); - } - - private Component sel() { - // workaround for JDK bug 6420152 - please remove after JDK bug is fixed - int tabC = getTabCount(); - int selIndex = getSelectedIndex(); - if (selIndex != -1 && selIndex >= tabC) { - // JDK bug 6420152 - selection model and tab model not in sync - return tabC > 0 ? getComponentAt(tabC - 1) : this; - } - // end of workaround - Component c = getSelectedComponent(); - return c == null ? this : c; - } - - private class CBTPPolicy extends FocusTraversalPolicy { - public Component getComponentAfter(Container aContainer, Component aComponent) { - return sel(); - } - - public Component getComponentBefore(Container aContainer, Component aComponent) { - return sel(); - } - - public Component getFirstComponent(Container aContainer) { - return sel(); - } - - public Component getLastComponent(Container aContainer) { - return sel(); - } - - public Component getDefaultComponent(Container aContainer) { - return sel(); - } - } - - public int tabForCoordinate(int x, int y) { - return getUI().tabForCoordinate(this, x, y); - } - - private int pressedCloseButtonIndex = -1; - private int mouseOverCloseButtonIndex = -1; - private boolean draggedOut = false; - - public void stateChanged (ChangeEvent e) { - reset(); - if (getSelectedComponent() instanceof AbstractOutputPane) { - ((AbstractOutputPane) getSelectedComponent()).ensureCaretPosition(); - } - } - - public Component add (Component c) { - Component result = super.add(c); - // #75317 - don't try to set the title if LF (such as Substance LF) - // is adding some custom UI components into tabbed pane - if (!(c instanceof UIResource)) { - String s = c.getName(); - if (s != null) { - s += " "; - } - setTitleAt (getComponentCount() - 1, s); - } - return result; - } - - public void setTitleAt(int idx, String title) { - String nue = title.indexOf("") != -1 ? //NOI18N - Utilities.replaceString(title, "", "  ") //NOI18N - : title + " "; - if (!title.equals(getTitleAt(idx))) { - super.setTitleAt(idx, nue); - } - } - - private void reset() { - setMouseOverCloseButtonIndex(-1); - setPressedCloseButtonIndex(-1); - draggedOut = false; - } - - private Rectangle getCloseButtonBoundsAt(int i) { - Rectangle b = getBoundsAt(i); - if (b == null) - return null; - else { - b = new Rectangle(b); - fixGetBoundsAt(b); - - Dimension tabsz = getSize(); - if (b.x + b.width >= tabsz.width - || b.y + b.height >= tabsz.height) - return null; - - if( (isWindowsVistaLaF() || isWindowsXPLaF() || isWindowsLaF()) && i == getSelectedIndex() ) { - b.x -= 3; - b.y -= 2; - } else if( isWindowsXPLaF() || isWindowsLaF() || isAquaLaF() ) { - b.x -= 2; - } - if( i == getTabCount()-1 ) { - if( isMetalLaF() ) - b.x--; - else if( isAquaLaF() ) - b.x -= 3; - } - return new Rectangle(b.x + b.width - 13, - b.y + b.height / 2 - 5, - 12, - 12); - } - } - - - private boolean isWindowsVistaLaF() { - String osName = System.getProperty ("os.name"); - return osName.indexOf("Vista") >= 0 - || (osName.equals( "Windows NT (unknown)" ) && "6.0".equals( System.getProperty("os.version") )); - } - - private boolean isWindowsXPLaF() { - Boolean isXP = (Boolean)Toolkit.getDefaultToolkit(). - getDesktopProperty("win.xpstyle.themeActive"); //NOI18N - return isWindowsLaF() && (isXP == null ? false : isXP.booleanValue()); - } - - private boolean isWindowsLaF () { - String lfID = UIManager.getLookAndFeel().getID(); - return lfID.endsWith("Windows"); //NOI18N - } - - private boolean isAquaLaF() { - return "Aqua".equals( UIManager.getLookAndFeel().getID() ); - } - - private boolean isMetalLaF () { - String lfID = UIManager.getLookAndFeel().getID(); - return "Metal".equals( lfID ); //NOI18N - } - - public void paint(Graphics g) { - super.paint(g); - - // Have a look at - // http://ui.netbeans.org/docs/ui/closeButton/closeButtonUISpec.html - // to see how the buttons are specified to be drawn. - - int selectedIndex = getSelectedIndex(); - for (int i = 0, n = getTabCount(); i < n; i++) { - Rectangle r = getCloseButtonBoundsAt(i); - if (r == null) - continue; - - if (i == mouseOverCloseButtonIndex - || (i == pressedCloseButtonIndex && draggedOut)) { - g.drawImage(getCloseTabMouseOverImage(), r.x, r.y , this); - } else if (i == pressedCloseButtonIndex) { - g.drawImage(getCloseTabPressedImage(), r.x, r.y , this); - } else { - g.drawImage(getCloseTabImage(), r.x, r.y , this); - } - } - } - - private Image getCloseTabImage() { - if( null == closeTabImage ) { - if( isWindowsVistaLaF() ) { - closeTabImage = org.openide.util.Utilities.loadImage("org/netbeans/core/output2/resources/vista_close_enabled.png"); // NOI18N - } else if( isWindowsXPLaF() ) { - closeTabImage = org.openide.util.Utilities.loadImage("org/netbeans/core/output2/resources/xp_close_enabled.png"); // NOI18N - } else if( isWindowsLaF() ) { - closeTabImage = org.openide.util.Utilities.loadImage("org/netbeans/core/output2/resources/win_close_enabled.png"); // NOI18N - } else if( isAquaLaF() ) { - closeTabImage = org.openide.util.Utilities.loadImage("org/netbeans/core/output2/resources/mac_close_enabled.png"); // NOI18N - } else { - closeTabImage = org.openide.util.Utilities.loadImage("org/netbeans/core/output2/resources/metal_close_enabled.png"); // NOI18N - } - } - return closeTabImage; - } - - private Image getCloseTabPressedImage() { - if( null == closeTabPressedImage ) { - if( isWindowsVistaLaF() ) { - closeTabPressedImage = org.openide.util.Utilities.loadImage("org/netbeans/core/output2/resources/vista_close_pressed.png"); // NOI18N - } else if( isWindowsXPLaF() ) { - closeTabPressedImage = org.openide.util.Utilities.loadImage("org/netbeans/core/output2/resources/xp_close_pressed.png"); // NOI18N - } else if( isWindowsLaF() ) { - closeTabPressedImage = org.openide.util.Utilities.loadImage("org/netbeans/core/output2/resources/win_close_pressed.png"); // NOI18N - } else if( isAquaLaF() ) { - closeTabPressedImage = org.openide.util.Utilities.loadImage("org/netbeans/core/output2/resources/mac_close_pressed.png"); // NOI18N - } else { - closeTabPressedImage = org.openide.util.Utilities.loadImage("org/netbeans/core/output2/resources/metal_close_pressed.png"); // NOI18N - } - } - return closeTabPressedImage; - } - - private Image getCloseTabMouseOverImage() { - if( null == closeTabMouseOverImage ) { - if( isWindowsVistaLaF() ) { - closeTabMouseOverImage = org.openide.util.Utilities.loadImage("org/netbeans/core/output2/resources/vista_close_rollover.png"); // NOI18N - } else if( isWindowsXPLaF() ) { - closeTabMouseOverImage = org.openide.util.Utilities.loadImage("org/netbeans/core/output2/resources/xp_close_rollover.png"); // NOI18N - } else if( isWindowsLaF() ) { - closeTabMouseOverImage = org.openide.util.Utilities.loadImage("org/netbeans/core/output2/resources/win_close_rollover.png"); // NOI18N - } else if( isAquaLaF() ) { - closeTabMouseOverImage = org.openide.util.Utilities.loadImage("org/netbeans/core/output2/resources/mac_close_rollover.png"); // NOI18N - } else { - closeTabMouseOverImage = org.openide.util.Utilities.loadImage("org/netbeans/core/output2/resources/metal_close_rollover.png"); // NOI18N - } - } - return closeTabMouseOverImage; - } - - private void setPressedCloseButtonIndex(int index) { - if (pressedCloseButtonIndex == index) - return; - - if (pressedCloseButtonIndex >= 0 - && pressedCloseButtonIndex < getTabCount()) { - Rectangle r = getCloseButtonBoundsAt(pressedCloseButtonIndex); - repaint(r.x, r.y, r.width + 2, r.height + 2); - - JComponent c = (JComponent) - getComponentAt(pressedCloseButtonIndex); - setToolTipTextAt(pressedCloseButtonIndex, c.getToolTipText()); - } - - pressedCloseButtonIndex = index; - - if (pressedCloseButtonIndex >= 0 - && pressedCloseButtonIndex < getTabCount()) { - Rectangle r = getCloseButtonBoundsAt(pressedCloseButtonIndex); - repaint(r.x, r.y, r.width + 2, r.height + 2); - setMouseOverCloseButtonIndex(-1); - setToolTipTextAt(pressedCloseButtonIndex, null); - } - } - - private void setMouseOverCloseButtonIndex(int index) { - if (mouseOverCloseButtonIndex == index) - return; - - if (mouseOverCloseButtonIndex >= 0 - && mouseOverCloseButtonIndex < getTabCount()) { - Rectangle r = getCloseButtonBoundsAt(mouseOverCloseButtonIndex); - repaint(r.x, r.y, r.width + 2, r.height + 2); - JComponent c = (JComponent) - getComponentAt(mouseOverCloseButtonIndex); - setToolTipTextAt(mouseOverCloseButtonIndex, c.getToolTipText()); - } - - mouseOverCloseButtonIndex = index; - - if (mouseOverCloseButtonIndex >= 0 - && mouseOverCloseButtonIndex < getTabCount()) { - Rectangle r = getCloseButtonBoundsAt(mouseOverCloseButtonIndex); - repaint(r.x, r.y, r.width + 2, r.height + 2); - setPressedCloseButtonIndex(-1); - setToolTipTextAt(mouseOverCloseButtonIndex, null); - } - } - - private void fireCloseRequest(Component c) { - firePropertyChange(PROP_CLOSE, null, c); - } - - public static void fixGetBoundsAt(Rectangle b) { - if (b.y < 0) - b.y = -b.y; - if (b.x < 0) - b.x = -b.x; - } - - public static int findTabForCoordinate(JTabbedPane tab, int x, int y) { - for (int i = 0; i < tab.getTabCount(); i++) { - Rectangle b = tab.getBoundsAt(i); - if (b != null) { - b = new Rectangle(b); - fixGetBoundsAt(b); - - if (b.contains(x, y)) { - return i; - } - } - } - return -1; - } - - - protected void processMouseEvent (MouseEvent me) { - try { - super.processMouseEvent (me); - } catch (ArrayIndexOutOfBoundsException aioobe) { - //Bug in BasicTabbedPaneUI$Handler: The focusIndex field is not - //updated when tabs are removed programmatically, so it will try to - //repaint a tab that's not there - Exceptions.attachLocalizedMessage(aioobe, - "Suppressed AIOOBE bug in BasicTabbedPaneUI"); //NOI18N - Logger.getAnonymousLogger().log(Level.WARNING, null, aioobe); - } - } - - - private static class CloseButtonListener implements AWTEventListener - { - private static boolean installed = false; - - private CloseButtonListener() {} - - private static synchronized void install() { - if (installed) - return; - - installed = true; - Toolkit.getDefaultToolkit().addAWTEventListener( - new CloseButtonListener(), - AWTEvent.MOUSE_EVENT_MASK | AWTEvent.MOUSE_MOTION_EVENT_MASK); - } - - public void eventDispatched (AWTEvent ev) { - MouseEvent e = (MouseEvent) ev; - - Component c = (Component) e.getSource(); - while (c != null && !(c instanceof CloseButtonTabbedPane)) - c = c.getParent(); - if (c == null) - return; - final CloseButtonTabbedPane tab = (CloseButtonTabbedPane) c; - - Point p = SwingUtilities.convertPoint((Component) e.getSource(), - e.getPoint(), - tab); - - if (e.getID() == MouseEvent.MOUSE_CLICKED) { - //Not interested in clicked, and it can cause an NPE - return; - } - - int index = findTabForCoordinate(tab, p.x, p.y); - - Rectangle r = null; - if (index >= 0) - r = tab.getCloseButtonBoundsAt(index); - if (r == null) - r = new Rectangle(0,0,0,0); - - switch(e.getID()) { - case MouseEvent.MOUSE_PRESSED: - if (r.contains(p)) { - tab.setPressedCloseButtonIndex(index); - tab.draggedOut = false; - e.consume(); - return; - } - break; - - case MouseEvent.MOUSE_RELEASED: - if (r.contains(p) && tab.pressedCloseButtonIndex >= 0) { - Component tc = - tab.getComponentAt(tab.pressedCloseButtonIndex); - tab.reset(); - - tab.fireCloseRequest(tc); - e.consume(); - return; - } - else { - tab.reset(); - } - break; - - case MouseEvent.MOUSE_ENTERED: - break; - - case MouseEvent.MOUSE_EXITED: - //tab.reset(); - - // XXX(-ttran) when the user clicks on the close button on - // an unfocused (internal) frame the focus is transferred - // to the frame and an unexpected MOUSE_EXITED event is - // fired. If we call reset() at every MOUSE_EXITED event - // then when the mouse button is released the tab is not - // closed. See bug #24450 - - break; - - case MouseEvent.MOUSE_MOVED: - if (r.contains(p)) { - tab.setMouseOverCloseButtonIndex(index); - tab.draggedOut = false; - e.consume(); - return; - } - else if (tab.mouseOverCloseButtonIndex >= 0) { - tab.setMouseOverCloseButtonIndex(-1); - tab.draggedOut = false; - e.consume(); - } - break; - - case MouseEvent.MOUSE_DRAGGED: - if (tab.pressedCloseButtonIndex >= 0) { - if (tab.draggedOut != !r.contains(p)) { - tab.draggedOut = !r.contains(p); - tab.repaint(r.x, r.y, r.width + 2+6, r.height + 2+6); - } - e.consume(); - return; - } - break; - } - } - } - } --- 1,0 ---- Index: core/output2/src/org/netbeans/core/output2/resources/mac_close_enabled.png *** D:\projects\nb.m7\core\output2\src\org\netbeans\core\output2\resources\mac_close_enabled.png Base (1.1) --- D:\projects\nb.m7\core\output2\src\org\netbeans\core\output2\resources\mac_close_enabled.png Locally Deleted *************** *** 1,1 **** - [Binary File Base (1.1)] --- 1,0 ---- Index: openide/awt/src/org/openide/awt/resources/metal_close_enabled.png *** D:\projects\nb.m7\openide\awt\src\org\openide\awt\resources\metal_close_enabled.png No Base Revision --- D:\projects\nb.m7\openide\awt\src\org\openide\awt\resources\metal_close_enabled.png Locally New *************** *** 1,0 **** --- 1,1 ---- + [Binary File Locally New] Index: openide/awt/src/org/openide/awt/resources/mac_close_pressed.png *** D:\projects\nb.m7\openide\awt\src\org\openide\awt\resources\mac_close_pressed.png No Base Revision --- D:\projects\nb.m7\openide\awt\src\org\openide\awt\resources\mac_close_pressed.png Locally New *************** *** 1,0 **** --- 1,1 ---- + [Binary File Locally New] Index: core/output2/src/org/netbeans/core/output2/resources/vista_close_rollover.png *** D:\projects\nb.m7\core\output2\src\org\netbeans\core\output2\resources\vista_close_rollover.png Base (1.1) --- D:\projects\nb.m7\core\output2\src\org\netbeans\core\output2\resources\vista_close_rollover.png Locally Deleted *************** *** 1,1 **** - [Binary File Base (1.1)] --- 1,0 ---- Index: openide/awt/src/org/openide/awt/resources/win_close_pressed.png *** D:\projects\nb.m7\openide\awt\src\org\openide\awt\resources\win_close_pressed.png No Base Revision --- D:\projects\nb.m7\openide\awt\src\org\openide\awt\resources\win_close_pressed.png Locally New *************** *** 1,0 **** --- 1,1 ---- + [Binary File Locally New] Index: openide/awt/src/org/openide/awt/resources/xp_close_enabled.png *** D:\projects\nb.m7\openide\awt\src\org\openide\awt\resources\xp_close_enabled.png No Base Revision --- D:\projects\nb.m7\openide\awt\src\org\openide\awt\resources\xp_close_enabled.png Locally New *************** *** 1,0 **** --- 1,1 ---- + [Binary File Locally New] Index: openide/awt/src/org/openide/awt/resources/win_close_rollover.png *** D:\projects\nb.m7\openide\awt\src\org\openide\awt\resources\win_close_rollover.png No Base Revision --- D:\projects\nb.m7\openide\awt\src\org\openide\awt\resources\win_close_rollover.png Locally New *************** *** 1,0 **** --- 1,1 ---- + [Binary File Locally New] Index: core/output2/src/org/netbeans/core/output2/resources/vista_close_pressed.png *** D:\projects\nb.m7\core\output2\src\org\netbeans\core\output2\resources\vista_close_pressed.png Base (1.1) --- D:\projects\nb.m7\core\output2\src\org\netbeans\core\output2\resources\vista_close_pressed.png Locally Deleted *************** *** 1,1 **** - [Binary File Base (1.1)] --- 1,0 ---- Index: core/output2/src/org/netbeans/core/output2/resources/xp_close_pressed.png *** D:\projects\nb.m7\core\output2\src\org\netbeans\core\output2\resources\xp_close_pressed.png Base (1.1) --- D:\projects\nb.m7\core\output2\src\org\netbeans\core\output2\resources\xp_close_pressed.png Locally Deleted *************** *** 1,1 **** - [Binary File Base (1.1)] --- 1,0 ---- Index: openide/awt/apichanges.xml *** D:\projects\nb.m7\openide\awt\apichanges.xml Base (1.8) --- D:\projects\nb.m7\openide\awt\apichanges.xml Locally Modified (Based On 1.8) *************** *** 23,28 **** --- 23,45 ---- AWT API + + + + Added TabbedPane with closeable tabs + + + + + + Added a factory class for special JTabbedPane that displays a small 'close' button in each tab. + When user clicks the close button a PropertyChangeEvent is fired from the + tabbed pane. + + + + + DynamicMenuContent interface added Index: core/output2/src/org/netbeans/core/output2/resources/metal_close_rollover.png *** D:\projects\nb.m7\core\output2\src\org\netbeans\core\output2\resources\metal_close_rollover.png Base (1.1) --- D:\projects\nb.m7\core\output2\src\org\netbeans\core\output2\resources\metal_close_rollover.png Locally Deleted *************** *** 1,1 **** - [Binary File Base (1.1)] --- 1,0 ----