| Constructor and Description |
|---|
Dialogs.DialogOptions(Dialogs.DialogAction[] buttons,
String title) |
Dialogs.DialogOptions(Dialogs.DialogAction[] buttons,
String title,
Component owner) |
Dialogs.DialogOptions(Dialogs.DialogAction[] buttons,
String title,
Component owner,
Dialogs.DialogIcon dialogIcon) |
Dialogs.DialogOptions(Dialogs.DialogOptions source)
contstructs a new DialogOptions based on the given source.
WARNING: this is a shallow copy, rather than a deep copy |
Dialogs.DialogOptions(Dialogs.DialogOptions source,
Dialogs.DialogAction okAction,
Dialogs.DialogAction cancelAction)
contstructs a new DialogOptions based on the given source.
WARNING: this is a shallow copy, rather than a deep copy |
Dialogs.DialogOptions(String[] buttons,
String title) |
Dialogs.DialogOptions(String[] buttons,
String title,
Component owner) |
Dialogs.DialogOptions(String[] buttons,
String title,
Component owner,
Dialogs.DialogIcon dialogIcon) |
| Modifier and Type | Method and Description |
|---|---|
Object |
getCancelButton()
Get the button which is treated as a cancel button.
|
Icon |
getCustomIcon()
Get the custom icon to use or null if none set
|
Object |
getDefaultButton()
Get the button which is the dialogs default button.
|
Dimension |
getMaxDimensions()
Get the maximum dimensions that the dialog will pack to.
|
String |
getTitle()
Get the desired title for the dialog
|
boolean |
isModal()
Get whether the dialog should be modal.
|
void |
setAdvancedOptionsInitiallyVisible(boolean advancedOptionsInitiallyVisible)
Set whether the advanced options panel or message is visible initially if a 'More Options Dialog' is shown with
these options.
|
void |
setAllowAsOwnerOfOtherDialogs(boolean allowAsOwnerOfOtherDialogs)
Normally a dialog will not be used as the owner of other dialogs (unless explicitly
specified as the owner).
|
void |
setCancelButton(Dialogs.DialogAction cancelButton)
Set the button which is treated as a cancel button.
|
void |
setCancelButton(String cancelButton)
Set the button which is treated as a cancel button.
|
void |
setCloseAction(Dialogs.DialogAction closeAction)
Sets the action associated with clicking the windows's close button (the X in the top-right hand corner of the window in Windows).
|
void |
setCustomIcon(Icon customIcon)
Set a custom icon to use instead of the standard JOptionPane ones.
|
void |
setDefaultButton(Dialogs.DialogAction defaultButton)
Set the button which is the dialogs default button.
|
void |
setDefaultButton(String defaultButton)
Set the button which is the dialogs default button.
|
void |
setMaxHeight(int maxHeight)
Set the maximum height that the dialog will pack itself to.
|
void |
setMaxWidth(int maxWidth)
Set the maximum width that the dialog will pack itself to.
|
void |
setModal(boolean modal)
Set whether the dialog should be modal.
|
void |
setMoreOptionsButtonText(String moreOptionsText,
String lessOptionsText)
If any of the
showMoreOptionsDialog methods
are used to show a dialog with these options then the specified text will be used on the More/Fewer Options button. |
public Dialogs.DialogOptions(Dialogs.DialogOptions source)
source - the DialogOptions to copypublic Dialogs.DialogOptions(Dialogs.DialogOptions source, Dialogs.DialogAction okAction, Dialogs.DialogAction cancelAction)
source - the DialogOptions to copyokAction - will be performed after the defaultAction is activatedcancelAction - will be performed after the cancel action is activatedpublic Dialogs.DialogOptions(String[] buttons, String title)
buttons - Labels of the buttons in the dialog. The first is used as the default button (pressed if user
pushes Enter) and is the right most button on MacOS or left most button on Windows. If there is more than one
button then the last is treated as a Cancel button which is the left most button on MacOS or right most button on Windows.
If the user closes the dialog or pushes Escape this is treated as if the Cancel button has been pressed. Never nulltitle - Title of the dialogpublic Dialogs.DialogOptions(Dialogs.DialogAction[] buttons, String title)
buttons - Actions for the buttons in the dialog. The first is used as the default button (pressed if user
pushes Enter) and is the right most button on MacOS or left most button on Windows. If there is more than one
button then the last is treated as a Cancel button which is the left most button on MacOS or right most button on Windows.
If the user closes the dialog or pushes Escape this is treated as if the Cancel button has been pressed. Never nulltitle - Title of the dialogpublic Dialogs.DialogOptions(String[] buttons, String title, Component owner)
buttons - Labels of the buttons in the dialog. The first is used as the default button (pressed if user
pushes Enter) and is the right most button on MacOS or left most button on Windows. If there is more than one
button then the last is treated as a Cancel button which is the left most button on MacOS or right most button on Windows.
If the user closes the dialog or pushes Escape this is treated as if the Cancel button has been pressed. Never nulltitle - Title of the dialogowner - Any component within the Window which will be the owner of this dialog. If null, the currently
focused document frame (or JDialog with getClientProperty(ALLOW_AS_PARENT) != null) is used as the owner.public Dialogs.DialogOptions(Dialogs.DialogAction[] buttons, String title, Component owner)
buttons - Actions for the buttons in the dialog. The first is used as the default button (pressed if user
pushes Enter) and is the right most button on MacOS or left most button on Windows. If there is more than one
button then the last is treated as a Cancel button which is the left most button on MacOS or right most button on Windows.
If the user closes the dialog or pushes Escape this is treated as if the Cancel button has been pressed. Never nulltitle - Title of the dialogowner - Any component within the Window which will be the owner of this dialog. If null, the currently
focused document frame (or JDialog with getClientProperty(ALLOW_AS_PARENT) != null) is used as the owner.public Dialogs.DialogOptions(String[] buttons, String title, Component owner, Dialogs.DialogIcon dialogIcon)
buttons - Labels of the buttons in the dialog. The first is used as the default button (pressed if user
pushes Enter) and is the right most button on MacOS or left most button on Windows. If there is more than one
button then the last is treated as a Cancel button which is the left most button on MacOS or right most button on Windows.
If the user closes the dialog or pushes Escape this is treated as if the Cancel button has been pressed. Never nulltitle - Title of the dialogowner - Any component within the Window which will be the owner of this dialog. If null, the currently
focused document frame (or JDialog with getClientProperty(ALLOW_AS_PARENT) != null) is used as the owner.dialogIcon - The icon to display on the left of the dialog, eg. Dialogs.DialogIcon.WARNING, never nullpublic Dialogs.DialogOptions(Dialogs.DialogAction[] buttons, String title, Component owner, Dialogs.DialogIcon dialogIcon)
buttons - Actions for the buttons in the dialog. The first is used as the default button (pressed if user
pushes Enter) and is the right most button on MacOS or left most button on Windows. If there is more than one
button then the last is treated as a Cancel button which is the left most button on MacOS or right most button on Windows.
If the user closes the dialog or pushes Escape this is treated as if the Cancel button has been pressed. Never nulltitle - Title of the dialogowner - Any component within the Window which will be the owner of this dialog. If null, the currently
focused document frame (or JDialog with getClientProperty(ALLOW_AS_PARENT) != null) is used as the owner.dialogIcon - The icon to display on the left of the dialog, eg. Dialogs.DialogIcon.WARNING, never nullpublic void setMoreOptionsButtonText(String moreOptionsText, String lessOptionsText)
showMoreOptionsDialog methods
are used to show a dialog with these options then the specified text will be used on the More/Fewer Options button.moreOptionsText - the text used instead of "More Options"lessOptionsText - the text used instead of "Fewer Options"Dialogs.showMoreOptionsDialog( com.biomatters.geneious.publicapi.components.Dialogs.DialogOptions , String, String),
Dialogs.showMoreOptionsDialog( com.biomatters.geneious.publicapi.components.Dialogs.DialogOptions , java.awt.Component, java.awt.Component)public Dimension getMaxDimensions()
public String getTitle()
public void setMaxWidth(int maxWidth)
maxWidth - maximum width for the dialogpublic void setMaxHeight(int maxHeight)
maxHeight - maximum height for the dialogpublic Object getCancelButton()
Dialogs.DialogAction
depending on what was used to specify the buttons for these options. If this dialog has only a single button, this method will return that button, even if
it is an OK button!public void setCancelButton(String cancelButton)
cancelButton - the button which is treated as a cancel button.setCancelButton( com.biomatters.geneious.publicapi.components.Dialogs.DialogAction )public void setCloseAction(Dialogs.DialogAction closeAction)
closeAction - the action (usually Dialogs.CANCEL) or null for the close action to be the same as the cancel button.public void setCancelButton(Dialogs.DialogAction cancelButton)
cancelButton - the button which is treated as a cancel button.setCancelButton(String)public Object getDefaultButton()
Dialogs.DialogAction
depending on what was used to specify the buttons for these options.public void setDefaultButton(String defaultButton)
defaultButton - the button which is the dialogs default button.setDefaultButton( com.biomatters.geneious.publicapi.components.Dialogs.DialogAction )public void setDefaultButton(Dialogs.DialogAction defaultButton)
defaultButton - the button which is the dialogs default button.setDefaultButton(String)public boolean isModal()
public void setModal(boolean modal)
DialogActions to
receive events from the buttons in this case.modal - true if the dialog should be modalpublic Icon getCustomIcon()
public void setCustomIcon(Icon customIcon)
customIcon - the custom icon to usepublic void setAdvancedOptionsInitiallyVisible(boolean advancedOptionsInitiallyVisible)
advancedOptionsInitiallyVisible - whether the advanced options panel or message is visible initiallyDialogs.showMoreOptionsDialog( com.biomatters.geneious.publicapi.components.Dialogs.DialogOptions , String, String),
Dialogs.showMoreOptionsDialog( com.biomatters.geneious.publicapi.components.Dialogs.DialogOptions , Component, Component)public void setAllowAsOwnerOfOtherDialogs(boolean allowAsOwnerOfOtherDialogs)
Dialogs.showOptionsDialog(com.biomatters.geneious.publicapi.plugin.Options, String, boolean)
and Dialogs.showOptionsDialog(com.biomatters.geneious.publicapi.plugin.Options, String, boolean, javax.swing.JComponent)allowAsOwnerOfOtherDialogs - true to allow this dialog to be the owner of other dialogs, false otherwise.