- Enclosing class:
- Windows
public static interface Windows.FrameBuilder
A builder for a JFrame.
-
Method Summary
Modifier and TypeMethodDescriptionbuild()centerFrame(boolean centerFrame) This is overridden bylocation(Point)or by setting thelocationRelativeTo(Component)component.defaultCloseOperation(int defaultCloseOperation) DefaultWindowConstants.DISPOSE_ON_CLOSE.extendedState(int extendedState) OverrideslocationRelativeTo(Component)andcenterFrame(boolean).locationRelativeTo(Component locationRelativeTo) onClosed(Consumer<WindowEvent> onClosed) onClosing(Consumer<WindowEvent> onClosing) onOpened(Consumer<WindowEvent> onOpened) resizable(boolean resizable) show()Builds and shows a JFrame based on this builderwindowListener(WindowListener windowListener)
-
Method Details
-
title
- Parameters:
title- the title- Returns:
- this builder instance
-
title
- Parameters:
title- a value observer for a dynamic dialog title- Returns:
- this builder instance
-
icon
- Parameters:
icon- the icon- Returns:
- this builder instance
-
size
- Parameters:
size- the size- Returns:
- this builder instance
-
resizable
- Parameters:
resizable- true if the frame should be resizable- Returns:
- this builder instance
-
location
OverrideslocationRelativeTo(Component)andcenterFrame(boolean).- Parameters:
location- the frame location- Returns:
- this builder instance
-
locationRelativeTo
- Parameters:
locationRelativeTo- the component to which the location should be relative- Returns:
- this builder instance
-
onOpened
- Parameters:
onOpened- called when the frame has been opened- Returns:
- this builder instance
-
onClosed
- Parameters:
onClosed- called when the frame has been closed- Returns:
- this builder instance
-
onClosing
- Parameters:
onClosing- called when the frame is about to be closed- Returns:
- this builder instance
-
defaultCloseOperation
DefaultWindowConstants.DISPOSE_ON_CLOSE.- Parameters:
defaultCloseOperation- the default frame close operation- Returns:
- this builder instance
-
extendedState
- Parameters:
extendedState- the extends state- Returns:
- this builder instance
- See Also:
-
centerFrame
This is overridden bylocation(Point)or by setting thelocationRelativeTo(Component)component.- Parameters:
centerFrame- true if the frame should be centered in on the screen- Returns:
- this builder instance
-
windowListener
- Parameters:
windowListener- a window listener- Returns:
- this builder instance
-
build
JFrame build()- Returns:
- a JFrame based on this builder
-
show
JFrame show()Builds and shows a JFrame based on this builder- Returns:
- a JFrame based on this builder
-