Class JXRootPane

All Implemented Interfaces:
ImageObserver, MenuContainer, Serializable, Accessible

@JavaBean public class JXRootPane extends JRootPane
Extends the JRootPane by supporting specific placements for a toolbar and a status bar. If a status bar exists, then toolbars, menus will be registered with the status bar.
Author:
Mark Davidson
See Also:
  • Field Details

    • statusBar

      protected JXStatusBar statusBar
      The current status bar for this root pane.
  • Constructor Details

    • JXRootPane

      public JXRootPane()
      Creates an extended root pane.
  • Method Details

    • createContentPane

      protected Container createContentPane()
      Overrides:
      createContentPane in class JRootPane
    • setLayout

      public void setLayout(LayoutManager layout)
      Overrides:
      setLayout in class Container
    • createRootLayout

      protected LayoutManager createRootLayout()
      Overrides:
      createRootLayout in class JRootPane
    • setStatusBar

      public void setStatusBar(JXStatusBar statusBar)
      Set the status bar for this root pane. Any components held by this root pane will be registered. If this is replacing an existing status bar then the existing component will be unregistered from the old status bar.
      Parameters:
      statusBar - the status bar to use
    • getStatusBar

      public JXStatusBar getStatusBar()
      Gets the currently installed status bar.
      Returns:
      the current status bar
    • setToolBar

      public void setToolBar(JToolBar toolBar)
      Set the toolbar bar for this root pane. If a tool bar is currently registered with this JXRootPane, then it is removed prior to setting the new tool bar. If an implementation needs to handle more than one tool bar, a subclass will need to override the singleton logic used here or manually add toolbars with getContentPane().add.
      Parameters:
      toolBar - the toolbar to register
    • getToolBar

      public JToolBar getToolBar()
      The currently installed tool bar.
      Returns:
      the current tool bar
    • setCancelButton

      public void setCancelButton(JButton cancelButton)
      Sets the cancelButton property, which determines the current default cancel button for this JRootPane. The cancel button is the button which will be activated when a UI-defined activation event (typically the ESC key) occurs in the root pane regardless of whether or not the button has keyboard focus (unless there is another component within the root pane which consumes the activation event, such as a JTextPane). For default activation to work, the button must be an enabled descendant of the root pane when activation occurs. To remove a cancel button from this root pane, set this property to null.
      Parameters:
      cancelButton - the JButton which is to be the cancel button
      See Also:
    • getCancelButton

      public JButton getCancelButton()
      Returns the value of the cancelButton property.
      Returns:
      the JButton which is currently the default cancel button
      See Also: