org.apache.batik.util.gui

Class LanguageDialog

public class LanguageDialog extends JDialog implements ActionMap

This class represents a language selection dialog.
Nested Class Summary
protected classLanguageDialog.CancelButtonAction
The action associated with the 'Cancel' button
protected classLanguageDialog.OKButtonAction
The action associated with the 'OK' button
static classLanguageDialog.Panel
The language selection panel.
Field Summary
protected static ResourceBundlebundle
The resource bundle
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 LanguageDialog.Panelpanel
The user languages panel.
protected static ResourceManagerresources
The resource manager
protected intreturnCode
The last return code.
protected static StringRESOURCES
The resource file name
Constructor Summary
LanguageDialog(JFrame f)
Creates a new LanguageDialog object.
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
StringgetLanguages()
Returns the user languages.
voidsetLanguages(String s)
Sets the user languages.
intshowDialog()
Shows the dialog.

Field Detail

bundle

protected static ResourceBundle bundle
The resource bundle

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.

panel

protected LanguageDialog.Panel panel
The user languages panel.

resources

protected static ResourceManager resources
The resource manager

returnCode

protected int returnCode
The last return code.

RESOURCES

protected static final String RESOURCES
The resource file name

Constructor Detail

LanguageDialog

public LanguageDialog(JFrame f)
Creates a new LanguageDialog object.

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 todo does it throw ?? seems to return null

getLanguages

public String getLanguages()
Returns the user languages.

setLanguages

public void setLanguages(String s)
Sets the user languages.

showDialog

public int showDialog()
Shows the dialog.

Returns: OK_CANCEL or CANCEL_OPTION.

Copyright B) 2007 Apache Software Foundation. All Rights Reserved.