- java.lang.Object
-
- util.ui.DontShowAgainOptionBox
-
public class DontShowAgainOptionBox extends java.lang.Object
This class offers an option box that shows a dialog with a checkbox to disable the dialog- Since:
- 3.0
-
-
Constructor Summary
Constructors Constructor Description DontShowAgainOptionBox()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static int
dontShowAgainMessageBox(Plugin plugin, java.lang.String optionBoxId, java.awt.Component parentComponent, java.lang.String message)
Shows a option box with a checkbox that enables the user to hide the dialog.static int
dontShowAgainMessageBox(Plugin plugin, java.lang.String optionBoxId, java.awt.Component parentComponent, java.lang.String message, java.lang.String title)
Shows a option box with a checkbox that enables the user to hide the dialog.static int
dontShowAgainMessageBox(Plugin plugin, java.lang.String optionBoxId, java.awt.Component parent, java.lang.String message, java.lang.String title, int messageType)
Shows an option box with a checkbox that enables the user to hide the dialog.static int
dontShowAgainMessageBox(Plugin plugin, java.lang.String optionBoxId, java.awt.Component parent, java.lang.String message, java.lang.String title, int messageType, int optionType, java.lang.Object[] options, java.lang.Object initialValue, java.lang.String dontShowAgainLabel)
Shows an option box with a checkbox that enables the user to hide the dialog.static boolean
isOptionBoxIdSet(Plugin plugin, java.lang.String optionBoxId)
static void
setOptionBoxId(Plugin plugin, java.lang.String optionBoxId, boolean value)
Set the value for the optionBoxId.
-
-
-
Method Detail
-
dontShowAgainMessageBox
public static int dontShowAgainMessageBox(Plugin plugin, java.lang.String optionBoxId, java.awt.Component parent, java.lang.String message, java.lang.String title, int messageType, int optionType, java.lang.Object[] options, java.lang.Object initialValue, java.lang.String dontShowAgainLabel)
Shows an option box with a checkbox that enables the user to hide the dialog. If the user sets the checkbox, this function will never show the dialog again. You can simply call this method and don't have to deal with the fact if the dialog has to be shown or not- Parameters:
plugin
- Plugin that wants to show a option boxoptionBoxId
- the unique id for the option boxparent
- parent frame for the option boxmessage
- message for the boxtitle
- title for the boxmessageType
- MessageType, values are {#javax.swing.JOptionPane.ERROR_MESSAGE}, {#javax.swing.JOptionPane.INFORMATION_MESSAGE}, {#javax.swing.JOptionPane.WARNING_MESSAGE}optionType
- The option type of the option dialog, values areJOptionPane.YES_OPTION
,JOptionPane.YES_NO_OPTION
,JOptionPane.YES_NO_CANCEL_OPTION
,JOptionPane.OK_OPTION
,JOptionPane.OK_CANCEL_OPTION
,JOptionPane.DEFAULT_OPTION
.options
- The options to show on the option buttons.initialValue
- The option initially selected.dontShowAgainLabel
- The label for the check box or,null
for the default label.- Returns:
- The result of the option dialog, possible values are
JOptionPane.YES_OPTION
,JOptionPane.YES_NO_OPTION
,JOptionPane.YES_NO_CANCEL_OPTION
,JOptionPane.OK_OPTION
,JOptionPane.OK_CANCEL_OPTION
,JOptionPane.DEFAULT_OPTION
. - Since:
- 3.0
-
dontShowAgainMessageBox
public static int dontShowAgainMessageBox(Plugin plugin, java.lang.String optionBoxId, java.awt.Component parent, java.lang.String message, java.lang.String title, int messageType)
Shows an option box with a checkbox that enables the user to hide the dialog. If the user sets the checkbox, this function will never show the dialog again. You can simply call this method and don't have to deal with the fact if the dialog has to be shown or not- Parameters:
plugin
- Plugin that wants to show a option boxoptionBoxId
- the unique id for the option boxparent
- parent frame for the option boxmessage
- message for the boxtitle
- title for the boxmessageType
- MessageType, values are {#javax.swing.JOptionPane.ERROR_MESSAGE}, {#javax.swing.JOptionPane.INFORMATION_MESSAGE}, {#javax.swing.JOptionPane.WARNING_MESSAGE}- Returns:
- The result of the option dialog, possible values are
JOptionPane.YES_OPTION
,JOptionPane.YES_NO_OPTION
,JOptionPane.YES_NO_CANCEL_OPTION
,JOptionPane.OK_OPTION
,JOptionPane.OK_CANCEL_OPTION
,JOptionPane.DEFAULT_OPTION
. - Since:
- 3.0
-
dontShowAgainMessageBox
public static int dontShowAgainMessageBox(Plugin plugin, java.lang.String optionBoxId, java.awt.Component parentComponent, java.lang.String message, java.lang.String title)
Shows a option box with a checkbox that enables the user to hide the dialog. If the user sets the checkbox, this function will never show the dialog again. You can simply call this method and don't have to deal with the fact if the dialog has to be shown or not- Parameters:
plugin
- Plugin that wants to show a option boxoptionBoxId
- the unique id for the option boxparentComponent
- parent frame for the option boxmessage
- message for the boxtitle
- title for the box- Returns:
- The result of the option dialog, possible values are
JOptionPane.YES_OPTION
,JOptionPane.YES_NO_OPTION
,JOptionPane.YES_NO_CANCEL_OPTION
,JOptionPane.OK_OPTION
,JOptionPane.OK_CANCEL_OPTION
,JOptionPane.DEFAULT_OPTION
. - Since:
- 2.7
-
dontShowAgainMessageBox
public static int dontShowAgainMessageBox(Plugin plugin, java.lang.String optionBoxId, java.awt.Component parentComponent, java.lang.String message)
Shows a option box with a checkbox that enables the user to hide the dialog. If the user sets the checkbox, this function will never show the dialog again. You can simply call this method and don't have to deal with the fact if the dialog has to be shown or not- Parameters:
plugin
- Plugin that wants to show a option boxoptionBoxId
- the unique id for the option boxparentComponent
- parent frame for the option boxmessage
- message for the box- Returns:
- The result of the option dialog, possible values are
JOptionPane.YES_OPTION
,JOptionPane.YES_NO_OPTION
,JOptionPane.YES_NO_CANCEL_OPTION
,JOptionPane.OK_OPTION
,JOptionPane.OK_CANCEL_OPTION
,JOptionPane.DEFAULT_OPTION
. - Since:
- 3.0
-
isOptionBoxIdSet
public static boolean isOptionBoxIdSet(Plugin plugin, java.lang.String optionBoxId)
- Parameters:
plugin
- plugin that uses the option boxoptionBoxId
- check this optionBoxId- Returns:
- true, if the optionBoxId is set and no dialog will be shown if {#dontShowAgainOptionBox} is called
- Since:
- 3.0
-
setOptionBoxId
public static void setOptionBoxId(Plugin plugin, java.lang.String optionBoxId, boolean value)
Set the value for the optionBoxId. This manipulates if a dialog will be shown if {#dontShowAgainOptionBox} is called- Parameters:
plugin
- plugin that uses the option boxoptionBoxId
- check this optionBoxIdvalue
- new value,true
to disable the dialog,false
, to enable the dialog- Since:
- 3.0
-
-