public class MonologFX
extends java.lang.Object
Modifier and Type | Class and Description |
---|---|
static class |
MonologFX.ButtonAlignment |
static class |
MonologFX.Type
Type of dialog box is one of the following, each with a distinct icon:
<p>
ACCEPT = check mark icon
<p>
ERROR = red 'X' icon
<p>
INFO = blue 'i' (information) icon
<p>
QUESTION = blue question mark icon
<p>
If no type is specified in the constructor, the default is INFO.
|
Constructor and Description |
---|
MonologFX()
Default constructor for a MonologFX dialog box.
|
MonologFX(MonologFX.Type t)
Constructor for a MonologFX dialog box that accepts one of the enumerated
types listed above.
|
Modifier and Type | Method and Description |
---|---|
void |
addButton(MonologFXButton btnToAdd)
Public method used to add a button to a MonologFX dialog.
|
void |
addStylesheet(java.lang.String stylesheet)
Allows developer to add stylesheet for MonologFX dialog, supplementing or
overriding existing styling.
|
void |
setButtonAlignment(MonologFX.ButtonAlignment buttonAlignment)
Sets the button alignment for the MonologFX dialog box.
|
void |
setDisplayTime(int displayTime)
Sets the display time for the MonologFX dialog box.
|
void |
setMessage(java.lang.String msg)
Sets the text displayed within the MonologFX dialog box.
|
void |
setModal(boolean isModal)
Sets the modality of the MonologFX dialog box.
|
void |
setPos(double x,
double y)
Sets the coordinates of the MonologFX dialog.
|
void |
setTitleText(java.lang.String title)
Sets the text displayed in the title bar of the MonologFX dialog box.
|
void |
setType(MonologFX.Type typeToSet)
Sets the Type of MonologFX dialog box to display.
|
void |
setX(double x)
Sets the x coordinate of the MonologFX dialog.
|
void |
setY(double y)
Sets the y coordinate of the MonologFX dialog.
|
MonologFXButton.Type |
show()
Displays the MonologFX dialog box and waits for user input.
|
MonologFXButton.Type |
showDialog()
Deprecated.
Please use show() instead.
|
public MonologFX()
Default constructor for a MonologFX dialog box. Creates an INFO box.
MonologFX.Type
public MonologFX(MonologFX.Type t)
Constructor for a MonologFX dialog box that accepts one of the enumerated types listed above.
t
- The type of MonologFX dialog box to create.MonologFX.Type
public void addButton(MonologFXButton btnToAdd)
Public method used to add a button to a MonologFX dialog.
btnToAdd
- A MonologFXButton object.MonologFXButton
public void addStylesheet(java.lang.String stylesheet)
Allows developer to add stylesheet for MonologFX dialog, supplementing or overriding existing styling.
stylesheet
- String variable containing the path/name of the
stylesheet to apply to the dialog’s scene and contained controls.public void setButtonAlignment(MonologFX.ButtonAlignment buttonAlignment)
Sets the button alignment for the MonologFX dialog box. Default is CENTER.
buttonAlignment
- Valid values are LEFT, RIGHT, and CENTER.MonologFX.ButtonAlignment
public void setDisplayTime(int displayTime)
Sets the display time for the MonologFX dialog box. Default is 10 seconds.
displayTime
- Valid values are any integer value.public void setMessage(java.lang.String msg)
Sets the text displayed within the MonologFX dialog box. Word wrap ensures that all text is displayed.
msg
- String variable containing the text to display.public void setModal(boolean isModal)
Sets the modality of the MonologFX dialog box.
isModal
- Boolean. A true value = APPLICATION_MODAL, false = NONE.public void setTitleText(java.lang.String title)
Sets the text displayed in the title bar of the MonologFX dialog box.
title
- String containing the text to place in the title bar.public void setType(MonologFX.Type typeToSet)
Sets the Type of MonologFX dialog box to display.
typeToSet
- One of the supported types of dialogs.MonologFX.Type
public void setPos(double x, double y)
Sets the coordinates of the MonologFX dialog.
x
- The x coordinate of the upper-left corner of the dialog.y
- The y coordinate of the upper-left corner of the dialog.public void setX(double x)
Sets the x coordinate of the MonologFX dialog.
x
- The x coordinate of the upper-left corner of the dialog.public void setY(double y)
Sets the y coordinate of the MonologFX dialog.
y
- The y coordinate of the upper-left corner of the dialog.public MonologFXButton.Type showDialog()
Displays the MonologFX dialog box and waits for user input.
MonologFXButton.Type
,
show()
public MonologFXButton.Type show()
Displays the MonologFX dialog box and waits for user input.
MonologFXButton.Type