public class DialogFactory
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
private float |
frameAlpha
The alpha transparency for the dialog background, 1 is opaque and 0 is
transparent.
|
private java.awt.Image |
frameC
The center frame picture.
|
private java.awt.Image |
frameE
The east frame picture.
|
private java.awt.Image |
frameN
The north frame picture.
|
private java.awt.Image |
frameNE
The north-east frame picture.
|
private java.awt.Image |
frameNW
The north-west frame picture.
|
private java.awt.Image |
frameS
The south frame picture.
|
private java.awt.Image |
frameSE
The south-east frame picture.
|
private java.awt.Image |
frameSW
The south-west frame picture.
|
private java.awt.Image |
frameW
The west frame picture.
|
private java.awt.Color |
titleBackgroundColor
The background color for the dialog title.
|
private java.awt.Color |
titleColor
The color for the dialog title.
|
private java.awt.Font |
titleFont
The font for the dialog title.
|
Constructor and Description |
---|
DialogFactory(java.awt.Image frameNW,
java.awt.Image frameN,
java.awt.Image frameNE,
java.awt.Image frameW,
java.awt.Image frameC,
java.awt.Image frameE,
java.awt.Image frameSW,
java.awt.Image frameS,
java.awt.Image frameSE,
java.awt.Font titleFont,
java.awt.Color titleColor,
java.awt.Color titleBackgroundColor,
float frameAlpha)
Creates a new instance.
|
Modifier and Type | Method and Description |
---|---|
float |
getFrameAlpha()
Returns the alpha value for the frame background.
|
java.lang.Iterable<AbstractGUIElement> |
newDialog(TooltipManager tooltipManager,
JXCWindowRenderer windowRenderer,
GUIElementListener elementListener,
java.lang.String title)
Creates a new dialog.
|
private final float frameAlpha
@NotNull private final java.awt.Image frameC
@NotNull private final java.awt.Image frameE
@NotNull private final java.awt.Image frameN
@NotNull private final java.awt.Image frameNE
@NotNull private final java.awt.Image frameNW
@NotNull private final java.awt.Image frameS
@NotNull private final java.awt.Image frameSE
@NotNull private final java.awt.Image frameSW
@NotNull private final java.awt.Image frameW
@Nullable private final java.awt.Color titleBackgroundColor
private final java.awt.Color titleColor
private final java.awt.Font titleFont
public DialogFactory(@NotNull java.awt.Image frameNW, @NotNull java.awt.Image frameN, @NotNull java.awt.Image frameNE, @NotNull java.awt.Image frameW, @NotNull java.awt.Image frameC, @NotNull java.awt.Image frameE, @NotNull java.awt.Image frameSW, @NotNull java.awt.Image frameS, @NotNull java.awt.Image frameSE, @NotNull java.awt.Font titleFont, @NotNull java.awt.Color titleColor, @NotNull java.awt.Color titleBackgroundColor, float frameAlpha)
frameNW
- the north-west frame pictureframeN
- the north frame pictureframeNE
- the north-east frame pictureframeW
- the west frame pictureframeC
- the center frame pictureframeE
- the east frame pictureframeSW
- the south-west frame pictureframeS
- the south frame pictureframeSE
- the south-east frame picturetitleFont
- the font for the dialog titletitleColor
- the color for the dialog titletitleBackgroundColor
- the background color for the dialog titleframeAlpha
- the alpha value for the dialog background except for
the titlepublic float getFrameAlpha()
@NotNull public java.lang.Iterable<AbstractGUIElement> newDialog(@NotNull TooltipManager tooltipManager, @NotNull JXCWindowRenderer windowRenderer, @NotNull GUIElementListener elementListener, @NotNull java.lang.String title)
tooltipManager
- the tooltip manager to updatewindowRenderer
- the window renderer the dialog belongs toelementListener
- the element listener to notifytitle
- the dialog's title, or an empty string for no title