APIdia Launch Partner
Top Description Fields Constructors Methods
jdk.swing.interop

public Class LightweightFrameWrapper

extends Object
Class Inheritance
Imports
java.awt.AWTEvent, .Container, .Component, java.awt.event.WindowFocusListener, .MouseEvent, .MouseWheelEvent, .KeyEvent, sun.awt.LightweightFrame, .UngrabEvent, .AWTAccessor, sun.swing.JLightweightFrame

This class wraps sun.swing.JLightweightFrame and implements APIs to be used by FX swing interop to access and use JLightweightFrame APIs.
Since
11

Field Summary

Modifier and TypeField and Description
pack-priv JLightweightFrame

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public void
public KeyEvent
createKeyEvent(LightweightFrameWrapper lwFrame, int swingID, long swingWhen, int swingModifiers, int swingKeyCode, char swingChar)

public MouseEvent
createMouseEvent(LightweightFrameWrapper lwFrame, int swingID, long swingWhen, int swingModifiers, int relX, int relY, int absX, int absY, int clickCount, boolean swingPopupTrigger, int swingButton)

public MouseWheelEvent
createMouseWheelEvent(LightweightFrameWrapper lwFrame, int swingModifiers, int x, int y, int wheelRotation)

public AWTEvent
public void
public void
emulateActivation(boolean activate)

public Component
findComponentAt(LightweightFrameWrapper cont, int x, int y, boolean ignoreEnabled)

private JLightweightFrame
public boolean
public void
notifyDisplayChanged(final int scaleFactor)

public void
notifyDisplayChanged(final double scaleFactorX, final double scaleFactorY)

pack-priv void
overrideNativeWindowHandle(long handle, Runnable closeWindow)

overrideNativeWindowHandle() is package private but part of the interface of this class.

public void
setBounds(int x, int y, int w, int h)

public void
public void
setHostBounds(int x, int y, int w, int h)

public void
setVisible(boolean visible)

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

lwFrameback to summary
pack-priv JLightweightFrame lwFrame

Constructor Detail

LightweightFrameWrapperback to summary
public LightweightFrameWrapper()

Method Detail

addWindowFocusListenerback to summary
public void addWindowFocusListener(WindowFocusListener listener)
createKeyEventback to summary
public KeyEvent createKeyEvent(LightweightFrameWrapper lwFrame, int swingID, long swingWhen, int swingModifiers, int swingKeyCode, char swingChar)
createMouseEventback to summary
public MouseEvent createMouseEvent(LightweightFrameWrapper lwFrame, int swingID, long swingWhen, int swingModifiers, int relX, int relY, int absX, int absY, int clickCount, boolean swingPopupTrigger, int swingButton)
createMouseWheelEventback to summary
public MouseWheelEvent createMouseWheelEvent(LightweightFrameWrapper lwFrame, int swingModifiers, int x, int y, int wheelRotation)
createUngrabEventback to summary
public AWTEvent createUngrabEvent(LightweightFrameWrapper lwFrame)
disposeback to summary
public void dispose()
emulateActivationback to summary
public void emulateActivation(boolean activate)
findComponentAtback to summary
public Component findComponentAt(LightweightFrameWrapper cont, int x, int y, boolean ignoreEnabled)
getLightweightFrameback to summary
private JLightweightFrame getLightweightFrame()
isCompEqualback to summary
public boolean isCompEqual(Component c, LightweightFrameWrapper lwFrame)
notifyDisplayChangedback to summary
public void notifyDisplayChanged(final int scaleFactor)
notifyDisplayChangedback to summary
public void notifyDisplayChanged(final double scaleFactorX, final double scaleFactorY)
overrideNativeWindowHandleback to summary
pack-priv void overrideNativeWindowHandle(long handle, Runnable closeWindow)

overrideNativeWindowHandle() is package private but part of the interface of this class. It supports providing a foreign native window handle (i.e. an FX window handle) to AWT, and as such is intended to be called via JNI code, not by Java code, so it is not public.

setBoundsback to summary
public void setBounds(int x, int y, int w, int h)
setContentback to summary
public void setContent(final LightweightContentWrapper lwCntWrapper)
setHostBoundsback to summary
public void setHostBounds(int x, int y, int w, int h)
setVisibleback to summary
public void setVisible(boolean visible)