org.apache.batik.util.gui

Class UserStyleDialog

public class UserStyleDialog extends JDialog implements ActionMap

This class represents a dialog to select the user style sheet.
Nested Class Summary
protected classUserStyleDialog.CancelButtonAction
The action associated with the 'Cancel' button
protected classUserStyleDialog.OKButtonAction
The action associated with the 'OK' button
static classUserStyleDialog.Panel
This class represents the main panel of the dialog.
Field Summary
protected static ResourceBundlebundle
The resource bundle
protected StringchosenPath
The chosen path.
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 UserStyleDialog.Panelpanel
The main panel.
protected static ResourceManagerresources
The resource manager
protected intreturnCode
The last return code.
protected static StringRESOURCES
The resource file name
Constructor Summary
UserStyleDialog(JFrame f)
Creates a new user style dialog.
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
StringgetPath()
Returns the chosen path or null.
voidsetPath(String s)
Sets the current dialog path.
intshowDialog()
Shows the dialog.

Field Detail

bundle

protected static ResourceBundle bundle
The resource bundle

chosenPath

protected String chosenPath
The chosen path.

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 UserStyleDialog.Panel panel
The main 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

UserStyleDialog

public UserStyleDialog(JFrame f)
Creates a new user style dialog.

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

getPath

public String getPath()
Returns the chosen path or null.

setPath

public void setPath(String s)
Sets the current dialog path.

showDialog

public int showDialog()
Shows the dialog.

Returns: OK_OPTION or CANCEL_OPTION.

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