400 |
setDropTarget(new DropTarget()); |
setDropTarget(new DropTarget()); |
401 |
defaultLocale = Locale.getDefault(); |
defaultLocale = Locale.getDefault(); |
402 |
debugGraphicsOptions = DebugGraphics.NONE_OPTION; |
debugGraphicsOptions = DebugGraphics.NONE_OPTION; |
403 |
|
setRequestFocusEnabled(true); |
404 |
} |
} |
405 |
|
|
406 |
/** |
/** |
2325 |
} |
} |
2326 |
|
|
2327 |
/** |
/** |
2328 |
|
* Requests that this component gets the input focus if the top level |
2329 |
|
* window that contains this component has the focus and the |
2330 |
|
* requestFocusEnabled property is set to <code>true</code>. |
2331 |
|
* |
2332 |
|
* The preconditions that have to be met to become a focus owner is that |
2333 |
|
* the component must be displayable, visible and focusable. |
2334 |
|
* |
2335 |
|
* Note that this signals only a request for becoming focused. There are |
2336 |
|
* situations in which it is not possible to get the focus. So developers |
2337 |
|
* should not assume that the component has the focus until it receives |
2338 |
|
* a {@link java.awt.event.FocusEvent} with a value of |
2339 |
|
* {@link java.awt.event.FocusEvent.FOCUS_GAINED}. |
2340 |
|
* |
2341 |
|
* @return <code>false</code> if the focus change request will definitly |
2342 |
|
* fail, <code>true</code> if it will likely succeed |
2343 |
|
* |
2344 |
|
* @see {@link Component#requestFocusInWindow()} |
2345 |
|
*/ |
2346 |
|
public boolean requestFocusInWindow() |
2347 |
|
{ |
2348 |
|
if (isRequestFocusEnabled()) |
2349 |
|
return super.requestFocusInWindow(); |
2350 |
|
else |
2351 |
|
return false; |
2352 |
|
} |
2353 |
|
|
2354 |
|
/** |
2355 |
* This method is overridden to make it public so that it can be used |
* This method is overridden to make it public so that it can be used |
2356 |
* by look and feel implementations. |
* by look and feel implementations. |
2357 |
* |
* |