Class JRibbonFrame

java.lang.Object
java.awt.Component
java.awt.Container
java.awt.Window
java.awt.Frame
javax.swing.JFrame
org.pushingpixels.radiance.component.api.ribbon.JRibbonFrame
All Implemented Interfaces:
ImageObserver, MenuContainer, Serializable, Accessible, RootPaneContainer, WindowConstants

public class JRibbonFrame extends JFrame

Ribbon frame. Provides the same functionality as a regular JFrame, but with a JRibbon component in the top location.

This is the only officially supported way to use the JRibbon container. While JRibbon() constructor is public, it is provided only for the applications that are absolutely prevented from using JRibbonFrame class.

The implementation enforces that a JRibbon component is always at the BorderLayout.NORTH location, throwing IllegalArgumentException on attempts to set a custom layout manager, add another component at BorderLayout.NORTH, remove the JRibbon component, set a custom menu bar, content pane or any other operation that interferes with the intended hierarchy of this frame.

Author:
Kirill Grouchnikov
See Also:
  • Constructor Details

    • JRibbonFrame

      public JRibbonFrame() throws HeadlessException
      Creates a new ribbon frame with no title.
      Throws:
      HeadlessException - If GraphicsEnvironment.isHeadless() returns true.
    • JRibbonFrame

      public JRibbonFrame(GraphicsConfiguration gc)
      Creates a new ribbon frame with no title.
      Parameters:
      gc - Graphics configuration to use.
    • JRibbonFrame

      public JRibbonFrame(String title) throws HeadlessException
      Creates a new ribbon frame with the specified title.
      Parameters:
      title - Ribbon frame title.
      Throws:
      HeadlessException - If GraphicsEnvironment.isHeadless() returns true.
    • JRibbonFrame

      public JRibbonFrame(String title, GraphicsConfiguration gc)
      Creates a new ribbon frame with the specified title.
      Parameters:
      title - Ribbon frame title.
      gc - Graphics configuration to use.
      Throws:
      HeadlessException - If GraphicsEnvironment.isHeadless() returns true.
  • Method Details