|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.jogamp.newt.impl.WindowImpl
public abstract class WindowImpl
Nested Class Summary | |
---|---|
static interface |
WindowImpl.LifecycleHook
|
Nested classes/interfaces inherited from interface com.jogamp.newt.Window |
---|
Window.FocusRunnable, Window.ReparentAction |
Field Summary | |
---|---|
protected CapabilitiesChooser |
capabilitiesChooser
|
protected CapabilitiesImmutable |
capsRequested
|
protected AbstractGraphicsConfiguration |
config
|
static boolean |
DEBUG_TEST_REPARENT_INCOMPATIBLE
|
protected boolean |
fullscreen
|
protected boolean |
hasFocus
|
protected int |
height
|
protected int |
nfs_height
|
protected int |
nfs_width
|
protected int |
nfs_x
|
protected int |
nfs_y
|
protected String |
title
|
protected boolean |
undecorated
|
protected boolean |
visible
|
protected int |
width
|
protected int |
x
|
protected int |
y
|
Fields inherited from interface com.jogamp.newt.Window |
---|
DEBUG_IMPLEMENTATION, DEBUG_KEY_EVENT, DEBUG_MOUSE_EVENT, DEBUG_WINDOW_EVENT, TIMEOUT_NATIVEWINDOW |
Fields inherited from interface javax.media.nativewindow.NativeSurface |
---|
LOCK_SUCCESS, LOCK_SURFACE_CHANGED, LOCK_SURFACE_NOT_READY, LOCK_SURFACE_UNLOCKED |
Fields inherited from interface javax.media.nativewindow.WindowClosingProtocol |
---|
DISPOSE_ON_CLOSE, DO_NOTHING_ON_CLOSE |
Constructor Summary | |
---|---|
WindowImpl()
|
Method Summary | |
---|---|
void |
addChild(NativeWindow win)
|
void |
addKeyListener(int index,
KeyListener l)
Inserts the given KeyListener at the
specified position in the list. |
void |
addKeyListener(KeyListener l)
Appends the given KeyListener to the end of
the list. |
void |
addMouseListener(int index,
MouseListener l)
Inserts the given MouseListener at the
specified position in the list. |
void |
addMouseListener(MouseListener l)
Appends the given MouseListener to the end of
the list. |
void |
addSurfaceUpdatedListener(int index,
SurfaceUpdatedListener l)
Inserts the given com.jogamp.newt.event.SurfaceUpdatedListener at the
specified position in the list. |
void |
addSurfaceUpdatedListener(SurfaceUpdatedListener l)
Appends the given com.jogamp.newt.event.SurfaceUpdatedListener to the end of
the list. |
void |
addWindowListener(int index,
WindowListener l)
Inserts the given WindowListener at the
specified position in the list. |
void |
addWindowListener(WindowListener l)
Appends the given WindowListener to the end of
the list. |
protected abstract void |
closeNativeImpl()
|
boolean |
consumeEvent(NEWTEvent e)
Consume the event |
protected void |
consumeKeyEvent(KeyEvent e)
|
protected void |
consumeMouseEvent(MouseEvent e)
|
protected void |
consumeWindowEvent(WindowEvent e)
|
static WindowImpl |
create(NativeWindow parentWindow,
long parentWindowHandle,
Screen screen,
CapabilitiesImmutable caps)
|
static WindowImpl |
create(Object[] cstrArguments,
Screen screen,
CapabilitiesImmutable caps)
|
protected abstract void |
createNativeImpl()
The native implementation must set the native windowHandle. The implementation should invoke the referenced java state callbacks to notify this Java object of state changes. |
void |
destroy()
Destroy the Window and it's children, incl. |
void |
enqueueEvent(boolean wait,
NEWTEvent event)
|
void |
enqueueKeyEvent(boolean wait,
int eventType,
int modifiers,
int keyCode,
char keyChar)
|
void |
enqueueMouseEvent(boolean wait,
int eventType,
int modifiers,
int x,
int y,
int button,
int rotation)
|
protected void |
enqueueRequestFocus(boolean wait)
|
void |
enqueueWindowEvent(boolean wait,
int eventType)
|
protected boolean |
focusAction()
|
protected void |
focusChanged(boolean focusGained)
|
CapabilitiesImmutable |
getChosenCapabilities()
Gets an immutable set of chosen capabilities. |
int |
getDefaultCloseOperation()
|
long |
getDisplayHandle()
Convenience: Get display handle from AbstractGraphicsConfiguration . |
AbstractGraphicsConfiguration |
getGraphicsConfiguration()
Returns the graphics configuration corresponding to this window. |
int |
getHeight()
Returns the height of the client area of this window |
Insets |
getInsets()
Returns the insets for this native window (the difference between the size of the toplevel window with the decorations and the client area). |
KeyListener |
getKeyListener(int index)
|
KeyListener[] |
getKeyListeners()
|
WindowImpl.LifecycleHook |
getLifecycleHook()
|
Point |
getLocationOnScreen(Point storage)
Returns the current absolute location of this window. |
protected abstract Point |
getLocationOnScreenImpl(int x,
int y)
Return screen coordinates of the given coordinates or null, in which case a NativeWindow traversal shall being used as demonstrated in getLocationOnScreen(javax.media.nativewindow.util.Point) . |
MouseListener |
getMouseListener(int index)
|
MouseListener[] |
getMouseListeners()
|
NativeWindow |
getParent()
|
protected long |
getParentWindowHandle()
|
CapabilitiesImmutable |
getRequestedCapabilities()
Gets an immutable set of requested capabilities. |
Screen |
getScreen()
|
int |
getScreenIndex()
Convenience: Get display handle from AbstractGraphicsConfiguration . |
long |
getSurfaceHandle()
Returns the handle to the surface for this NativeSurface. |
Thread |
getSurfaceLockOwner()
Return the locking owner's Thread, or null if not locked. |
SurfaceUpdatedListener |
getSurfaceUpdatedListener(int index)
|
SurfaceUpdatedListener[] |
getSurfaceUpdatedListeners()
|
static String |
getThreadName()
|
String |
getTitle()
|
int |
getWidth()
Returns the width of the client area of this window |
long |
getWindowHandle()
Returns the window handle for this NativeWindow. |
WindowListener |
getWindowListener(int index)
|
WindowListener[] |
getWindowListeners()
|
protected int |
getWindowLockRecursionCount()
|
Object |
getWrappedWindow()
If this Window actually wraps one from another toolkit such as the AWT, this will return a non-null value. |
int |
getX()
Returns the current x position of this window, relative to it's parent. |
int |
getY()
Returns the current y position of this window, relative to it's parent. |
boolean |
hasDeviceChanged()
If the implementation is capable of detecting a device change return true and clear the status/reason of the change. |
boolean |
hasFocus()
|
static void |
init(String type)
|
void |
invalidate()
Destroys the Window via Window.destroy() and clears all Object references,
eg. |
protected void |
invalidate(boolean unrecoverable)
|
boolean |
isFullscreen()
|
boolean |
isNativeValid()
|
boolean |
isSurfaceLocked()
Return if surface is locked |
boolean |
isSurfaceLockedByOtherThread()
Return if surface is locked by another thread, ie not the current one |
boolean |
isUndecorated()
|
boolean |
isValid()
|
boolean |
isVisible()
|
int |
lockSurface()
Lock the surface of this native window |
protected int |
lockSurfaceImpl()
|
protected void |
positionChanged(int newX,
int newY)
|
protected abstract boolean |
reconfigureWindowImpl(int x,
int y,
int width,
int height,
boolean parentChange,
int fullScreenChange,
int decorationChange)
The native implementation should invoke the referenced java state callbacks to notify this Java object of state changes. |
void |
removeAllSurfaceUpdatedListener()
|
void |
removeChild(NativeWindow win)
|
void |
removeKeyListener(KeyListener l)
|
void |
removeMouseListener(MouseListener l)
|
void |
removeSurfaceUpdatedListener(SurfaceUpdatedListener l)
|
void |
removeWindowListener(WindowListener l)
|
int |
reparentWindow(NativeWindow newParent)
Change this window's parent window. |
int |
reparentWindow(NativeWindow newParent,
boolean forceDestroyCreate)
|
void |
requestFocus()
|
protected abstract void |
requestFocusImpl(boolean force)
The native implementation must invoke focusChanged(boolean)
to change the focus state, if force == false . |
void |
runOnEDTIfAvail(boolean wait,
Runnable task)
|
void |
sendKeyEvent(int eventType,
int modifiers,
int keyCode,
char keyChar)
|
void |
sendMouseEvent(int eventType,
int modifiers,
int x,
int y,
int button,
int rotation)
|
void |
sendWindowEvent(int eventType)
|
CapabilitiesChooser |
setCapabilitiesChooser(CapabilitiesChooser chooser)
Set the CapabilitiesChooser to help determine the native visual type. |
int |
setDefaultCloseOperation(int op)
|
void |
setFocusAction(Window.FocusRunnable focusAction)
May set to a FocusRunnable , FocusRunnable#run() before Newt requests the native focus. |
boolean |
setFullscreen(boolean fullscreen)
|
void |
setHandleDestroyNotify(boolean b)
If set to true, the default value, this NEWT Window implementation will handle the destruction (ie destroy() call) within windowDestroyNotify() implementation.If set to false, it's up to the caller/owner to handle destruction within windowDestroyNotify() . |
WindowImpl.LifecycleHook |
setLifecycleHook(WindowImpl.LifecycleHook hook)
|
void |
setPosition(int x,
int y)
Sets the location of the top left corner of the window, including decorations (so the client area will be placed at x+insets.left,y+insets.top .This call is ignored if in fullscreen mode. |
void |
setSize(int width,
int height)
Sets the size of the client area of the window, excluding decorations Total size of the window will be width+insets.left+insets.right, height+insets.top+insets.bottom |
void |
setTitle(String title)
|
protected void |
setTitleImpl(String title)
|
void |
setUndecorated(boolean value)
|
void |
setVisible(boolean visible)
setVisible makes the window and children visible if visible is true,
otherwise the window and children becomes invisible. |
protected abstract void |
setVisibleImpl(boolean visible,
int x,
int y,
int width,
int height)
The native implementation must invoke visibleChanged(boolean)
to change the visibility state. |
protected void |
setWindowHandle(long handle)
|
protected void |
shouldNotCallThis()
|
protected void |
sizeChanged(int newWidth,
int newHeight,
boolean force)
|
boolean |
surfaceSwap()
Provide a mechanism to utilize custom (pre-) swap surface code. |
void |
surfaceUpdated(Object updater,
NativeSurface ns,
long when)
Notification of a surface update event. |
static String |
toHexString(int hex)
|
static String |
toHexString(long hex)
|
String |
toString()
|
void |
unlockSurface()
Unlock the surface of this native window Shall not modify the surface handle, see NativeSurface.lockSurface() |
protected void |
unlockSurfaceImpl()
|
protected void |
visibleChanged(boolean visible)
|
protected void |
windowDestroyNotify()
|
void |
windowRepaint(int x,
int y,
int width,
int height)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final boolean DEBUG_TEST_REPARENT_INCOMPATIBLE
protected AbstractGraphicsConfiguration config
protected CapabilitiesImmutable capsRequested
protected CapabilitiesChooser capabilitiesChooser
protected boolean fullscreen
protected boolean visible
protected boolean hasFocus
protected int width
protected int height
protected int x
protected int y
protected int nfs_width
protected int nfs_height
protected int nfs_x
protected int nfs_y
protected String title
protected boolean undecorated
Constructor Detail |
---|
public WindowImpl()
Method Detail |
---|
public static void init(String type)
public static WindowImpl create(NativeWindow parentWindow, long parentWindowHandle, Screen screen, CapabilitiesImmutable caps)
public static WindowImpl create(Object[] cstrArguments, Screen screen, CapabilitiesImmutable caps)
protected int lockSurfaceImpl()
protected void unlockSurfaceImpl()
public int getDefaultCloseOperation()
getDefaultCloseOperation
in interface WindowClosingProtocol
WindowClosingProtocol.DISPOSE_ON_CLOSE
,
WindowClosingProtocol.DO_NOTHING_ON_CLOSE
public int setDefaultCloseOperation(int op)
setDefaultCloseOperation
in interface WindowClosingProtocol
op
- the new close operation value
WindowClosingProtocol.DISPOSE_ON_CLOSE
,
WindowClosingProtocol.DO_NOTHING_ON_CLOSE
protected abstract void createNativeImpl()
windowDestroyNotify()
,
focusChanged(boolean)
,
visibleChanged(boolean)
,
#sizeChanged(int,int)
,
positionChanged(int,int)
,
windowDestroyNotify()
protected abstract void closeNativeImpl()
protected abstract void requestFocusImpl(boolean force)
focusChanged(boolean)
to change the focus state, if force == false
.
This may happen asynchronous within Window.TIMEOUT_NATIVEWINDOW
.
force
- if true, bypass focusChanged(boolean)
and force focus requestprotected abstract void setVisibleImpl(boolean visible, int x, int y, int width, int height)
visibleChanged(boolean)
to change the visibility state. This may happen asynchronous within
Window.TIMEOUT_NATIVEWINDOW
.
protected abstract boolean reconfigureWindowImpl(int x, int y, int width, int height, boolean parentChange, int fullScreenChange, int decorationChange)
x
- -1 if no position change requested, otherwise greater than zeroy
- -1 if no position change requested, otherwise greater than zerowidth
- -1 if no size change requested, otherwise greater than zeroheight
- -1 if no size change requested, otherwise greater than zeroparentChange
- true if reparenting requested, otherwise falsefullScreenChange
- 0 if unchanged, -1 fullscreen off, 1 fullscreen ondecorationChange
- 0 if unchanged, -1 undecorated, 1 decorated#sizeChanged(int,int)
,
positionChanged(int,int)
protected void setTitleImpl(String title)
protected abstract Point getLocationOnScreenImpl(int x, int y)
getLocationOnScreen(javax.media.nativewindow.util.Point)
.
public final int lockSurface()
NativeSurface
The surface handle, see NativeSurface.lockSurface()
,
shall be valid after a successfull call,
ie return a value other than NativeSurface.LOCK_SURFACE_NOT_READY
.
This call is blocking until the surface has been locked or a timeout is reached. The latter will throw a runtime exception.
This call allows recursion from the same thread.
The implementation may want to aquire the
application level RecursiveLock
first before proceeding with a native surface lock.
The implementation shall also invoke AbstractGraphicsDevice.lock()
for the initial lock (recursive count zero).
lockSurface
in interface NativeSurface
NativeSurface.LOCK_SUCCESS
, NativeSurface.LOCK_SURFACE_CHANGED
or NativeSurface.LOCK_SURFACE_NOT_READY
.RecursiveLock
public final void unlockSurface()
NativeSurface
NativeSurface.lockSurface()
The implementation shall also invoke AbstractGraphicsDevice.unlock()
for the final unlock (recursive count zero).
unlockSurface
in interface NativeSurface
NativeSurface.lockSurface()
,
RecursiveLock
public final boolean isSurfaceLockedByOtherThread()
NativeSurface
isSurfaceLockedByOtherThread
in interface NativeSurface
public final boolean isSurfaceLocked()
NativeSurface
isSurfaceLocked
in interface NativeSurface
public final Thread getSurfaceLockOwner()
NativeSurface
getSurfaceLockOwner
in interface NativeSurface
public long getSurfaceHandle()
NativeSurface
The surface handle should be set/update by NativeSurface.lockSurface()
,
where NativeSurface.unlockSurface()
is not allowed to modify it.
After NativeSurface.unlockSurface()
it is no more guaranteed
that the surface handle is still valid.
The surface handle shall reflect the platform one
for all drawable surface operations, e.g. opengl, swap-buffer.
On X11 this returns an entity of type Window,
since there is no differentiation of surface and window there.
On Microsoft Windows this returns an entity of type HDC.
getSurfaceHandle
in interface NativeSurface
public boolean surfaceSwap()
NativeSurface
surfaceSwap
in interface NativeSurface
public AbstractGraphicsConfiguration getGraphicsConfiguration()
NativeSurface
getGraphicsConfiguration
in interface NativeSurface
javax.media.nativewindow.GraphicsConfigurationFactory#chooseGraphicsConfiguration(Capabilities, CapabilitiesChooser, AbstractGraphicsScreen)
public final long getDisplayHandle()
NativeSurface
getDisplayHandle
in interface NativeSurface
public final int getScreenIndex()
NativeSurface
getScreenIndex
in interface NativeSurface
public final NativeWindow getParent()
getParent
in interface NativeWindow
public final long getWindowHandle()
NativeWindow
The window handle shall reflect the platform one for all window related operations, e.g. open, close, resize.
On X11 this returns an entity of type Window.
On Microsoft Windows this returns an entity of type HWND.
getWindowHandle
in interface NativeWindow
public Point getLocationOnScreen(Point storage)
NativeWindow
getLocationOnScreen
in interface NativeWindow
storage
- if not null,
Point.translate(javax.media.nativewindow.util.Point)
the passed Point
by this location on the screen and return it.
public final boolean isNativeValid()
isNativeValid
in interface Window
Window.setVisible(boolean)
,
#destroy(boolean)
public final boolean isValid()
isValid
in interface Window
destroy(true)
call.#destroy(boolean)
,
Window.setVisible(boolean)
public final Screen getScreen()
getScreen
in interface Window
public void setVisible(boolean visible)
Window
setVisible
makes the window and children visible if visible
is true,
otherwise the window and children becomes invisible.
The setVisible(true)
is responsible to actual create the native window.
Zero size semantics are respected, see Window.setSize(int,int)
:
if ( 0 == windowHandle && visible ) { this.visible = visible; if( 0In case this window is a child window and a parent
NativeWindow
is being used,
the parent'sNativeWindow
handle is retrieved viaNativeWindow.getWindowHandle()
.
If this action fails, ie if the parentNativeWindow
is not valid yet,
no native window is created yet andsetVisible(true)
shall be repeated when it is.
- Specified by:
setVisible
in interfaceWindow
public void setSize(int width, int height)
Window
width+insets.left+insets.right, height+insets.top+insets.bottom
Zero size semantics are respected, see Window.setVisible(boolean)
:
if ( 0 != windowHandle && 0>=width*height && visible ) { setVisible(false); } else if ( 0 == windowHandle && 0This call is ignored if in fullscreen mode.
- Specified by:
setSize
in interfaceWindow
- Parameters:
width
- of the client area of the windowheight
- of the client area of the window
public void destroy()
Window
setVisible(true)
.
This method invokes Screen.removeReference()
after it's own destruction,
which will issue Screen.destroy()
if the reference count becomes 0.
This destruction sequence shall end up in Display.destroy()
, if all reference counts become 0.
destroy
in interface Window
destroy
in interface NativeWindow
Window.invalidate()
,
Window.setVisible(boolean)
public final void invalidate()
Window
Window.destroy()
and clears all Object references,
eg. all states, size, position, parent handles, list of child Windows and reference to it's Screen.
invalidate
in interface Window
protected void invalidate(boolean unrecoverable)
unrecoverable
- If true, all states, size, position, parent handles,
reference to it's Screen are reset.
Otherwise you can recreate the window, via setVisible(true)
.invalidate()
,
destroy()
,
#destroy(boolean)
public final int reparentWindow(NativeWindow newParent)
Window
In case the old parent is not null and a Window,
this window is removed from it's list of children.
In case the new parent is not null and a Window,
this window is added to it's list of children.
reparentWindow
in interface Window
newParent
- The new parent NativeWindow. If null, this Window becomes a top level window.
public int reparentWindow(NativeWindow newParent, boolean forceDestroyCreate)
reparentWindow
in interface Window
public CapabilitiesChooser setCapabilitiesChooser(CapabilitiesChooser chooser)
Window
setCapabilitiesChooser
in interface Window
chooser
- the new CapabilitiesChooser
public final CapabilitiesImmutable getChosenCapabilities()
Window
getChosenCapabilities
in interface Window
public final CapabilitiesImmutable getRequestedCapabilities()
Window
getRequestedCapabilities
in interface Window
public String getTitle()
getTitle
in interface Window
public void setTitle(String title)
setTitle
in interface Window
public void setUndecorated(boolean value)
setUndecorated
in interface Window
public boolean isUndecorated()
isUndecorated
in interface Window
public void requestFocus()
requestFocus
in interface Window
public boolean hasFocus()
hasFocus
in interface Window
public Insets getInsets()
Window
getInsets
in interface Window
public final int getWidth()
Window
getWidth
in interface Window
getWidth
in interface NativeSurface
public final int getHeight()
Window
getHeight
in interface Window
getHeight
in interface NativeSurface
public final int getX()
NativeWindow
getX
in interface Window
getX
in interface NativeWindow
public final int getY()
NativeWindow
getY
in interface Window
getY
in interface NativeWindow
public final boolean isVisible()
isVisible
in interface Window
public final boolean isFullscreen()
isFullscreen
in interface Window
public boolean hasDeviceChanged()
public WindowImpl.LifecycleHook getLifecycleHook()
public WindowImpl.LifecycleHook setLifecycleHook(WindowImpl.LifecycleHook hook)
public Object getWrappedWindow()
public void setHandleDestroyNotify(boolean b)
destroy()
call) within windowDestroyNotify()
implementation.windowDestroyNotify()
.
protected final long getParentWindowHandle()
public String toString()
toString
in class Object
protected final void setWindowHandle(long handle)
public void runOnEDTIfAvail(boolean wait, Runnable task)
runOnEDTIfAvail
in interface Window
protected void enqueueRequestFocus(boolean wait)
public void setFocusAction(Window.FocusRunnable focusAction)
FocusRunnable
, FocusRunnable#run()
before Newt requests the native focus.
This allows notifying a covered window toolkit like AWT that the focus is requested,
hence focus traversal can be made transparent.
setFocusAction
in interface Window
protected boolean focusAction()
public void setPosition(int x, int y)
Window
x+insets.left,y+insets.top
.
setPosition
in interface Window
x
- coord of the top left cornery
- coord of the top left cornerpublic boolean setFullscreen(boolean fullscreen)
setFullscreen
in interface Window
public final void removeChild(NativeWindow win)
removeChild
in interface Window
public final void addChild(NativeWindow win)
addChild
in interface Window
public void enqueueEvent(boolean wait, NEWTEvent event)
enqueueEvent
in interface Window
public boolean consumeEvent(NEWTEvent e)
NEWTEventConsumer
consumeEvent
in interface NEWTEventConsumer
public void addSurfaceUpdatedListener(SurfaceUpdatedListener l)
Window
com.jogamp.newt.event.SurfaceUpdatedListener
to the end of
the list.
addSurfaceUpdatedListener
in interface Window
public void addSurfaceUpdatedListener(int index, SurfaceUpdatedListener l) throws IndexOutOfBoundsException
Window
com.jogamp.newt.event.SurfaceUpdatedListener
at the
specified position in the list.
addSurfaceUpdatedListener
in interface Window
index
- Position where the listener will be inserted.
Should be within (0 <= index && index <= size()).
An index value of -1 is interpreted as the end of the list, size().l
- The listener object to be inserted
IndexOutOfBoundsException
- If the index is not within (0 <= index && index <= size()), or -1public void removeSurfaceUpdatedListener(SurfaceUpdatedListener l)
removeSurfaceUpdatedListener
in interface Window
public void removeAllSurfaceUpdatedListener()
removeAllSurfaceUpdatedListener
in interface Window
public SurfaceUpdatedListener getSurfaceUpdatedListener(int index)
getSurfaceUpdatedListener
in interface Window
public SurfaceUpdatedListener[] getSurfaceUpdatedListeners()
getSurfaceUpdatedListeners
in interface Window
public void surfaceUpdated(Object updater, NativeSurface ns, long when)
SurfaceUpdatedListener
surfaceUpdated
in interface SurfaceUpdatedListener
updater
- is the caller object who updated the surface,
e.g. a JOGL GLDrawable.ns
- the updated NativeSurfacewhen
- the time in ms, when the surface was updatedpublic void sendMouseEvent(int eventType, int modifiers, int x, int y, int button, int rotation)
public void enqueueMouseEvent(boolean wait, int eventType, int modifiers, int x, int y, int button, int rotation)
public void addMouseListener(MouseListener l)
Window
MouseListener
to the end of
the list.
addMouseListener
in interface Window
public void addMouseListener(int index, MouseListener l)
Window
MouseListener
at the
specified position in the list.
addMouseListener
in interface Window
index
- Position where the listener will be inserted.
Should be within (0 <= index && index <= size()).
An index value of -1 is interpreted as the end of the list, size().l
- The listener object to be insertedpublic void removeMouseListener(MouseListener l)
removeMouseListener
in interface Window
public MouseListener getMouseListener(int index)
getMouseListener
in interface Window
public MouseListener[] getMouseListeners()
getMouseListeners
in interface Window
protected void consumeMouseEvent(MouseEvent e)
public void sendKeyEvent(int eventType, int modifiers, int keyCode, char keyChar)
public void enqueueKeyEvent(boolean wait, int eventType, int modifiers, int keyCode, char keyChar)
public void addKeyListener(KeyListener l)
Window
KeyListener
to the end of
the list.
addKeyListener
in interface Window
public void addKeyListener(int index, KeyListener l)
Window
KeyListener
at the
specified position in the list.
addKeyListener
in interface Window
index
- Position where the listener will be inserted.
Should be within (0 <= index && index <= size()).
An index value of -1 is interpreted as the end of the list, size().l
- The listener object to be insertedpublic void removeKeyListener(KeyListener l)
removeKeyListener
in interface Window
public KeyListener getKeyListener(int index)
getKeyListener
in interface Window
public KeyListener[] getKeyListeners()
getKeyListeners
in interface Window
protected void consumeKeyEvent(KeyEvent e)
public void sendWindowEvent(int eventType)
sendWindowEvent
in interface Window
public void enqueueWindowEvent(boolean wait, int eventType)
public void addWindowListener(WindowListener l)
Window
WindowListener
to the end of
the list.
addWindowListener
in interface Window
public void addWindowListener(int index, WindowListener l) throws IndexOutOfBoundsException
Window
WindowListener
at the
specified position in the list.
addWindowListener
in interface Window
index
- Position where the listener will be inserted.
Should be within (0 <= index && index <= size()).
An index value of -1 is interpreted as the end of the list, size().l
- The listener object to be inserted
IndexOutOfBoundsException
- If the index is not within (0 <= index && index <= size()), or -1public final void removeWindowListener(WindowListener l)
removeWindowListener
in interface Window
public WindowListener getWindowListener(int index)
getWindowListener
in interface Window
public WindowListener[] getWindowListeners()
getWindowListeners
in interface Window
protected void consumeWindowEvent(WindowEvent e)
protected void focusChanged(boolean focusGained)
focusGained
- protected void visibleChanged(boolean visible)
protected void sizeChanged(int newWidth, int newHeight, boolean force)
protected void positionChanged(int newX, int newY)
protected void windowDestroyNotify()
public void windowRepaint(int x, int y, int width, int height)
windowRepaint
in interface Window
protected int getWindowLockRecursionCount()
protected final void shouldNotCallThis()
public static String getThreadName()
public static String toHexString(int hex)
public static String toHexString(long hex)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |