Interface FrameView
- All Superinterfaces:
View
- All Known Subinterfaces:
SingleFrame
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 TypeMethodDescriptiondefault voidconfigureFrame(JFrame frame) Configures the frame, before it is packed and its saved state is restored.default @Nullable JMenuBarmenuBar()Returns the menu bar of the frame.default booleanReturns whether the saved bounds of the frame are restored.default @Nullable JToolBartoolBar()Returns the toolbar of the frame, placed atBorderLayout.NORTH.
-
Method Details
-
toolBar
Returns the toolbar of the frame, placed atBorderLayout.NORTH.- Returns:
- the toolbar, or
nullfor none
-
configureFrame
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:
falsefor a frame that must always open whereconfigureFrame(JFrame)puts it