Class DialogFactory
- java.lang.Object
-
- com.realtime.crossfire.jxclient.skin.factory.DialogFactory
-
public class DialogFactory extends java.lang.ObjectA 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.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description floatgetFrameAlpha()Returns the alpha value for the frame background.@NotNull java.lang.Iterable<AbstractGUIElement>newDialog(@NotNull TooltipManager tooltipManager, @NotNull JXCWindowRenderer windowRenderer, @NotNull GUIElementListener elementListener, @NotNull java.lang.String title)Creates a new dialog.
-
-
-
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 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 titleguiFactory- 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 updatewindowRenderer- the window renderer the dialog belongs toelementListener- the element listener to notifytitle- 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
-
-