public class DialogBuilder extends java.lang.Object implements Disposable
DialogWrapper
.
There is no need to create a subclass (which is needed in the DialogWrapper), which can be nice for simple dialogs.Modifier and Type | Class and Description |
---|---|
static interface |
DialogBuilder.ActionDescriptor |
static class |
DialogBuilder.CancelActionDescriptor |
static class |
DialogBuilder.CloseDialogAction |
static class |
DialogBuilder.CustomActionDescriptor |
static interface |
DialogBuilder.CustomizableAction |
static class |
DialogBuilder.DialogActionDescriptor |
static class |
DialogBuilder.OkActionDescriptor |
Disposable.Parent
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
REQUEST_FOCUS_ENABLED |
Constructor and Description |
---|
DialogBuilder() |
DialogBuilder(java.awt.Component parent) |
DialogBuilder(Project project) |
Modifier and Type | Method and Description |
---|---|
void |
addAction(javax.swing.Action action) |
<T extends DialogBuilder.ActionDescriptor> |
addActionDescriptor(T actionDescriptor) |
DialogBuilder.CustomizableAction |
addCancelAction() |
DialogBuilder.CustomizableAction |
addCloseButton() |
void |
addDisposable(Disposable disposable) |
DialogBuilder.CustomizableAction |
addOkAction() |
DialogBuilder |
centerPanel(javax.swing.JComponent centerPanel) |
DialogBuilder |
dimensionKey(java.lang.String dimensionServiceKey) |
void |
dispose()
Usually not invoked directly, see class javadoc.
|
DialogBuilder.CustomizableAction |
getCancelAction() |
java.awt.Component |
getCenterPanel() |
DialogWrapper |
getDialogWrapper() |
DialogBuilder.CustomizableAction |
getOkAction() |
java.awt.Window |
getWindow() |
DialogBuilder |
okActionEnabled(boolean isEnabled) |
void |
removeAllActions() |
DialogBuilder |
resizable(boolean resizable) |
void |
setActionDescriptors(DialogBuilder.ActionDescriptor... descriptors) |
void |
setButtonsAlignment(int alignment) |
void |
setCancelOperation(java.lang.Runnable runnable) |
void |
setCenterPanel(javax.swing.JComponent centerPanel) |
void |
setDimensionServiceKey(java.lang.String dimensionServiceKey) |
void |
setErrorText(java.lang.String text) |
void |
setErrorText(java.lang.String text,
javax.swing.JComponent component) |
void |
setHelpId(java.lang.String helpId) |
DialogBuilder |
setNorthPanel(javax.swing.JComponent northPanel) |
void |
setOkActionEnabled(boolean isEnabled) |
void |
setOkOperation(java.lang.Runnable runnable) |
void |
setPreferredFocusComponent(javax.swing.JComponent component) |
void |
setTitle(java.lang.String title) |
int |
show() |
boolean |
showAndGet() |
void |
showModal(boolean modal) |
void |
showNotModal() |
DialogBuilder |
title(java.lang.String title) |
public static final java.lang.String REQUEST_FOCUS_ENABLED
public DialogBuilder(Project project)
public DialogBuilder(java.awt.Component parent)
public DialogBuilder()
public int show()
public boolean showAndGet()
public void showNotModal()
public void dispose()
Disposable
dispose
in interface Disposable
public void setCenterPanel(javax.swing.JComponent centerPanel)
public DialogBuilder centerPanel(javax.swing.JComponent centerPanel)
public DialogBuilder setNorthPanel(javax.swing.JComponent northPanel)
public void setTitle(java.lang.String title)
public DialogBuilder title(java.lang.String title)
public void setPreferredFocusComponent(javax.swing.JComponent component)
public void setDimensionServiceKey(java.lang.String dimensionServiceKey)
public DialogBuilder dimensionKey(java.lang.String dimensionServiceKey)
public void addAction(javax.swing.Action action)
public <T extends DialogBuilder.ActionDescriptor> T addActionDescriptor(T actionDescriptor)
public void setActionDescriptors(DialogBuilder.ActionDescriptor... descriptors)
public void removeAllActions()
public java.awt.Window getWindow()
public DialogBuilder.CustomizableAction addOkAction()
public DialogBuilder.CustomizableAction addCancelAction()
public DialogBuilder.CustomizableAction addCloseButton()
public void addDisposable(Disposable disposable)
public void setButtonsAlignment(int alignment)
public DialogWrapper getDialogWrapper()
public void showModal(boolean modal)
public void setHelpId(java.lang.String helpId)
public void setCancelOperation(java.lang.Runnable runnable)
public void setOkOperation(java.lang.Runnable runnable)
public void setOkActionEnabled(boolean isEnabled)
public DialogBuilder okActionEnabled(boolean isEnabled)
public DialogBuilder resizable(boolean resizable)
public DialogBuilder.CustomizableAction getOkAction()
public DialogBuilder.CustomizableAction getCancelAction()
public java.awt.Component getCenterPanel()
public void setErrorText(java.lang.String text)
public void setErrorText(java.lang.String text, javax.swing.JComponent component)