org.apache.batik.util.gui

Class CSSMediaPanel.AddMediumDialog

public static class CSSMediaPanel.AddMediumDialog extends JDialog implements ActionMap

A dialog to add a new CSS medium.
Nested Class Summary
protected classCSSMediaPanel.AddMediumDialog.CancelButtonAction
The action associated with the 'Cancel' button
protected classCSSMediaPanel.AddMediumDialog.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
protected JComboBoxmedium
The new medium.
static intOK_OPTION
The return value if 'OK' is chosen.
protected intreturnCode
The return code.
Constructor Summary
AddMediumDialog(Component parent)
Constructs a new AddMediumDialog.
Method Summary
protected ComponentcreateButtonsPanel()
Returns the button panel.
protected ComponentcreateContentPanel()
Returns the panel to enter a new CSS medium.
ActiongetAction(String key)
Returns the action associated with the given string or null on error
StringgetMedium()
Returns the medium that might be added or null if any.
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

medium

protected JComboBox medium
The new medium.

OK_OPTION

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

returnCode

protected int returnCode
The return code.

Constructor Detail

AddMediumDialog

public AddMediumDialog(Component parent)
Constructs a new AddMediumDialog.

Parameters: parent the parent of this dialog

Method Detail

createButtonsPanel

protected Component createButtonsPanel()
Returns the button panel.

createContentPanel

protected Component createContentPanel()
Returns the panel to enter a new CSS medium.

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

getMedium

public String getMedium()
Returns the medium that might be added or null if any.

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.