Class JWindow

All Implemented Interfaces:
ImageObserver, MenuContainer, Serializable, Accessible, RootPaneContainer

public class JWindow extends Window implements Accessible, RootPaneContainer
Emulator for JWindow. R_leaf_peer_lockdown-locked peer is SJWindow.
See Also:
  • Field Details

    • rootPane

      protected JRootPane rootPane
    • rootPaneCheckingEnabled

      protected boolean rootPaneCheckingEnabled
  • Constructor Details

  • Method Details

    • windowInit

      protected void windowInit()
      Mirror of JDK JWindow.windowInit: take the default locale, build the root pane through createRootPane() and plant it via setRootPane(JRootPane), then turn root-pane checking on — each as a call, so a subclass override of any hook actually runs (R_no_vaadin_in_api limb 2).

      Three lines where JFrame.frameInit / JDialog.dialogInit have five: JWindow.windowInit calls neither enableEvents nor setBackground (JWindow.java:260). Reproduced rather than regularised — a migrator's setBackground override must *not* fire from a JWindow constructor.

    • getContentPane

      public Container getContentPane()
      Delegates to the root pane, as the JDK's does.
      Specified by:
      getContentPane in interface RootPaneContainer
    • setContentPane

      public void setContentPane(Container newPane)
      Delegates to the root pane, as the JDK's does — so window.getContentPane() and window.getRootPane().getContentPane() are the same pane by construction rather than by a mirror kept in step.
      Specified by:
      setContentPane in interface RootPaneContainer
    • addImpl

      protected void addImpl(Component comp, Object constraints, int index)
      Overrides:
      addImpl in class Container
    • setLayout

      public void setLayout(LayoutManager manager)
      Description copied from class: Window
      Stores the manager and invalidates as AWT does, minus the CSS dispatch — see Window.windowLayout.
      Overrides:
      setLayout in class Window
      Parameters:
      manager - may be null, as AWT allows
    • remove

      public void remove(Component comp)
      Overrides:
      remove in class Container
    • setRootPaneCheckingEnabled

      protected void setRootPaneCheckingEnabled(boolean enabled)
    • isRootPaneCheckingEnabled

      protected boolean isRootPaneCheckingEnabled()
      Whether add / remove / setLayout redirect 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

      public JRootPane getRootPane()
      Specified by:
      getRootPane in interface RootPaneContainer
    • setRootPane

      protected void setRootPane(JRootPane newRootPane)
      The JDK's body: remove the outgoing root pane, then add the incoming one, with root-pane checking cleared so addImpl(Component, Object, int)'s redirect falls through instead of routing the new root pane into the old one's content pane.
    • createRootPane

      protected JRootPane createRootPane()
      A fresh JRootPane, which setRootPane(JRootPane) hands to the surrogate.
    • getLayeredPane

      public JLayeredPane getLayeredPane()
      Specified by:
      getLayeredPane in interface RootPaneContainer
    • setLayeredPane

      public void setLayeredPane(JLayeredPane layered)
      Specified by:
      setLayeredPane in interface RootPaneContainer
    • getGlassPane

      public Component getGlassPane()
      Specified by:
      getGlassPane in interface RootPaneContainer
    • setGlassPane

      public void setGlassPane(Component glass)
      Specified by:
      setGlassPane in interface RootPaneContainer
    • update

      public void update(Graphics g)
      Overrides:
      update in class Container
    • paramString

      protected String paramString()
      Overrides:
      paramString in class Container
    • getAccessibleContext

      public AccessibleContext getAccessibleContext()
      Specified by:
      getAccessibleContext in interface Accessible
      Overrides:
      getAccessibleContext in class Window
    • setTransferHandler

      public void setTransferHandler(TransferHandler h)
    • getTransferHandler

      public TransferHandler getTransferHandler()