be.ugent.caagt.swirl.dialogs

Class DialogPanel


public class DialogPanel
extends JPanel

Common super class of all panels that are meant to be used as central panels in a SimpleDialog. Extends javax.swing.JPanel with several createDialog methods which create simple dialogs with this panel as its central panel.

Clients will probably override the constructors to populate the dialog and the method getTitleResourceKey() to provide an internationalized dialog title

Internationalization: When the client does not override getTitleResourceKey, the dialog title uses the resource key dialog.title.

Constructor Summary

DialogPanel(LayoutManager a)
Create a dialog panel with the given layout manager.

Method Summary

SimpleDialog
createDialog(Component parent, ResourceBundle bundle, Icon icon, boolean modal)
Create a new dialog, centered on the given component, with this as its central panel, displaying the given icon.
SimpleDialog
createDialog(Component parent, ResourceBundle bundle, boolean modal)
Create a new dialog, centered on the given component, with this as its central panel.
SimpleDialog
createDialog(Component parent, String title, Icon icon, boolean modal)
Create a new dialog, centered on the given component, with this as its central panel, displaying the given icon.
SimpleDialog
createDialog(Component parent, String title, boolean modal)
Create a new dialog, centered on the given component, with this as its central panel.
String
getTitleResourceKey()
Return the resource key for the dialog title.

Constructor Details

DialogPanel

public DialogPanel(LayoutManager a)
Create a dialog panel with the given layout manager.

Method Details

createDialog

public SimpleDialog createDialog(Component parent,
                                 ResourceBundle bundle,
                                 Icon icon,
                                 boolean modal)
Create a new dialog, centered on the given component, with this as its central panel, displaying the given icon.

createDialog

public SimpleDialog createDialog(Component parent,
                                 ResourceBundle bundle,
                                 boolean modal)
Create a new dialog, centered on the given component, with this as its central panel.

createDialog

public SimpleDialog createDialog(Component parent,
                                 String title,
                                 Icon icon,
                                 boolean modal)
Create a new dialog, centered on the given component, with this as its central panel, displaying the given icon.

createDialog

public SimpleDialog createDialog(Component parent,
                                 String title,
                                 boolean modal)
Create a new dialog, centered on the given component, with this as its central panel.

getTitleResourceKey

public String getTitleResourceKey()
Return the resource key for the dialog title.