com.sibvisions.rad.application
Class Error

java.lang.Object
  extended by javax.rad.genui.UIResource<C>
      extended by javax.rad.genui.UIComponent<C>
          extended by javax.rad.genui.UIContainer<C>
              extended by javax.rad.genui.container.AbstractWindow<C>
                  extended by javax.rad.genui.container.AbstractFrame<IInternalFrame>
                      extended by javax.rad.genui.container.UIInternalFrame
                          extended by com.sibvisions.rad.application.Error
All Implemented Interfaces:
IContent, ITranslatable, IFrame, IInternalFrame, IToolBarPanel, IWindow, IComponent, IContainer, IResource, INamedObject

public class Error
extends UIInternalFrame
implements IContent

The Error is designed to visualize errors occured in an application. It displays the whole error chain.


Field Summary
 
Fields inherited from class javax.rad.genui.container.AbstractFrame
iconImage, menuBar
 
Fields inherited from class javax.rad.genui.UIContainer
components
 
Fields inherited from class javax.rad.genui.UIComponent
lLastTranslationModified, parent
 
Fields inherited from class javax.rad.genui.UIResource
uiResource
 
Fields inherited from interface javax.rad.ui.container.IFrame
ICONIFIED, MAXIMIZED_BOTH, MAXIMIZED_HORIZ, MAXIMIZED_VERT, NORMAL
 
Fields inherited from interface javax.rad.ui.container.IToolBarPanel
AREA_BOTTOM, AREA_LEFT, AREA_RIGHT, AREA_TOP
 
Constructor Summary
Error(IDesktopPanel pDesktop)
          Creates a new instance of Error for a special desktop.
 
Method Summary
 void addError(Throwable pError)
          Adds an error to the list of errors.
 void doDetails(UIActionEvent pEvent)
          Shows the details.
 void doOk(UIActionEvent pEvent)
          Closes the content.
 ErrorHandler eventHideDetails()
          Gets the "hide details" event handler.
 ErrorHandler eventShowDetails()
          Gets the "show details" event handler.
protected  UIToggleButton getDetailsButton()
          Gets the details button.
protected  UIGroupPanel getDetailsGroupPanel()
          Gets the details group panel.
 Throwable[] getErrors()
          Gets all available errors.
 String getMessage()
          Gets the error message.
protected  UIButton getOKButton()
          Gets the OK button.
<OP> OP
getOpener()
          Gets the opener of the content.
protected  UITextArea getTextArea()
          Gets the message text area.
 void notifyDestroy()
          Notifies the IContent, that it will be destroyed.
 void notifyVisible()
          Notifies the IContent, that it is now positioned and showing.
<OP> void
setOpener(OP pOpener)
          Sets the opener of the content.
protected  void updateAnchors()
          Updates the Layout anchors dependent of the visible details.
 
Methods inherited from class javax.rad.genui.container.UIInternalFrame
close, dispose, isClosable, isClosed, isIconifiable, isMaximizable, isModal, setClosable, setIconifiable, setMaximizable, setModal, toBack, toFront, topLevelAddNotify
 
Methods inherited from class javax.rad.genui.container.AbstractFrame
addNotify, addToolBar, addToolBar, beforeAddNotify, getIconImage, getMenuBar, getState, getTitle, getToolBar, getToolBarArea, getToolBarCount, indexOfToolBar, isResizable, isToolBarMovable, removeAllToolBars, removeNotify, removeToolBar, removeToolBar, setIconImage, setMenuBar, setResizable, setState, setTitle, setToolBarArea, setToolBarMovable, updateTranslation
 
Methods inherited from class javax.rad.genui.container.AbstractWindow
centerRelativeTo, eventWindowActivated, eventWindowClosed, eventWindowClosing, eventWindowDeactivated, eventWindowDeiconified, eventWindowIconified, eventWindowOpened, isActive, isDisposed, pack, setVisible
 
Methods inherited from class javax.rad.genui.UIContainer
add, add, add, add, checkAdd, getComponent, getComponentCount, getLayout, indexOf, remove, remove, removeAll, setLayout, setZOrder
 
Methods inherited from class javax.rad.genui.UIComponent
capture, createCellFormatter, createNodeFormatter, debug, error, eventComponentMoved, eventComponentResized, eventKeyPressed, eventKeyReleased, eventKeyTyped, eventMouseClicked, eventMouseEntered, eventMouseExited, eventMousePressed, eventMouseReleased, getBackground, getBounds, getComponentUIResource, getCurrentTranslation, getCursor, getEventSource, getFactory, getFont, getForeground, getLocation, getLocationRelativeTo, getMaximumSize, getMinimumSize, getName, getParent, getPreferredSize, getResource, getSize, getToolTipText, getTranslation, info, invokeAndWait, invokeAndWait, invokeInThread, invokeInThread, invokeLater, invokeLater, isBackgroundSet, isBeforeNotified, isCursorSet, isEnabled, isFocusable, isFontSet, isForegroundSet, isMaximumSizeSet, isMinimumSizeSet, isNotified, isPreferredSizeSet, isTranslationChanged, isTranslationEnabled, isVisible, requestFocus, setBackground, setBounds, setBounds, setCursor, setEnabled, setEventSource, setFocusable, setFont, setForeground, setLocation, setLocation, setLocationRelativeTo, setMaximumSize, setMaximumSize, setMinimumSize, setMinimumSize, setName, setParent, setPreferredSize, setPreferredSize, setSize, setSize, setToolTipText, setTranslation, setTranslationEnabled, translate
 
