Top Inners Fields Constructors Methods
jogamp.nativewindow.awt

public Class AWTMisc

extends Object
Class Inheritance
Imports
java.awt.Cursor, .FocusTraversalPolicy, .Insets, .Point, .Toolkit, .Window, .Component, .Container, .Frame, java.awt.image.BufferedImage, java.nio.ByteBuffer, java.util.HashMap, javax.swing.JComponent, .JFrame, .JRootPane, .WindowConstants, .MenuSelectionManager, com.jogamp.nativewindow.NativeWindowException, .WindowClosingProtocol, com.jogamp.nativewindow.util.PixelRectangle, .PixelFormat, .PixelFormatUtil, com.jogamp.nativewindow.awt.DirectDataBufferInt, jogamp.nativewindow.jawt.JAWTUtil

Nested and Inner Type Summary

Modifier and TypeClass and Description
public static interface

Field Summary

Modifier and TypeField and Description
pack-priv static final HashMap<Integer, Cursor>
pack-priv static final Cursor

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public static WindowClosingProtocol.WindowClosingMode
AWT2NWClosingOperation(final int awtClosingOperation)

public static void
clearAWTMenus()

Issue this when your non AWT toolkit gains focus to clear AWT menu path

private static synchronized Cursor
createCursor(final PixelRectangle pixelrect, final Point hotSpot)

public static Container
public static synchronized Cursor
getCursor(final PixelRectangle pixelrect, final Point hotSpot)

public static Frame
public static Insets
getInsets(final Component c, final boolean
if true only returns insets of top-level components, i.e. Window and JRootPanel, otherwise for JComponent as well.
topLevelOnly
)

Return insets of the component w/o traversing up to parent, i.e. trying Window and JComponent.

public static JFrame
public static Component
getLocationOnScreenNonBlocking(final Point storage, Component comp, final boolean verbose)

public static Point
getLocationOnScreenSafe(Point storage, final Component component, final boolean verbose)

public static Component
getNextFocus(Component
the assumed current focuse component
comp
,
final boolean
if true, returns the next focus component, otherwise the previous one.
forward
)

Traverse to the next forward or backward component using the container's FocusTraversalPolicy.

public static synchronized Cursor
public static WindowClosingProtocol.WindowClosingMode
public static Window
public static int
performAction(final Container c, final Class<?> cType, final AWTMisc.ComponentAction action)

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

cursorMapback to summary
pack-priv static final HashMap<Integer, Cursor> cursorMap
nulCursorback to summary
pack-priv static final Cursor nulCursor

Constructor Detail

AWTMiscback to summary
public AWTMisc()

Method Detail

AWT2NWClosingOperationback to summary
public static WindowClosingProtocol.WindowClosingMode AWT2NWClosingOperation(final int awtClosingOperation)
clearAWTMenusback to summary
public static void clearAWTMenus()

Issue this when your non AWT toolkit gains focus to clear AWT menu path

createCursorback to summary
private static synchronized Cursor createCursor(final PixelRectangle pixelrect, final Point hotSpot)
getContainerback to summary
public static Container getContainer(Component c)
getCursorback to summary
public static synchronized Cursor getCursor(final PixelRectangle pixelrect, final Point hotSpot)
getFrameback to summary
public static Frame getFrame(Component c)
getInsetsback to summary
public static Insets getInsets(final Component c, final boolean topLevelOnly)

Return insets of the component w/o traversing up to parent, i.e. trying Window and JComponent.

Exception is JRootPane. Return it's parent's Window component's insets if available, otherwise return JRootPane's insets.
This is due to experience that some JRootPane's do not expose valid insets value.

Parameters
topLevelOnly:boolean

if true only returns insets of top-level components, i.e. Window and JRootPanel, otherwise for JComponent as well.

getJFrameback to summary
public static JFrame getJFrame(Component c)
getLocationOnScreenNonBlockingback to summary
public static Component getLocationOnScreenNonBlocking(final Point storage, Component comp, final boolean verbose)
getLocationOnScreenSafeback to summary
public static Point getLocationOnScreenSafe(Point storage, final Component component, final boolean verbose)
getNextFocusback to summary
public static Component getNextFocus(Component comp, final boolean forward)

Traverse to the next forward or backward component using the container's FocusTraversalPolicy.

Parameters
comp:Component

the assumed current focuse component

forward:boolean

if true, returns the next focus component, otherwise the previous one.

getNullCursorback to summary
public static synchronized Cursor getNullCursor()
getNWClosingOperationback to summary
public static WindowClosingProtocol.WindowClosingMode getNWClosingOperation(final Component c)
getWindowback to summary
public static Window getWindow(Component c)
performActionback to summary
public static int performAction(final Container c, final Class<?> cType, final AWTMisc.ComponentAction action)
jogamp.nativewindow.awt back to summary

public Interface AWTMisc.ComponentAction


Method Summary

Modifier and TypeMethod and Description
public void
run(Component
the component to perform the action on
c
)

Method Detail

runback to summary
public void run(Component c)
Parameters
c:Component

the component to perform the action on