Review request for MACOSX_PORT-539: Need a java.awt.EmbeddedFrame subclass (original) (raw)

Dmitry Cherepanov dmitry.cherepanov at oracle.com
Wed Jan 11 05:31:58 PST 2012


Hi Artem,

Artem Ananiev wrote:

Hi, Dmitry,

here are my comments: 1. CEmbeddedFrame and CPlatformEmbeddedFrame are probably not the best names. I can't suggest anything better, though. I can't come up with anything better too but hopefully these names make sense to some extent.

src/macosx/classes/sun/lwawt/macosx/CDropTarget.java

skips registering drop target on CPlatformEmbeddedFrame (Scott wrote 

that the Plugin doesn't deliver drag-and-drop events).

src/macosx/classes/sun/lwawt/macosx/CInputMethod.java

skips notifying CInputMethod instances about focus/IME events (input 

methods aren't implemented yet in embedded env).

src/macosx/classes/sun/lwawt/macosx/CPlatformWindow.java

skip using embedded frames (which don't have underlying 

NSView/NSWindow) as owner windows.

5. What is the reason of exporting the getPeer() method in the PlatformWindow interface? It's done as a part of the changes in src/macosx/classes/sun/lwawt/macosx/CPlatformComponent.java

The change removes explicit reference to the CPlatformWindow class (to make it working for CPlatformEmbeddedFrame) but it still needs to call platformWindow.getPeer() (see the setBounds method). It could probably be refactored into a more simplified code (to remove the getPeer method from the PlatformWindow interface).

Thanks for reviewing this!

Dmitry

Thanks, Artem On 12/29/2011 6:06 PM, Dmitry Cherepanov wrote: Hello,

Please review an initial implementation for http://java.net/jira/browse/MACOSXPORT-539 at http://cr.openjdk.java.net/~dcherepanov/7124335/webrev.0/ Basically the fix provides a lightweight implementation of the EmbeddedFrame class (isn't backed by a NSView/NSWindow). The implementation creates an instance of CALayer and exposes it as protected CEmbeddedFrame method. Please see the bug report http://java.net/jira/browse/MACOSXPORT-539 for more details about the current version of the fix. Thanks, Dmitry



More information about the macosx-port-dev mailing list