Package org.jdesktop.swingx.plaf.basic
Class BasicErrorPaneUI
java.lang.Object
javax.swing.plaf.ComponentUI
javax.swing.plaf.PanelUI
org.jdesktop.swingx.plaf.ErrorPaneUI
org.jdesktop.swingx.plaf.basic.BasicErrorPaneUI
- Direct Known Subclasses:
MacOSXErrorPaneUI
Base implementation of the
JXErrorPane
UI.- Author:
- rbair, rah003
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected static final String
Used as a prefix when pulling data out of UIManager for i18nprotected JButton
ok/close buttonprotected JButton
copyToClipboard Buttonprotected ActionListener
Action listener for the copy to clipboard button.protected AbstractButton
detail buttonprotected ActionListener
Action listener for the detail button.protected JXEditorPane
details text areaprotected JPanel
details panelprotected JScrollPane
details ScrollPaneprotected JEditorPane
Error message text areaprotected PropertyChangeListener
Property change listener for the error pane ensures that the pane's UI is reinitialized.protected JScrollPane
Error message text scroll pane wrapper.protected JLabel
label used to display the warning/error iconprotected JXErrorPane
The error pane this UI is forprotected AbstractButton
report an error button -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionCalculates default prefered size for JXErrorPane on given platform/LAF.protected void
configureDetailsButton
(boolean expanded) configure DetailsButtonprotected void
configureReportAction
(AbstractActionExt reportAction) configure ReportActionprotected LayoutManager
create DetailPanel Layoutprotected LayoutManager
Create and return the LayoutManager to use with the error pane.static ComponentUI
protected Icon
protected Icon
protected String
getDetailsAsHTML
(ErrorInfo errorInfo) Creates and returns HTML representing the details of this incident info.protected int
get Details HeightgetErrorDialog
(Component owner) Creates new ErrorPane wrapped in the dialog window centered at provided owner component.getErrorFrame
(Component owner) Creates new ErrorPane wrapped in the frame window centered at provided owner component.getErrorInternalFrame
(Component owner) Creates new ErrorPane wrapped in the internal frame window centered at provided owner component.protected void
Creates and initializes the components which make up the aggregate combo box.protected void
Installs the default colors, and default font into the Error Paneprotected void
Create and install the listeners for the Error Pane.void
protected void
reinit()
Reconfigures the dialog if settings have changed, such as the errorInfo, errorIcon, warningIcon, etcprotected void
The aggregate components which compise the combo box are unregistered and uninitialized.protected void
Uninstalls the default colors, and default font into the Error Pane.protected void
Remove the installed listeners from the Error Pane.void
Methods inherited from class javax.swing.plaf.ComponentUI
contains, getAccessibleChild, getAccessibleChildrenCount, getBaseline, getBaselineResizeBehavior, getMaximumSize, getMinimumSize, getPreferredSize, paint, update
-
Field Details
-
CLASS_NAME
Used as a prefix when pulling data out of UIManager for i18n- See Also:
-
pane
The error pane this UI is for -
errorMessage
Error message text area -
errorScrollPane
Error message text scroll pane wrapper. -
details
details text area -
detailButton
detail button -
closeButton
ok/close button -
iconLabel
label used to display the warning/error icon -
reportButton
report an error button -
detailsPanel
details panel -
detailsScrollPane
details ScrollPane -
copyToClipboardButton
copyToClipboard Button -
errorPaneListener
Property change listener for the error pane ensures that the pane's UI is reinitialized. -
detailListener
Action listener for the detail button. -
copyToClipboardListener
Action listener for the copy to clipboard button.
-
-
Constructor Details
-
BasicErrorPaneUI
public BasicErrorPaneUI()
-
-
Method Details
-
createUI
-
installUI
- Overrides:
installUI
in classComponentUI
-
uninstallUI
- Overrides:
uninstallUI
in classComponentUI
-
installDefaults
protected void installDefaults()Installs the default colors, and default font into the Error Pane -
uninstallDefaults
protected void uninstallDefaults()Uninstalls the default colors, and default font into the Error Pane. -
installListeners
protected void installListeners()Create and install the listeners for the Error Pane. This method is called when the UI is installed. -
uninstallListeners
protected void uninstallListeners()Remove the installed listeners from the Error Pane. The number and types of listeners removed and in this method should be the same that was added ininstallListeners
-
installComponents
protected void installComponents()Creates and initializes the components which make up the aggregate combo box. This method is called as part of the UI installation process. -
uninstallComponents
protected void uninstallComponents()The aggregate components which compise the combo box are unregistered and uninitialized. This method is called as part of the UI uninstallation process. -
getErrorFrame
Creates new ErrorPane wrapped in the frame window centered at provided owner component.implements abstract method to create ErrorPane in the frame window
- Specified by:
getErrorFrame
in classErrorPaneUI
- Parameters:
owner
- component to center created error frame at.- Returns:
- New ErrorPane instance wrapped in JFrame.
-
getErrorDialog
Creates new ErrorPane wrapped in the dialog window centered at provided owner component.implements abstract method to create ErrorPane in the dialog window
- Specified by:
getErrorDialog
in classErrorPaneUI
- Parameters:
owner
- component to center created error dialog at.- Returns:
- New ErrorPane instance wrapped in JDialog.
-
getErrorInternalFrame
Creates new ErrorPane wrapped in the internal frame window centered at provided owner component.implements abstract method to create ErrorPane
- Specified by:
getErrorInternalFrame
in classErrorPaneUI
- Parameters:
owner
- component to center created error frame at.- Returns:
- New ErrorPane instance wrapped in JInternalFrame.
-
createErrorPaneLayout
Create and return the LayoutManager to use with the error pane.- Returns:
- LayoutManager
-
createDetailPanelLayout
create DetailPanel Layout- Returns:
- LayoutManager
-
calculatePreferredSize
Description copied from class:ErrorPaneUI
Calculates default prefered size for JXErrorPane on given platform/LAF.- Specified by:
calculatePreferredSize
in classErrorPaneUI
- Returns:
- Preferred size.
-
getDetailsHeight
protected int getDetailsHeight()get Details Height- Returns:
- constant 300
-
configureReportAction
configure ReportAction- Parameters:
reportAction
- to configure
-
getDefaultErrorIcon
- Returns:
- the default error icon (red)
-
getDefaultWarningIcon
- Returns:
- the default warning icon (yellow)
-
configureDetailsButton
protected void configureDetailsButton(boolean expanded) configure DetailsButton- Parameters:
expanded
- to use details_expand_text
-
reinit
protected void reinit()Reconfigures the dialog if settings have changed, such as the errorInfo, errorIcon, warningIcon, etc -
getDetailsAsHTML
Creates and returns HTML representing the details of this incident info. This method is only called if the details needs to be generated: ie: the detailed error message property of the incident info is null.- Parameters:
errorInfo
- encapsulates all info to report a problem- Returns:
- HTML String
-