org.apache.batik.apps.svgbrowser

Class NodePickerPanel.NameEditorDialog

public static class NodePickerPanel.NameEditorDialog extends JDialog implements ActionMap

Dialog for choosing element name.
Nested Class Summary
protected classNodePickerPanel.NameEditorDialog.CancelButtonAction
The action associated with the 'Cancel' button of Attribute Adder Dialog
protected classNodePickerPanel.NameEditorDialog.OKButtonAction
The action associated with the 'OK' button of Attribute Adder Dialog
Field Summary
protected static ResourceBundlebundle
The resource bundle.
protected ButtonFactorybuttonFactory
The Button factory.
protected JButtoncancelButton
The Cancel button.
static intCANCEL_OPTION
The return value if 'Cancel' is chosen.
protected Maplisteners
The map that contains the listeners
protected JPanelmainPanel
The Dialog main panel.
protected JTextFieldnodeNameField
The node name field.
protected JLabelnodeNameLabel
The node name label.
protected JButtonokButton
The OK button.
static intOK_OPTION
The return value if 'OK' is chosen.
protected static ResourceManagerresources
The resource manager.
protected intreturnCode
The Dialog results.
protected static StringRESOURCES
The resource file name.
Constructor Summary
NameEditorDialog(Frame frame)
Constructor.
Method Summary
protected voidaddButtonActions()
Adds button actions.
ActiongetAction(String key)
Returns the action associated with the given string or null on error
protected ButtonFactorygetButtonFactory()
Gets buttonFactory.
protected JButtongetCancelButton()
Gets the Cancel button.
protected JPanelgetMainPanel()
Gets dialog's main panel.
protected JTextFieldgetNodeNameField()
Gets the text field for node name.
JLabelgetNodeNameLabel()
Gets the node name label.
protected JButtongetOkButton()
Gets the Ok button.
StringgetResults()
Gets the dialog results.
protected voidinitialize()
Initializes the dialog.
intshowDialog()
Shows the dialog.

Field Detail

bundle

protected static ResourceBundle bundle
The resource bundle.

buttonFactory

protected ButtonFactory buttonFactory
The Button factory.

cancelButton

protected JButton cancelButton
The Cancel button.

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

mainPanel

protected JPanel mainPanel
The Dialog main panel.

nodeNameField

protected JTextField nodeNameField
The node name field.

nodeNameLabel

protected JLabel nodeNameLabel
The node name label.

okButton

protected JButton okButton
The OK button.

OK_OPTION

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

resources

protected static ResourceManager resources
The resource manager.

returnCode

protected int returnCode
The Dialog results.

RESOURCES

protected static final String RESOURCES
The resource file name.

Constructor Detail

NameEditorDialog

public NameEditorDialog(Frame frame)
Constructor.

Parameters: frame Parent frame

Method Detail

addButtonActions

protected void addButtonActions()
Adds button actions.

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

getButtonFactory

protected ButtonFactory getButtonFactory()
Gets buttonFactory.

getCancelButton

protected JButton getCancelButton()
Gets the Cancel button.

Returns: the cancelButton

getMainPanel

protected JPanel getMainPanel()
Gets dialog's main panel.

Returns: the mainPanel

getNodeNameField

protected JTextField getNodeNameField()
Gets the text field for node name.

Returns: the nodeNameField

getNodeNameLabel

public JLabel getNodeNameLabel()
Gets the node name label.

Returns: the nodeNameLabel

getOkButton

protected JButton getOkButton()
Gets the Ok button.

Returns: the okButton

getResults

public String getResults()
Gets the dialog results.

Returns: the element name

initialize

protected void initialize()
Initializes the dialog.

showDialog

public int showDialog()
Shows the dialog.

Returns: OK_OPTION or CANCEL_OPTION.

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