org.apache.batik.util.gui

Class JErrorPane

public class JErrorPane extends JPanel implements ActionMap

This class represents a dialog to display an error (message + Exception).
Nested Class Summary
protected classJErrorPane.OKButtonAction
The action associated with the 'OK' button.
protected classJErrorPane.ShowDetailButtonAction
The action associated with the 'Show Detail' button.
Field Summary
protected ButtonFactorybf
The button factory.
protected static ResourceBundlebundle
The resource bundle
protected JComponentdetailsArea
The text area used to show the stack trace.
protected booleanisDetailShown
This flag bit indicates whether or not the stack trace is shown.
protected Maplisteners
The map that contains the listeners
protected Stringmsg
The error message.
protected static ResourceManagerresources
The resource manager
protected static StringRESOURCES
The resource file name
protected JButtonshowDetailButton
The button used to show or not the details.
protected Stringstacktrace
The stack trace.
protected JPanelsubpanel
The sub panel that contains the stack trace text area.
Constructor Summary
JErrorPane(Throwable th, int type)
Constructs a new JErrorPane.
Method Summary
protected JPanelcreateButtonsPanel()
JDialogcreateDialog(Component owner, String title)
ActiongetAction(String key)
Returns the action associated with the given string or null on error

Field Detail

bf

protected ButtonFactory bf
The button factory.

bundle

protected static ResourceBundle bundle
The resource bundle

detailsArea

protected JComponent detailsArea
The text area used to show the stack trace.

isDetailShown

protected boolean isDetailShown
This flag bit indicates whether or not the stack trace is shown.

listeners

protected Map listeners
The map that contains the listeners

msg

protected String msg
The error message.

resources

protected static ResourceManager resources
The resource manager

RESOURCES

protected static final String RESOURCES
The resource file name

showDetailButton

protected JButton showDetailButton
The button used to show or not the details.

stacktrace

protected String stacktrace
The stack trace.

subpanel

protected JPanel subpanel
The sub panel that contains the stack trace text area.

Constructor Detail

JErrorPane

public JErrorPane(Throwable th, int type)
Constructs a new JErrorPane.

Parameters: th the throwable object that describes the errror type the dialog type

Method Detail

createButtonsPanel

protected JPanel createButtonsPanel()

createDialog

public JDialog createDialog(Component owner, String title)

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

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