org.apache.batik.util.gui

Class CSSMediaPanel.Dialog

public static class CSSMediaPanel.Dialog extends JDialog implements ActionMap

A dialog to edit/add/remove CSS media.
Nested Class Summary
protected classCSSMediaPanel.Dialog.CancelButtonAction
The action associated with the 'Cancel' button
protected classCSSMediaPanel.Dialog.OKButtonAction
The action associated with the 'OK' button
Field Summary
static intCANCEL_OPTION
The return value if 'Cancel' is chosen.
protected Maplisteners
The map that contains the listeners
static intOK_OPTION
The return value if 'OK' is chosen.
protected intreturnCode
The return code.
Constructor Summary
Dialog()
Constructs a new Dialog to edit/add/remove CSS media.
Dialog(Component parent, String title, List mediaList)
Constructs a new Dialog to edit/add/remove CSS media.
Dialog(Component parent, String title, String media)
Constructs a new Dialog to edit/add/remove CSS media.
Method Summary
protected JPanelcreateButtonsPanel()
Creates the OK/Cancel buttons panel
ActiongetAction(String key)
Returns the action associated with the given string or null on error
intgetReturnCode()
Returns the code that describes how the dialog has been closed (OK or CANCEL).

Field Detail

CANCEL_OPTION

public static final int CANCEL_OPTION
The return value if 'Cancel' is chosen.

listeners

protected Map listeners
The map that contains the listeners

OK_OPTION

public static final int OK_OPTION
The return value if 'OK' is chosen.

returnCode

protected int returnCode
The return code.

Constructor Detail

Dialog

public Dialog()
Constructs a new Dialog to edit/add/remove CSS media.

Dialog

public Dialog(Component parent, String title, List mediaList)
Constructs a new Dialog to edit/add/remove CSS media.

Parameters: parent the parent of this dialog title the title of this dialog mediaList the media list

Dialog

public Dialog(Component parent, String title, String media)
Constructs a new Dialog to edit/add/remove CSS media.

Parameters: parent the parent of this dialog title the title of this dialog media the media list

Method Detail

createButtonsPanel

protected JPanel createButtonsPanel()
Creates the OK/Cancel buttons panel

getAction

public Action getAction(String key)
Returns the action associated with the given string or null on error

Parameters: key the key mapped with the action to get

Throws: MissingListenerException if the action is not found

getReturnCode

public int getReturnCode()
Returns the code that describes how the dialog has been closed (OK or CANCEL).
Copyright B) 2007 Apache Software Foundation. All Rights Reserved.