public interface IDialog
JDialog
class.
The content pane of the dialog (JDialog.getContentPane()
) will be an IBorderPanel
.
The proper way to make an initialized and prepared IDialog
visible:
dialog.restoreDefaultSize(); dialog.asDialog().setVisible( true );
IGuiFactory.newDialog(Runnable)
,
IGuiFactory.newDialog(java.awt.Frame, Runnable)
,
IOverlayCard
Modifier and Type | Method and Description |
---|---|
IButton |
addCloseButton(java.lang.String text)
Adds a close button to the buttons panel (
getButtonsPanel() ) using the specified text. |
javax.swing.JDialog |
asDialog()
Casts this instance to
JDialog . |
void |
close()
Closes the dialog.
|
void |
enlargeDialog()
Enlarges the dialog, maximizes it with a small margin.
|
javax.swing.JPanel |
getButtonsPanel()
Returns the buttons panel.
|
IBorderPanel |
getCp()
Returns the custom border panel functioning as the content panel.
|
java.awt.Dimension |
getDefaultDefaultSize()
Returns the default value of the default dialog size.
|
java.awt.Dimension |
getDefaultSize()
Returns the default size of the dialog.
|
void |
restoreDefaultSize()
Restores the default size of the dialog.
|
void |
setDefaultSize(java.awt.Dimension defaultSize)
Sets the default size of the dialog.
|
void |
setFocusTargetOnFirstShow(javax.swing.JComponent focusTarget)
Sets the component to be focused on first show (when dialog is first activated).
|
javax.swing.JDialog asDialog()
JDialog
.this
as a JDialog
void setDefaultSize(java.awt.Dimension defaultSize)
defaultSize
- default size to be setjava.awt.Dimension getDefaultSize()
java.awt.Dimension getDefaultDefaultSize()
You can use this if you want to create a dialog with a default size being a little smaller than the normal size (by setting a default size being a little smaller than the returned default-default size).
IBorderPanel getCp()
void enlargeDialog()
void restoreDefaultSize()
void setFocusTargetOnFirstShow(javax.swing.JComponent focusTarget)
focusTarget
- focus target component on first show to be setIButton addCloseButton(java.lang.String text)
getButtonsPanel()
) using the specified text.text
- text of the close buttonjavax.swing.JPanel getButtonsPanel()
If this is the first call, the panel will be created, initialized and added to the south of the content pane.
void close()
IDialog
s must always be closed with this method instead of Window.dispose()
.
This API documentation is public and is intended for / allowed to be used by anyone.
Scelight home page: https://sites.google.com/site/scelight/
Scelight is a trademark of András Belicza. Copyright © András Belicza, 2013-2015. All rights reserved.