internalFrameListener

Runs onFrameChange on every change to the internal frame - opened, closing, closed, iconified, deiconified, activated and deactivated alike. Requires a JInternalFrame target. Declare the changes one by one to tell them apart.

onFrameChange is read when the event fires, so writing a fresh lambda on every recomposition registers nothing again.

Return

this chain with the internal frame callback declared on it.

Parameters

onFrameChange

receives the event, whose id tells the seven apart and whose internalFrame is the frame that changed.

See also


fun SwingModifier.internalFrameListener(onFrameOpened: (InternalFrameEvent) -> Unit = UNDECLARED, onFrameClosing: (InternalFrameEvent) -> Unit = UNDECLARED, onFrameClosed: (InternalFrameEvent) -> Unit = UNDECLARED, onFrameIconified: (InternalFrameEvent) -> Unit = UNDECLARED, onFrameDeiconified: (InternalFrameEvent) -> Unit = UNDECLARED, onFrameActivated: (InternalFrameEvent) -> Unit = UNDECLARED, onFrameDeactivated: (InternalFrameEvent) -> Unit = UNDECLARED): SwingModifier

Runs each lambda on the change to the internal frame it is declared for. Requires a JInternalFrame target. A change left undeclared reports nowhere.

Each lambda is read when its event fires, so writing a fresh one on every recomposition registers nothing again.

Declaring none at all is refused.

Return

this chain with the internal frame callbacks declared on it.

Parameters

onFrameOpened

runs once, the first time the frame is shown.

onFrameClosing

runs before the close takes effect - from the close control and from setClosed(true) alike.

onFrameClosed

runs when the frame is disposed; a close operation that only hides it never reports here.

onFrameIconified

runs when the frame is minimized within the desktop.

onFrameDeiconified

runs when the frame is restored from being minimized.

onFrameActivated

runs when the frame becomes the selected one on the desktop.

onFrameDeactivated

runs when another frame takes that selection.

See also


Attaches an InternalFrameListener (addInternalFrameListener/removeInternalFrameListener). Requires a JInternalFrame target.

Return

this chain with the internal frame listener declared on it.

Parameters

listener

attached by identity, so a remembered instance stays put while a fresh one on every pass is detached and re-added.

See also