Class JInternalFrame
- All Implemented Interfaces:
ImageObserver, MenuContainer, Serializable, Accessible, WindowConstants, FieldReconciler.Reconcilable, RootPaneContainer
JInternalFrame. R_leaf_peer_lockdown-locked peer is SJInternalFrame.- See Also:
-
Nested Class Summary
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected booleanstatic final Stringprotected JInternalFrame.JDesktopIconstatic final Stringprotected Iconstatic final Stringprotected booleanstatic final Stringstatic final Stringstatic final Stringstatic final Stringprotected booleanprotected booleanprotected booleanprotected booleanstatic final Stringprotected booleanstatic final Stringprotected booleanstatic final Stringprotected JRootPaneprotected booleanprotected Stringstatic final StringFields inherited from class JComponent
TOOL_TIP_TEXT_KEY, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOWFields inherited from class Component
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, FILL_CHROME, FILL_DEFAULT, LEFT_ALIGNMENT, listenerList, RIGHT_ALIGNMENT, TOP_ALIGNMENTFields inherited from interface ImageObserver
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTHFields inherited from interface WindowConstants
DISPOSE_ON_CLOSE, DO_NOTHING_ON_CLOSE, EXIT_ON_CLOSE, HIDE_ON_CLOSE -
Constructor Summary
ConstructorsConstructorDescriptionJInternalFrame(String title) JInternalFrame(String title, boolean resizable) JInternalFrame(String title, boolean resizable, boolean closable) JInternalFrame(String title, boolean resizable, boolean closable, boolean maximizable) JInternalFrame(String title, boolean resizable, boolean closable, boolean maximizable, boolean iconifiable) -
Method Summary
Modifier and TypeMethodDescriptionprotected voidvoidprotected Containerprotected JRootPaneA freshJRootPane, whichgetRootPane()hands to the surrogate.voiddispose()Close and release the frame; fires INTERNAL_FRAME_CLOSED via the relay.voidDISPOSE honors the vetoable"closed"change (matches JDK); HIDE hides and deselects; DO_NOTHING leaves the frame open.protected voidfireInternalFrameEvent(int id) Dispatch oneInternalFrameEventid to registered listeners (source = this).protected voidMirror of JDKJInternalFrameconstruction: plant the emulator-side content pane withrootPaneCheckingEnabled=falsesosuper.addImplfalls through toContainer.addImpl, then flip checking on and wire the peer→emulator event relay.intgetSize()getTitle()booleanbooleanisClosed()booleanisIcon()booleanbooleanbooleanbooleanprotected booleanWhetheradd/remove/setLayoutredirect into the content pane.booleanbooleanbooleanvoidvoidSelect + best-effort front-raise (overlay order is Vaadin's, R_layouts_close_enough).final voidD_field_write_reconcile repair hook — seeJSlider.reconcileFields().voidvoidvoidsetBounds(int x, int y, int width, int height) voidvoidsetClosable(boolean b) voidsetClosed(boolean b) Constrained property.voidsetContentPane(Container newPane) voidsetDefaultCloseOperation(int operation) JDKJInternalFrame.setDefaultCloseOperationstores the value without validation (unlike JFrame/JDialog) — we match that.voidvoidsetFrameIcon(Icon icon) voidsetGlassPane(Component glass) voidsetIcon(boolean b) Iconify / deiconify.voidsetIconifiable(boolean b) voidsetLayeredPane(JLayeredPane layered) voidsetLayout(LayoutManager manager) voidsetLocation(int x, int y) voidsetLocation(Point p) voidsetMaximizable(boolean b) voidsetMaximum(boolean b) Constrained property — maximize to viewport-fill (D_internalframe_maximize).voidsetResizable(boolean b) protected voidsetRootPane(JRootPane newRootPane) The JDK also re-parents the pane throughremove/addunder a suspended root-pane check; that half is R_layouts_close_enough layout and stays out.protected voidsetRootPaneCheckingEnabled(boolean enabled) Companion toisRootPaneCheckingEnabled(): every internal write to the flag goes through here, so a subclass override observes the suspend / restore that brackets a content-pane swap as it does on the desktop.voidsetSelected(boolean b) Constrained property — selection.voidsetSize(int width, int height) voidvoidvoidsetVisible(boolean b) A JInternalFrame's peer is a Dialog overlay, so visibility means open/close, not display toggling.voidtoBack()voidtoFront()Methods inherited from class JComponent
addAncestorListener, addNotify, addVetoableChangeListener, computeVisibleRect, contains, createToolTip, disable, enable, firePropertyChange, firePropertyChange, firePropertyChange, fireVetoableChange, getActionForKeyStroke, getActionMap, getAlignmentX, getAlignmentY, getAncestorListeners, getAutoscrolls, getBaseline, getBorder, getBounds, getClientProperty, getComponentGraphics, getComponentPopupMenu, getConditionForKeyStroke, getDebugGraphicsOptions, getDefaultLocale, getFontMetrics, getGraphics, getHeight, getInheritsPopupMenu, getInputMap, getInputMap, getInputVerifier, getInsets, getInsets, getListeners, getLocation, getMaximumSize, getMinimumSize, getNextFocusableComponent, getPopupLocation, getPreferredSize, getRegisteredKeyStrokes, getSize, getToolTipLocation, getToolTipText, getToolTipText, getTopLevelAncestor, getTransferHandler, getUI, getVerifyInputWhenFocusTarget, getVetoableChangeListeners, getVisibleRect, getWidth, getX, getY, grabFocus, hide, isDoubleBuffered, isLightweightComponent, isManagingFocus, isOpaque, isOptimizedDrawingEnabled, isPaintingForPrint, isPaintingOrigin, isPaintingTile, isRequestFocusEnabled, isValidateRoot, paint, paintBorder, paintChildren, paintComponent, paintImmediately, paintImmediately, paramString, print, printAll, printBorder, printChildren, printComponent, processComponentKeyEvent, processKeyBinding, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removeNotify, removeVetoableChangeListener, repaint, repaint, requestDefaultFocus, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, resetKeyboardActions, reshape, revalidate, scrollRectToVisible, setActionMap, setAlignmentX, setAlignmentY, setAutoscrolls, setBackground, setBorder, setComponentPopupMenu, setDebugGraphicsOptions, setDefaultLocale, setDoubleBuffered, setEnabled, setFocusTraversalKeys, setFont, setForeground, setInheritsPopupMenu, setInputMap, setInputVerifier, setMaximumSize, setMinimumSize, setNextFocusableComponent, setOpaque, setPreferredSize, setRequestFocusEnabled, setToolTipText, setTransferHandler, setUI, setVerifyInputWhenFocusTarget, unregisterKeyboardAction, update, updateUIMethods inherited from class Container
add, add, add, add, add, addContainerListener, addPropertyChangeListener, addPropertyChangeListener, addSlotChild, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, fireHierarchyEvent, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getComponentZOrder, getContainerListeners, getFocusTraversalKeys, getFocusTraversalPolicy, getLayout, getMousePosition, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusCycleRoot, isFocusTraversalPolicyProvider, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paintComponents, peerContentElement, preferredSize, printComponents, processContainerEvent, processEvent, remove, removeAll, removeContainerListener, removeSlotChild, setComponentZOrder, setFocusCycleRoot, setFocusTraversalPolicy, setFocusTraversalPolicyProvider, transferFocusDownCycle, validate, validateTreeMethods inherited from class Component
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, applyBackgroundToPeer, applyVisibleToPeer, awtListeners, bounds, checkImage, checkImage, coalesceEvents, contains, createImage, createImage, createVolatileImage, createVolatileImage, defaultFillCssClass, disableEvents, dispatchEvent, enable, enableEvents, enableInputMethods, fireComponentEvent, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getBackground, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusCycleRootAncestor, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getForeground, getGraphicsConfiguration, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputContext, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocale, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMousePosition, getMouseWheelListeners, getName, getParent, getPeer, getPropertyChangeListeners, getPropertyChangeListeners, getToolkit, getTreeLock, gotFocus, handleEvent, hasFocus, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isEnabled, isFocusable, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isMaximumSizeSet, isMinimumSizeSet, isPreferredSizeSet, isThemeDefault, isValid, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, peerIs, postEvent, prepareImage, prepareImage, processComponentEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processKeyEvent, processMouseEvent, processMouseMotionEvent, processMouseWheelEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, resize, resize, setComponentOrientation, setCursor, setDropTarget, setFocusable, setFocusTraversalKeysEnabled, setIgnoreRepaint, setLocale, setMixingCutoutShape, setName, show, show, size, suppressMouseBridge, toString, transferFocus, transferFocusBackward, transferFocusUpCycle, withPeer, withPeerOnLiveUI
-
Field Details
-
CONTENT_PANE_PROPERTY
- See Also:
-
MENU_BAR_PROPERTY
- See Also:
-
TITLE_PROPERTY
- See Also:
-
LAYERED_PANE_PROPERTY
- See Also:
-
ROOT_PANE_PROPERTY
- See Also:
-
GLASS_PANE_PROPERTY
- See Also:
-
FRAME_ICON_PROPERTY
- See Also:
-
IS_SELECTED_PROPERTY
- See Also:
-
IS_CLOSED_PROPERTY
- See Also:
-
IS_MAXIMUM_PROPERTY
- See Also:
-
IS_ICON_PROPERTY
- See Also:
-
rootPane
-
rootPaneCheckingEnabled
protected boolean rootPaneCheckingEnabled -
isClosed
protected boolean isClosed -
isIcon
protected boolean isIcon -
isMaximum
protected boolean isMaximum -
isSelected
protected boolean isSelected -
resizable
protected boolean resizable -
closable
protected boolean closable -
maximizable
protected boolean maximizable -
iconable
protected boolean iconable -
desktopIcon
-
frameIcon
-
title
-
-
Constructor Details
-
JInternalFrame
public JInternalFrame() -
JInternalFrame
-
JInternalFrame
-
JInternalFrame
-
JInternalFrame
-
JInternalFrame
public JInternalFrame(String title, boolean resizable, boolean closable, boolean maximizable, boolean iconifiable)
-
-
Method Details
-
reconcileFields
public final void reconcileFields()D_field_write_reconcile repair hook — seeJSlider.reconcileFields().- Specified by:
reconcileFieldsin interfaceFieldReconciler.Reconcilable
-
frameInit
protected void frameInit()Mirror of JDKJInternalFrameconstruction: plant the emulator-side content pane withrootPaneCheckingEnabled=falsesosuper.addImplfalls through toContainer.addImpl, then flip checking on and wire the peer→emulator event relay. -
createContentPane
-
getContentPane
- Specified by:
getContentPanein interfaceRootPaneContainer
-
setContentPane
- Specified by:
setContentPanein interfaceRootPaneContainer
-
addImpl
-
setLayout
-
remove
-
setRootPaneCheckingEnabled
protected void setRootPaneCheckingEnabled(boolean enabled) Companion toisRootPaneCheckingEnabled(): every internal write to the flag goes through here, so a subclass override observes the suspend / restore that brackets a content-pane swap as it does on the desktop. -
isRootPaneCheckingEnabled
protected boolean isRootPaneCheckingEnabled()Whetheradd/remove/setLayoutredirect into the content pane. The redirect consults this method rather than the field, so a subclass override is honoured (R_no_vaadin_in_api second limb, D_r12_provenance). -
getRootPane
- Specified by:
getRootPanein interfaceRootPaneContainer- Overrides:
getRootPanein classJComponent
-
setRootPane
The JDK also re-parents the pane throughremove/addunder a suspended root-pane check; that half is R_layouts_close_enough layout and stays out. The"rootPane"fire is not (D_owed_events). -
createRootPane
A freshJRootPane, whichgetRootPane()hands to the surrogate. -
getLayeredPane
- Specified by:
getLayeredPanein interfaceRootPaneContainer
-
setLayeredPane
- Specified by:
setLayeredPanein interfaceRootPaneContainer
-
getGlassPane
- Specified by:
getGlassPanein interfaceRootPaneContainer
-
setGlassPane
- Specified by:
setGlassPanein interfaceRootPaneContainer
-
setVisible
public void setVisible(boolean b) A JInternalFrame's peer is a Dialog overlay, so visibility means open/close, not display toggling. Drive the peer'sSWindow.setVisible(boolean)(which attaches + opens the overlay and fires INTERNAL_FRAME_OPENED via the relay on first show) and track our own field, since JComponent'svisiblefield lives in another package and defaults to true.- Overrides:
setVisiblein classJComponent
-
isVisible
-
isShowing
public boolean isShowing()All three conjuncts are the JDK's, measured: a visible frame added nowhere, and a visible frame on a desktop that is in no window, both answer
falseon JDK 25.AWT's inherited body cannot serve, for two independent reasons. It reads
Component.visible, which is package-private tovaadinx.awt, so this class carriesframeVisibleinstead and the inherited body would read atruenobody wrote. And its parent walk has nothing to walk: per D_jdesktoppane_holder the frame escapes to its own overlay rather than becoming the desktop's child, so it is neverdisplayableand AWT's body would refuse everysetSelected(boolean). -
getDesktopPane
- Returns:
- the desktop this frame was added to, or
nullif none. The JDK finds it by walking parents and falls back to searching from thedesktop icon; neither works here (D_jdesktoppane_holder), so it is recorded on the way in instead.
-
setLocation
public void setLocation(int x, int y) - Overrides:
setLocationin classComponent
-
setLocation
- Overrides:
setLocationin classComponent
-
setSize
-
setSize
-
setBounds
-
setBounds
-
getLocation
- Overrides:
getLocationin classComponent
-
getSize
-
isClosed
public boolean isClosed() -
setClosed
Constrained property. Fires the vetoable"closed"change first (a veto aborts with no state change), then closes the frame by disposing the peer — which fires INTERNAL_FRAME_CLOSED via the relay.- Throws:
PropertyVetoException
-
isIcon
public boolean isIcon() -
setIcon
Iconify / deiconify. Fires"ancestor"first — which reads like a mistake and is not: the JDK'ssetIconopens withfirePropertyChange("ancestor", null, getParent()), its own comment explaining that a frame iconified before it has a parent needs one created so the icon can be placed on the desktop. Reproduced as written (D_owed_events).- Throws:
PropertyVetoException
-
isMaximum
public boolean isMaximum() -
setMaximum
Constrained property — maximize to viewport-fill (D_internalframe_maximize). Honors the vetoable change, then drives the peer geometry.- Throws:
PropertyVetoException
-
isSelected
public boolean isSelected() -
setSelected
Constrained property — selection. Honors the vetoable change, then drives the peer (which fires INTERNAL_FRAME_ACTIVATED / DEACTIVATED via the relay).The JDK's showing gate is reproduced, including its asymmetry: selecting a frame that is not showing is refused outright, while deselecting one goes through — so a frame selected on a desktop whose window is then hidden can still be deselected, and fires the whole chain doing it (measured on JDK 25). An iconified frame is gated on its
desktop iconshowing instead, which is the JDK's own arithmetic and not an approximation of it.The JDK's two
restoreSubcomponentFocus()calls are not reproduced, and the hook is deliberately absent rather than exposed-and-dead (R_no_vaadin_in_api limb 2 prefers absent): every target its body could focus — the content pane, the frame itself — peers on aDivor aDialog, neither of which is VaadinFocusable, so the effect is undeliverable one level down. That also costs the JDK's redundant-select branch, whose whole purpose is that focus restore.- Throws:
PropertyVetoException- if aVetoableChangeListenerrefuses the change
-
dispose
public void dispose()Close and release the frame; fires INTERNAL_FRAME_CLOSED via the relay. -
doDefaultCloseAction
public void doDefaultCloseAction()DISPOSE honors the vetoable"closed"change (matches JDK); HIDE hides and deselects; DO_NOTHING leaves the frame open.INTERNAL_FRAME_CLOSINGfires here, before the switch, and for every close operation includingDO_NOTHING_ON_CLOSE— which is where the JDK puts it, and why the peer relay no longer fires it. It used to live in the relay, so a migrator callingdoDefaultCloseAction()directly from a "Close" menu item got the close without the event (D_owed_events). -
getDefaultCloseOperation
public int getDefaultCloseOperation() -
setDefaultCloseOperation
public void setDefaultCloseOperation(int operation) JDKJInternalFrame.setDefaultCloseOperationstores the value without validation (unlike JFrame/JDialog) — we match that. EXIT is not meaningful here but isn't rejected, mirroring the JDK. -
getTitle
-
setTitle
-
isResizable
public boolean isResizable() -
setResizable
public void setResizable(boolean b) -
isClosable
public boolean isClosable() -
setClosable
public void setClosable(boolean b) -
isMaximizable
public boolean isMaximizable() -
setMaximizable
public void setMaximizable(boolean b) -
isIconifiable
public boolean isIconifiable() -
setIconifiable
public void setIconifiable(boolean b) -
getFrameIcon
-
setFrameIcon
-
getDesktopIcon
-
setDesktopIcon
-
addInternalFrameListener
-
removeInternalFrameListener
-
getInternalFrameListeners
-
fireInternalFrameEvent
protected void fireInternalFrameEvent(int id) Dispatch oneInternalFrameEventid to registered listeners (source = this). -
moveToFront
public void moveToFront()Select + best-effort front-raise (overlay order is Vaadin's, R_layouts_close_enough). -
moveToBack
public void moveToBack() -
toFront
public void toFront() -
toBack
public void toBack() -
getUIClassID
- Overrides:
getUIClassIDin classJComponent
-
getAccessibleContext
- Specified by:
getAccessibleContextin interfaceAccessible- Overrides:
getAccessibleContextin classComponent
-