Class DialogFactory


  • public class DialogFactory
    extends java.lang.Object
    A factory class to create "textbutton" instances.
    • Constructor Summary

      Constructors 
      Constructor Description
      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, @NotNull GuiFactory guiFactory)
      Creates a new instance.
    • Constructor Detail

      • DialogFactory

        public DialogFactory​(@NotNull
                             @NotNull java.awt.Image frameNW,
                             @NotNull
                             @NotNull java.awt.Image frameN,
                             @NotNull
                             @NotNull java.awt.Image frameNE,
                             @NotNull
                             @NotNull java.awt.Image frameW,
                             @NotNull
                             @NotNull java.awt.Image frameC,
                             @NotNull
                             @NotNull java.awt.Image frameE,
                             @NotNull
                             @NotNull java.awt.Image frameSW,
                             @NotNull
                             @NotNull java.awt.Image frameS,
                             @NotNull
                             @NotNull java.awt.Image frameSE,
                             @NotNull
                             @NotNull java.awt.Font titleFont,
                             @NotNull
                             @NotNull java.awt.Color titleColor,
                             @NotNull
                             @NotNull java.awt.Color titleBackgroundColor,
                             float frameAlpha,
                             @NotNull
                             @NotNull GuiFactory guiFactory)
        Creates a new instance. The border images must have matching sizes.
        Parameters:
        frameNW - the north-west frame picture
        frameN - the north frame picture
        frameNE - the north-east frame picture
        frameW - the west frame picture
        frameC - the center frame picture
        frameE - the east frame picture
        frameSW - the south-west frame picture
        frameS - the south frame picture
        frameSE - the south-east frame picture
        titleFont - the font for the dialog title
        titleColor - the color for the dialog title
        titleBackgroundColor - the background color for the dialog title
        frameAlpha - the alpha value for the dialog background except for the title
        guiFactory - the global GUI factory instance
    • Method Detail

      • newDialog

        @NotNull
        public @NotNull java.lang.Iterable<AbstractGUIElement> newDialog​(@NotNull
                                                                         @NotNull TooltipManager tooltipManager,
                                                                         @NotNull
                                                                         @NotNull JXCWindowRenderer windowRenderer,
                                                                         @NotNull
                                                                         @NotNull GUIElementListener elementListener,
                                                                         @NotNull
                                                                         @NotNull java.lang.String title)
        Creates a new dialog.
        Parameters:
        tooltipManager - the tooltip manager to update
        windowRenderer - the window renderer the dialog belongs to
        elementListener - the element listener to notify
        title - the dialog's title, or an empty string for no title
        Returns:
        the newly created GUI elements
      • getFrameAlpha

        public float getFrameAlpha()
        Returns the alpha value for the frame background.
        Returns:
        alpha value, 1 is opaque and 0 totally transparent