? diff30979.txt
Index: DefaultContainerImpl.java
===================================================================
RCS file: /cvs/core/src/org/netbeans/core/windows/frames/Attic/DefaultContainerImpl.java,v
retrieving revision 1.75.2.1
diff -c -r1.75.2.1 DefaultContainerImpl.java
*** DefaultContainerImpl.java 15 May 2003 07:32:32 -0000 1.75.2.1
--- DefaultContainerImpl.java 15 Dec 2003 13:34:23 -0000
***************
*** 666,672 ****
// let subclasses do visual update job
componentRemoved(tc);
if (isAttached() && (selectedChanged)) {
! reactivateSelectedComponent();
}
return count;
}
--- 666,672 ----
// let subclasses do visual update job
componentRemoved(tc);
if (isAttached() && (selectedChanged)) {
! reactivateSelectedComponent(false);
}
return count;
}
***************
*** 1080,1089 ****
}
/** Reactivate currently selected top component, if possible */
! protected void reactivateSelectedComponent () {
! if(!isActivated() || mode == null) {
return;
}
TopComponent selected = getSelectedTopComponent();
doActivateComponent(selected);
--- 1080,1096 ----
}
/** Reactivate currently selected top component, if possible */
! protected void reactivateSelectedComponent (boolean activateNonActiveMode) {
! if (mode == null) {
return;
}
+ if (!activateNonActiveMode && !isActivated()) {
+ return;
+ }
+ if (activateNonActiveMode && !isActivated()) {
+ hasFocus = true;
+ mode.requestFocus();
+ }
TopComponent selected = getSelectedTopComponent();
doActivateComponent(selected);
***************
*** 1113,1119 ****
return;
}
if (isActivated()) {
! reactivateSelectedComponent();
}
}
};
--- 1120,1126 ----
return;
}
if (isActivated()) {
! reactivateSelectedComponent(false);
}
}
};
Index: MultiTabbedContainerImpl.java
===================================================================
RCS file: /cvs/core/src/org/netbeans/core/windows/frames/Attic/MultiTabbedContainerImpl.java,v
retrieving revision 1.57.2.1.16.1
diff -c -r1.57.2.1.16.1 MultiTabbedContainerImpl.java
*** MultiTabbedContainerImpl.java 9 Dec 2003 09:59:55 -0000 1.57.2.1.16.1
--- MultiTabbedContainerImpl.java 15 Dec 2003 13:34:24 -0000
***************
*** 327,333 ****
});
add(singleTc);
setSelectedTopComponent(singleTc);
! reactivateSelectedComponent();
}
} else {
int index = tabc.indexOfComponent(tc);
--- 327,333 ----
});
add(singleTc);
setSelectedTopComponent(singleTc);
! reactivateSelectedComponent(false);
}
} else {
int index = tabc.indexOfComponent(tc);
***************
*** 344,350 ****
// synchronize current variable with tab selection
setSelectedTopComponent((TopComponent)tabc.getSelectedComponent());
! reactivateSelectedComponent();
}
// invoke relayout of multi tab
tabc.invalidate ();
--- 344,350 ----
// synchronize current variable with tab selection
setSelectedTopComponent((TopComponent)tabc.getSelectedComponent());
! reactivateSelectedComponent(false);
}
// invoke relayout of multi tab
tabc.invalidate ();
***************
*** 363,369 ****
super.componentFocusGained(tc, ev);
tabc.removeChangeListener(this);
setSelectedTopComponent(tc);
! reactivateSelectedComponent();
tabc.addChangeListener(this);
}
--- 363,369 ----
super.componentFocusGained(tc, ev);
tabc.removeChangeListener(this);
setSelectedTopComponent(tc);
! reactivateSelectedComponent(true);
tabc.addChangeListener(this);
}
***************
*** 562,568 ****
int index = tabc.getSelectedIndex();
TopComponent current = (index < 0) ? null : (TopComponent)tabc.getSelectedComponent();
setSelectedTopComponent(current);
! reactivateSelectedComponent();
}
/** Sets the placement of the tabs.
--- 562,568 ----
int index = tabc.getSelectedIndex();
TopComponent current = (index < 0) ? null : (TopComponent)tabc.getSelectedComponent();
setSelectedTopComponent(current);
! reactivateSelectedComponent(false);
}
/** Sets the placement of the tabs.
Index: SplitContainerImpl.java
===================================================================
RCS file: /cvs/core/src/org/netbeans/core/windows/frames/Attic/SplitContainerImpl.java,v
retrieving revision 1.104.30.1
diff -c -r1.104.30.1 SplitContainerImpl.java
*** SplitContainerImpl.java 9 Dec 2003 09:59:55 -0000 1.104.30.1
--- SplitContainerImpl.java 15 Dec 2003 13:34:25 -0000
***************
*** 697,703 ****
if(tabIndex >= 0 && tabIndex < tabbedContainer.length
&& tabbedContainer[tabIndex] == null) {
// Tabbed pane was closed selection was changed, reactivate.
! reactivateSelectedComponent();
reactivatedSelection = true;
}
}
--- 697,703 ----
if(tabIndex >= 0 && tabIndex < tabbedContainer.length
&& tabbedContainer[tabIndex] == null) {
// Tabbed pane was closed selection was changed, reactivate.
! reactivateSelectedComponent(false);
reactivatedSelection = true;
}
}
***************
*** 727,733 ****
// synchronize current variable with tab selection
setSelectedTopComponent(left);
! reactivateSelectedComponent();
reactivatedSelection = true;
}
}
--- 727,733 ----
// synchronize current variable with tab selection
setSelectedTopComponent(left);
! reactivateSelectedComponent(false);
reactivatedSelection = true;
}
}
***************
*** 738,744 ****
// synchronize current variable with tab selection
setSelectedTopComponent(selected);
! reactivateSelectedComponent();
reactivatedSelection = true;
}
--- 738,744 ----
// synchronize current variable with tab selection
setSelectedTopComponent(selected);
! reactivateSelectedComponent(false);
reactivatedSelection = true;
}
***************
*** 761,767 ****
if(tcs.length > 0 && !reactivatedSelection) {
TopComponent firstTc = tcs[0];
setSelectedTopComponent(firstTc);
! reactivateSelectedComponent();
}
}
}
--- 761,767 ----
if(tcs.length > 0 && !reactivatedSelection) {
TopComponent firstTc = tcs[0];
setSelectedTopComponent(firstTc);
! reactivateSelectedComponent(false);
}
}
}
***************
*** 996,1002 ****
int index = tab.getSelectedIndex();
TopComponent current = (index < 0) ? null : (TopComponent)tab.getComponentAt(index);
setSelectedTopComponent(current);
! reactivateSelectedComponent();
}
public void setAttached (boolean attached) {
--- 996,1002 ----
int index = tab.getSelectedIndex();
TopComponent current = (index < 0) ? null : (TopComponent)tab.getComponentAt(index);
setSelectedTopComponent(current);
! reactivateSelectedComponent(false);
}
public void setAttached (boolean attached) {
***************
*** 1074,1080 ****
}
}
if (comp instanceof SplitContainerImpl) {
! ((SplitContainerImpl) comp).reactivateSelectedComponent();
}
}
}
--- 1074,1080 ----
}
}
if (comp instanceof SplitContainerImpl) {
! ((SplitContainerImpl) comp).reactivateSelectedComponent(false);
}
}
}
***************
*** 1557,1563 ****
}
setSelectedTopComponent(tc);
! reactivateSelectedComponent();
}
}
}
--- 1557,1563 ----
}
setSelectedTopComponent(tc);
! reactivateSelectedComponent(false);
}
}
}
***************
*** 1575,1581 ****
//Bugfix #16631: Reactivate top component requested by requestVisible()
super.componentFocusGained(tc, ev);
! if(tc != getSelectedTopComponent()) {
//Bugfix #11604 for JDK 1.4, disable change listener on tab to prevent from tab cycling
int j = positionNames.indexOf(constraints.get(tc));
JTabbedPane tab = tabbedContainer[j];
--- 1575,1581 ----
//Bugfix #16631: Reactivate top component requested by requestVisible()
super.componentFocusGained(tc, ev);
! //if(tc != getSelectedTopComponent()) {
//Bugfix #11604 for JDK 1.4, disable change listener on tab to prevent from tab cycling
int j = positionNames.indexOf(constraints.get(tc));
JTabbedPane tab = tabbedContainer[j];
***************
*** 1583,1593 ****
tab.removeChangeListener(this);
}
setSelectedTopComponent(tc);
! reactivateSelectedComponent();
if(tab != null) {
tab.addChangeListener(this);
}
! }
}
/** Updates UI of DynUIJTabbedaPane
. Utility method.
--- 1583,1593 ----
tab.removeChangeListener(this);
}
setSelectedTopComponent(tc);
! reactivateSelectedComponent(true);
if(tab != null) {
tab.addChangeListener(this);
}
! //}
}
/** Updates UI of DynUIJTabbedaPane
. Utility method.