Interface FrameView

All Superinterfaces:
View
All Known Subinterfaces:
SingleFrame

public interface FrameView extends View
A view shown in a frame of its own, with the frame's menu bar and toolbar: the application class of a single-frame application, or a view that Frames opens.

The framework sets the frame's title from the view class's title resource, else the displayed name, and its icon image from the application's icon, before the view is built, so that a title the view sets in View.content() wins. It then applies the view's component resources, puts its content, menu bar and toolbar in the frame, calls configureFrame(JFrame), places the frame and shows it.

  • Method Summary

    Modifier and Type
    Method
    Description
    default void
    Configures the frame, before it is packed and its saved state is restored.
    default @Nullable JMenuBar
    Returns the menu bar of the frame.
    default boolean
    Returns whether the saved bounds of the frame are restored.
    default @Nullable JToolBar
    Returns the toolbar of the frame, placed at BorderLayout.NORTH.

    Methods inherited from interface View

    content
  • Method Details

    • toolBar

      default @Nullable JToolBar toolBar()
      Returns the toolbar of the frame, placed at BorderLayout.NORTH.
      Returns:
      the toolbar, or null for none
    • configureFrame

      default void configureFrame(JFrame frame)
      Configures the frame, before it is packed and its saved state is restored.
      Parameters:
      frame - the frame
    • restoreBounds

      default boolean restoreBounds()
      Returns whether the saved bounds of the frame are restored.
      Returns:
      false for a frame that must always open where configureFrame(JFrame) puts it