Methods inherited from class javax.rad.genui.UIResource
equals, getUIResource, hashCode, toString
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface javax.rad.ui.IComponent
capture, eventComponentMoved, eventComponentResized, eventKeyPressed, eventKeyReleased, eventKeyTyped, eventMouseClicked, eventMouseEntered, eventMouseExited, eventMousePressed, eventMouseReleased, getBackground, getBounds, getCursor, getEventSource, getFactory, getFont, getForeground, getLocation, getLocationRelativeTo, getMaximumSize, getMinimumSize, getName, getParent, getPreferredSize, getSize, getToolTipText, isBackgroundSet, isCursorSet, isEnabled, isFocusable, isFontSet, isForegroundSet, isMaximumSizeSet, isMinimumSizeSet, isPreferredSizeSet, isVisible, requestFocus, setBackground, setBounds, setCursor, setEnabled, setEventSource, setFocusable, setFont, setForeground, setLocation, setLocationRelativeTo, setMaximumSize, setMinimumSize, setName, setParent, setPreferredSize, setSize, setToolTipText, setVisible
 
Methods inherited from interface javax.rad.ui.IResource
getResource
 
Methods inherited from interface javax.rad.ui.container.IFrame
getIconImage, getMenuBar, getState, getTitle, isResizable, setIconImage, setMenuBar, setResizable, setState, setTitle
 
Methods inherited from interface javax.rad.ui.container.IWindow
centerRelativeTo, eventWindowActivated, eventWindowClosed, eventWindowClosing, eventWindowDeactivated, eventWindowDeiconified, eventWindowIconified, eventWindowOpened, isActive, isDisposed, pack
 
Methods inherited from interface javax.rad.ui.container.IToolBarPanel
addToolBar, addToolBar, getToolBar, getToolBarArea, getToolBarCount, indexOfToolBar, removeAllToolBars, removeToolBar, removeToolBar, setToolBarArea
 
Methods inherited from interface javax.rad.ui.IContainer
add, add, add, add, getComponent, getComponentCount, getLayout, indexOf, remove, remove, removeAll, setLayout
 

Constructor Detail

Error

public Error(IDesktopPanel pDesktop)
      throws Exception
Creates a new instance of Error for a special desktop.

Parameters:
pDesktop - the desktop for showing the frame
Throws:
Exception - if it's not possible to build the UI
Method Detail

notifyDestroy

public void notifyDestroy()
Notifies the IContent, that it will be destroyed.

Specified by:
notifyDestroy in interface IContent

notifyVisible

public void notifyVisible()
Notifies the IContent, that it is now positioned and showing.

Specified by:
notifyVisible in interface IContent

setOpener

public <OP> void setOpener(OP pOpener)
Sets the opener of the content.

Specified by:
setOpener in interface IContent
Type Parameters:
OP - the opener type
Parameters:
pOpener - the opener component or null if the component is unknown

getOpener

public <OP> OP getOpener()
Gets the opener of the content.

Specified by:
getOpener in interface IContent
Type Parameters:
OP - the opener type
Returns:
the opener component or null if the opener is unknown

addError

public void addError(Throwable pError)
Adds an error to the list of errors.

Parameters:
pError - the error

updateAnchors

protected void updateAnchors()
Updates the Layout anchors dependent of the visible details.


getTextArea

protected UITextArea getTextArea()
Gets the message text area.

Returns:
the text area

getOKButton

protected UIButton getOKButton()
Gets the OK button.

Returns:
the button

getDetailsButton

protected UIToggleButton getDetailsButton()
Gets the details button.

Returns:
the button

getDetailsGroupPanel

protected UIGroupPanel getDetailsGroupPanel()
Gets the details group panel.

Returns:
the group panel

getMessage

public String getMessage()
Gets the error message.

Returns:
the message

getErrors

public Throwable[] getErrors()
Gets all available errors.

Returns:
all reported errors

eventHideDetails

public ErrorHandler eventHideDetails()
Gets the "hide details" event handler.

Returns:
the event handler

eventShowDetails

public ErrorHandler eventShowDetails()
Gets the "show details" event handler.

Returns:
the event handler

doOk

public void doOk(UIActionEvent pEvent)
Closes the content.

Parameters:
pEvent - the triggering event

doDetails

public void doDetails(UIActionEvent pEvent)
Shows the details.

Parameters:
pEvent - the triggering event


Copyright © 2009 SIB Visions GmbH. All Rights Reserved.