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 StringUsed as a prefix when pulling data out of UIManager for i18nprotected JButtonok/close buttonprotected JButtoncopyToClipboard Buttonprotected ActionListenerAction listener for the copy to clipboard button.protected AbstractButtondetail buttonprotected ActionListenerAction listener for the detail button.protected JXEditorPanedetails text areaprotected JPaneldetails panelprotected JScrollPanedetails ScrollPaneprotected JEditorPaneError message text areaprotected PropertyChangeListenerProperty change listener for the error pane ensures that the pane's UI is reinitialized.protected JScrollPaneError message text scroll pane wrapper.protected JLabellabel used to display the warning/error iconprotected JXErrorPaneThe error pane this UI is forprotected AbstractButtonreport an error button -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionCalculates default prefered size for JXErrorPane on given platform/LAF.protected voidconfigureDetailsButton(boolean expanded) configure DetailsButtonprotected voidconfigureReportAction(AbstractActionExt reportAction) configure ReportActionprotected LayoutManagercreate DetailPanel Layoutprotected LayoutManagerCreate and return the LayoutManager to use with the error pane.static ComponentUIprotected Iconprotected Iconprotected StringgetDetailsAsHTML(ErrorInfo errorInfo) Creates and returns HTML representing the details of this incident info.protected intget 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 voidCreates and initializes the components which make up the aggregate combo box.protected voidInstalls the default colors, and default font into the Error Paneprotected voidCreate and install the listeners for the Error Pane.voidprotected voidreinit()Reconfigures the dialog if settings have changed, such as the errorInfo, errorIcon, warningIcon, etcprotected voidThe aggregate components which compise the combo box are unregistered and uninitialized.protected voidUninstalls the default colors, and default font into the Error Pane.protected voidRemove the installed listeners from the Error Pane.voidMethods 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:
installUIin classComponentUI
-
uninstallUI
- Overrides:
uninstallUIin 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:
getErrorFramein 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:
getErrorDialogin 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:
getErrorInternalFramein 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:ErrorPaneUICalculates default prefered size for JXErrorPane on given platform/LAF.- Specified by:
calculatePreferredSizein 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
-