AwtWindow

Extends
Container
Methods
18
Fields
1

Methods

MethodReturnsDescription
pack()()Sizes the window to fit its content (its preferred size, enlarged to the minimum size set), making it and its owner displayable first, then…
dispose()()Releases the window and the windows it owns: hidden and undisplayable, with WINDOW_CLOSED to its listeners. Its state is kept: pack or…
toFront()()Brings a showing window to the front and asks for focus.
setAlwaysOnTop(boolean)()Keeps the window above other windows, or not.
isAlwaysOnTop()booleanWhether the window stays above other windows.
setLocationRelativeTo(Component?)()Places the window: centred on c when it shows, else on the screen's centre, kept on screen. Only moves it: called before pack, it centr…
addWindowListener(any)()Adds a WindowListener (a WindowAdapter subclass, or any table with the methods it needs): it hears the window opened, closing, closed,…
removeWindowListener(any)()Removes a WindowListener, by identity.
getWindowListeners(){any}A copy of the WindowListeners, in registration order.
isActive()booleanWhether the window's OS window is the active one.
isFocused()booleanWhether the window is the focused window (as isActive()).
getFocusOwner()Component?The component that has focus in the window while it is focused, else nil.
getMostRecentFocusOwner()Component?The component that gets focus when the window is focused again: the focus owner, or the last one.
getOwner()AwtWindow?The window this one belongs to (a dialog's frame), or nil.
setIconImages({Image}?)()Sets the images the window's icon is chosen from, as a copy of icons: getIconImages() answers them in order, and a later change to `ico…
getIconImages(){Image}A new array of the images setIconImages was given, in order; empty before, and after nil or {}. A dialog does not answer its owner's.
init(AwtWindow)()The implicit no-argument constructor: the fresh state a node of this kind starts with, and nothing more. Construction runs it as every nati…
isInstance(any)booleanWhether obj is a AwtWindow object, a class(AwtWindow) subclass's included.

Fields

FieldTypeDescription
superContainerClassContainer's class table: the base class.

Returned by

MethodReturnsDescription
WindowEvent.getOppositeWindowAwtWindow?The other window of the plugin in an activation change, else nil.
WindowEvent.getWindowAwtWindow?The window, or nil once it was collected.
WindowEventBase.getComponentAwtWindow?The window, as getWindow().
WindowEventBase.getSourceAwtWindow?The window, as getWindow().

Method details

pack

pack: (AwtWindow) -> ()

Sizes the window to fit its content (its preferred size, enlarged to the minimum size set), making it and its owner displayable first, then lays it out.

dispose

dispose: (AwtWindow) -> ()

Releases the window and the windows it owns: hidden and undisplayable, with WINDOW_CLOSED to its listeners. Its state is kept: pack or setVisible(true) shows it again.

toFront

toFront: (AwtWindow) -> ()

Brings a showing window to the front and asks for focus.

setLocationRelativeTo

setLocationRelativeTo: (AwtWindow, Component?) -> ()

Places the window: centred on c when it shows, else on the screen's centre, kept on screen. Only moves it: called before pack, it centres the window's top-left.

addWindowListener

addWindowListener: (AwtWindow, any) -> ()

Adds a WindowListener (a WindowAdapter subclass, or any table with the methods it needs): it hears the window opened, closing, closed, iconified, deiconified, activated and deactivated, in registration order.

isActive

isActive: (AwtWindow) -> boolean

Whether the window's OS window is the active one.

isFocused

isFocused: (AwtWindow) -> boolean

Whether the window is the focused window (as isActive()).

setIconImages

setIconImages: (AwtWindow, {Image}?) -> ()

Sets the images the window's icon is chosen from, as a copy of icons: getIconImages() answers them in order, and a later change to icons is not seen. nil or {} restores the default icon. Bento's OS windows keep the host's icon whatever is set.

getIconImages

getIconImages: (AwtWindow) -> {Image}

A new array of the images setIconImages was given, in order; empty before, and after nil or {}. A dialog does not answer its owner's.

init

init: (AwtWindow) -> ()

The implicit no-argument constructor: the fresh state a node of this kind starts with, and nothing more. Construction runs it as every native base's super(); new does not take it.

isInstance

isInstance: (any) -> boolean

Whether obj is a AwtWindow object, a class(AwtWindow) subclass's included.