src/java.desktop/share/classes/java/awt/Container.java
Print this page
*** 545,556 ****
comp.checkGD(thisGC.getDevice().getIDstring());
}
}
/**
! * Removes component comp from this container without making unneccessary changes
! * and generating unneccessary events. This function intended to perform optimized
* remove, for example, if newParent and current parent are the same it just changes
* index without calling removeNotify.
* Note: Should be called while holding treeLock
* Returns whether removeNotify was invoked
* @since: 1.5
--- 545,556 ----
comp.checkGD(thisGC.getDevice().getIDstring());
}
}
/**
! * Removes component comp from this container without making unnecessary changes
! * and generating unnecessary events. This function intended to perform optimized
* remove, for example, if newParent and current parent are the same it just changes
* index without calling removeNotify.
* Note: Should be called while holding treeLock
* Returns whether removeNotify was invoked
* @since: 1.5
*** 1405,1419 ****
void adjustDescendants(int num) {
if (num == 0)
return;
descendantsCount += num;
! adjustDecendantsOnParent(num);
}
// Should only be called while holding tree lock
! void adjustDecendantsOnParent(int num) {
if (parent != null) {
parent.adjustDescendants(num);
}
}
--- 1405,1419 ----
void adjustDescendants(int num) {
if (num == 0)
return;
descendantsCount += num;
! adjustDescendantsOnParent(num);
}
// Should only be called while holding tree lock
! void adjustDescendantsOnParent(int num) {
if (parent != null) {
parent.adjustDescendants(num);
}
}
*** 2336,2346 ****
void dispatchEventToSelf(AWTEvent e) {
super.dispatchEventImpl(e);
}
/**
! * Fetchs the top-most (deepest) lightweight component that is interested
* in receiving mouse events.
*/
Component getMouseEventTarget(int x, int y, boolean includeSelf) {
return getMouseEventTarget(x, y, includeSelf,
MouseEventTargetFilter.FILTER,
--- 2336,2346 ----
void dispatchEventToSelf(AWTEvent e) {
super.dispatchEventImpl(e);
}
/**
! * Fetches the top-most (deepest) lightweight component that is interested
* in receiving mouse events.
*/
Component getMouseEventTarget(int x, int y, boolean includeSelf) {
return getMouseEventTarget(x, y, includeSelf,
MouseEventTargetFilter.FILTER,
*** 2885,2895 ****
// Event dispatch thread of this app context will be sleeping until
// we wake it by any event from hideAndDisposeHandler().
modalAppContext = AppContext.getAppContext();
// keep the KeyEvents from being dispatched
! // until the focus has been transfered
long time = Toolkit.getEventQueue().getMostRecentKeyEventTime();
Component predictedFocusOwner = (Component.isInstanceOf(this, "javax.swing.JInternalFrame")) ? ((javax.swing.JInternalFrame)(this)).getMostRecentFocusOwner() : null;
if (predictedFocusOwner != null) {
KeyboardFocusManager.getCurrentKeyboardFocusManager().
enqueueKeyEvents(time, predictedFocusOwner);
--- 2885,2895 ----
// Event dispatch thread of this app context will be sleeping until
// we wake it by any event from hideAndDisposeHandler().
modalAppContext = AppContext.getAppContext();
// keep the KeyEvents from being dispatched
! // until the focus has been transferred
long time = Toolkit.getEventQueue().getMostRecentKeyEventTime();
Component predictedFocusOwner = (Component.isInstanceOf(this, "javax.swing.JInternalFrame")) ? ((javax.swing.JInternalFrame)(this)).getMostRecentFocusOwner() : null;
if (predictedFocusOwner != null) {
KeyboardFocusManager.getCurrentKeyboardFocusManager().
enqueueKeyEvents(time, predictedFocusOwner);
*** 3671,3681 ****
* Serializes this <code>Container</code> to the specified
* <code>ObjectOutputStream</code>.
* <ul>
* <li>Writes default serializable fields to the stream.</li>
* <li>Writes a list of serializable ContainerListener(s) as optional
! * data. The non-serializable ContainerListner(s) are detected and
* no attempt is made to serialize them.</li>
* <li>Write this Container's FocusTraversalPolicy if and only if it
* is Serializable; otherwise, <code>null</code> is written.</li>
* </ul>
*
--- 3671,3681 ----
* Serializes this <code>Container</code> to the specified
* <code>ObjectOutputStream</code>.
* <ul>
* <li>Writes default serializable fields to the stream.</li>
* <li>Writes a list of serializable ContainerListener(s) as optional
! * data. The non-serializable ContainerListener(s) are detected and
* no attempt is made to serialize them.</li>
* <li>Write this Container's FocusTraversalPolicy if and only if it
* is Serializable; otherwise, <code>null</code> is written.</li>
* </ul>
*