com.sibvisions.rad.application
Class Message
java.lang.Object
javax.rad.genui.UIResource<C>
javax.rad.genui.UIComponent<C>
javax.rad.genui.UIContainer<C>
javax.rad.genui.container.AbstractWindow<C>
javax.rad.genui.container.AbstractFrame<IInternalFrame>
javax.rad.genui.container.UIInternalFrame
com.sibvisions.rad.application.Message
- All Implemented Interfaces:
- IContent, IMessageConstants, ITranslatable, IFrame, IInternalFrame, IToolBarPanel, IWindow, IComponent, IContainer, IResource, INamedObject
public class Message
- extends UIInternalFrame
- implements IContent, IMessageConstants
The Message
class is an UIInternalFrame
to
display messages on the screen. The message contains an icon,
the message and message dependent buttons.
Method Summary |
protected UIButton |
createButton(String pText,
String pAction)
Creates an action button for this message. |
void |
doCancel(UIActionEvent pEvent)
Closes the message when the Cancel/No button was clicked and redispatches
the event to the getOpener() , if an action is defined for the
Cancel/No button. |
void |
doClose(UIWindowEvent pEvent)
Closes the message when the x button in the title was clicked. |
void |
doOk(UIActionEvent pEvent)
Closes the message when the OK/Yes button was clicked and redispatches
the event to the getOpener() , if an action is defined for the
OK/Yes button. |
|
getOpener()
Gets the opener of the content. |
protected void |
init()
Initializes the UI components. |
void |
notifyDestroy()
Notifies the IContent, that it will be destroyed. |
void |
notifyVisible()
Notifies the IContent, that it is now positioned and showing. |
|
setOpener(OP pOpener)
Sets the opener of the content. |
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 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.container.IWindow |
centerRelativeTo, eventWindowActivated, eventWindowClosed, eventWindowClosing, eventWindowDeactivated, eventWindowDeiconified, eventWindowIconified, eventWindowOpened, isActive, isDisposed, pack |
Methods inherited from interface javax.rad.ui.IContainer |
add, add, add, add, getComponent, getComponentCount, getLayout, indexOf, remove, remove, removeAll, setLayout |
Message
public Message(UIDesktopPanel pDesktop,
int pIconType,
int pButtonType,
String pMessage,
String pOkAction,
String pCancelAction)
- Creates a new instance of
Message
.
- Parameters:
pDesktop
- the desktop for showing the framepIconType
- the message typepButtonType
- the type for the visible buttonspMessage
- the messagepOkAction
- the action to call when ok or yes was clickedpCancelAction
- the action to call when cancel or close was clicked
init
protected void init()
- Initializes the UI components.
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
createButton
protected UIButton createButton(String pText,
String pAction)
- Creates an action button for this message.
- Parameters:
pText
- the button textpAction
- the redispatch action
- Returns:
- the created button
doOk
public void doOk(UIActionEvent pEvent)
throws Throwable
- Closes the message when the OK/Yes button was clicked and redispatches
the event to the
getOpener()
, if an action is defined for the
OK/Yes button.
- Parameters:
pEvent
- the event from the button
- Throws:
Throwable
- if the an action is configured but the call throws an error
doCancel
public void doCancel(UIActionEvent pEvent)
throws Throwable
- Closes the message when the Cancel/No button was clicked and redispatches
the event to the
getOpener()
, if an action is defined for the
Cancel/No button.
- Parameters:
pEvent
- the event from the button
- Throws:
Throwable
- if the a cancel action is configured but the call throws an error
doClose
public void doClose(UIWindowEvent pEvent)
throws Throwable
- Closes the message when the x button in the title was clicked. If a cancel
action was defined, it will be called.
- Parameters:
pEvent
- the event from the frame
- Throws:
Throwable
- if the a cancel action is configured but the call throws an error
Copyright © 2009 SIB Visions GmbH. All Rights Reserved.