Package org.apache.pivot.wtk
Class Alert
- java.lang.Object
-
- All Implemented Interfaces:
java.lang.Iterable<Component>
,Sequence<Component>
,ConstrainedVisual
,Visual
@DefaultProperty("body") public class Alert extends Dialog
Class representing an "alert", a dialog commonly used to facilitate simple user interaction.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description class
Alert.OptionSequence
Option sequence implementation.-
Nested classes/interfaces inherited from class org.apache.pivot.wtk.Window
Window.ActionMapping, Window.ActionMappingSequence, Window.IconImageSequence, Window.Skin
-
Nested classes/interfaces inherited from class org.apache.pivot.wtk.Container
Container.EDTChecker
-
Nested classes/interfaces inherited from class org.apache.pivot.wtk.Component
Component.DecoratorSequence, Component.StyleDictionary, Component.UserDataDictionary
-
Nested classes/interfaces inherited from interface org.apache.pivot.collections.Sequence
Sequence.Tree<T>
-
-
Constructor Summary
Constructors Constructor Description Alert()
Alert(java.lang.String message)
Alert(MessageType messageType, java.lang.String message, Sequence<?> options)
Alert(MessageType messageType, java.lang.String message, Sequence<?> options, boolean modal)
Alert(MessageType messageType, java.lang.String message, Sequence<?> options, Component body)
Alert(MessageType messageType, java.lang.String message, Sequence<?> options, Component body, boolean modal)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static void
alert(java.lang.String message, Window owner)
static void
alert(java.lang.String message, Window owner, int width)
An alert with a type ofMessageType.INFO
.static void
alert(MessageType messageType, java.lang.String message, java.lang.String title, Component body, Window owner, int width, DialogCloseListener dialogCloseListener)
static void
alert(MessageType messageType, java.lang.String message, java.lang.String title, Component body, Window owner, DialogCloseListener dialogCloseListener)
static void
alert(MessageType messageType, java.lang.String message, java.lang.String title, Window owner)
static void
alert(MessageType messageType, java.lang.String message, Component body, Window owner)
static void
alert(MessageType messageType, java.lang.String message, Component body, Window owner, int width)
static void
alert(MessageType messageType, java.lang.String message, Component body, Window owner, DialogCloseListener dialogCloseListener)
static void
alert(MessageType messageType, java.lang.String message, Window owner)
static void
alert(MessageType messageType, java.lang.String message, Window owner, DialogCloseListener dialogCloseListener)
static void
error(java.lang.String message, Window owner)
static void
error(java.lang.String message, Window owner, int width)
An alert with a type ofMessageType.ERROR
.ListenerList<AlertListener>
getAlertListeners()
Component
getBody()
java.lang.String
getMessage()
MessageType
getMessageType()
Alert.OptionSequence
getOptions()
java.lang.Object
getSelectedOption()
int
getSelectedOptionIndex()
void
setBody(Component body)
void
setMessage(java.lang.String message)
void
setMessageType(MessageType messageType)
void
setOptions(java.lang.String options)
void
setOptions(Sequence<?> options)
void
setSelectedOption(java.lang.Object selectedOption)
void
setSelectedOptionIndex(int selectedOption)
-
Methods inherited from class org.apache.pivot.wtk.Dialog
close, close, getDialogCloseListener, getDialogListeners, getDialogStateListeners, getResult, isClosing, isModal, open, open, open, open, setModal
-
Methods inherited from class org.apache.pivot.wtk.Frame
descendantGainedFocus, descendantLostFocus, getFrameListeners, getMenuBar, moveToFront, remove, setMenuBar
-
Methods inherited from class org.apache.pivot.wtk.Window
align, align, clearActive, clearFocusDescendant, descendantRemoved, getActionMappings, getActiveWindow, getClientArea, getContent, getFocusDescendant, getIcons, getOwnedWindow, getOwnedWindowCount, getOwner, getRootOwner, getTitle, getWindowActionMappingListeners, getWindowClassListeners, getWindowListeners, getWindowStateListeners, isActive, isBottomMost, isClosed, isMaximized, isOpen, isOpening, isOwner, isTopMost, keyPressed, moveToBack, open, open, requestActive, setActive, setContent, setEnabled, setIcon, setIcon, setMaximized, setParent, setTitle, setVisible
-
Methods inherited from class org.apache.pivot.wtk.Container
add, assertEventDispatchThread, assertEventDispatchThread, clear, containsFocus, descendantAdded, get, getComponentAt, getContainerListeners, getContainerMouseListeners, getDescendantAt, getFocusTraversalPolicy, getGraphics, getLength, getNamedComponent, indexOf, insert, invalidate, isAncestor, isDoubleBuffered, iterator, layout, load, mouseClick, mouseDown, mouseMove, mouseOut, mouseUp, mouseWheel, move, paint, remove, removeAll, repaint, requestFocus, setDoubleBuffered, setEventDispatchThreadChecker, setFocusTraversalPolicy, store, transferFocus, update
-
Methods inherited from class org.apache.pivot.wtk.Component
checkSkin, clearFocus, contains, copyStyle, copyStyle, getAncestor, getAncestor, getAttribute, getAutomationID, getBaseline, getBaseline, getBounds, getComponentClassListeners, getComponentDataListeners, getComponentDecoratorListeners, getComponentKeyListeners, getComponentListeners, getComponentMouseButtonListeners, getComponentMouseListeners, getComponentMouseWheelListeners, getComponentStateListeners, getComponentStyleListeners, getComponentTooltipListeners, getCursor, getDecoratedBounds, getDecorators, getDisplay, getDragSource, getDropTarget, getFocusedComponent, getHeight, getHeightLimits, getLocation, getMaximumHeight, getMaximumWidth, getMenuHandler, getMinimumHeight, getMinimumWidth, getMouseLocation, getName, getNamedStyles, getParent, getPreferredHeight, getPreferredHeight, getPreferredSize, getPreferredWidth, getPreferredWidth, getScreenBounds, getSize, getSkin, getStyle, getStyle, getStyleBoolean, getStyleBoolean, getStyleColor, getStyleColor, getStyleFont, getStyleFont, getStyleInt, getStyleInt, getStyles, getTextInputMethodListener, getTooltipDelay, getTooltipText, getTooltipWrapText, getTypedStyles, getUserData, getVisibleArea, getVisibleArea, getVisibleArea, getWidth, getWidthLimits, getWindow, getX, getY, indexBoundsCheck, installSkin, isBlocked, isEnabled, isFocusable, isFocused, isMouseOver, isOpaque, isPreferredHeightSet, isPreferredSizeSet, isPreferredWidthSet, isShowing, isValid, isVisible, keyReleased, keyTyped, mapPointFromAncestor, mapPointFromAncestor, mapPointToAncestor, mapPointToAncestor, mouseOver, offsetToScreen, putStyle, putStyle, reenterMouse, repaint, repaint, repaint, repaint, repaint, scrollAreaToVisible, scrollAreaToVisible, setAttribute, setAutomationID, setAutomationID, setCursor, setDragSource, setDropTarget, setFocused, setHeight, setHeightLimits, setHeightLimits, setLocation, setLocation, setMaximumHeight, setMaximumWidth, setMenuHandler, setMinimumHeight, setMinimumWidth, setName, setPreferredHeight, setPreferredSize, setPreferredSize, setPreferredWidth, setSize, setSize, setSkin, setStyleName, setStyleNames, setStyleNames, setStyles, setStyles, setTooltipDelay, setTooltipText, setTooltipWrapText, setWidth, setWidthLimits, setWidthLimits, setX, setY, toString, transferFocus, validate
-
-
-
-
Constructor Detail
-
Alert
public Alert()
-
Alert
public Alert(java.lang.String message)
-
Alert
public Alert(MessageType messageType, java.lang.String message, Sequence<?> options)
-
Alert
public Alert(MessageType messageType, java.lang.String message, Sequence<?> options, boolean modal)
-
Alert
public Alert(MessageType messageType, java.lang.String message, Sequence<?> options, Component body)
-
Alert
public Alert(MessageType messageType, java.lang.String message, Sequence<?> options, Component body, boolean modal)
-
-
Method Detail
-
getMessageType
public MessageType getMessageType()
-
setMessageType
public void setMessageType(MessageType messageType)
-
getMessage
public java.lang.String getMessage()
-
setMessage
public void setMessage(java.lang.String message)
-
getBody
public Component getBody()
-
setBody
public void setBody(Component body)
-
getOptions
public Alert.OptionSequence getOptions()
-
setOptions
public void setOptions(Sequence<?> options)
-
setOptions
public void setOptions(java.lang.String options)
-
getSelectedOptionIndex
public int getSelectedOptionIndex()
-
setSelectedOptionIndex
public void setSelectedOptionIndex(int selectedOption)
-
getSelectedOption
public java.lang.Object getSelectedOption()
-
setSelectedOption
public void setSelectedOption(java.lang.Object selectedOption)
-
getAlertListeners
public ListenerList<AlertListener> getAlertListeners()
-
alert
public static void alert(java.lang.String message, Window owner)
-
alert
public static void alert(java.lang.String message, Window owner, int width)
An alert with a type ofMessageType.INFO
.- Parameters:
message
- The main message of this alert.owner
- The owner window.width
- The preferred width of the alert.
-
error
public static void error(java.lang.String message, Window owner)
-
error
public static void error(java.lang.String message, Window owner, int width)
An alert with a type ofMessageType.ERROR
.- Parameters:
message
- The main message of this error.owner
- The owner window.width
- The preferred width of the alert.
-
alert
public static void alert(MessageType messageType, java.lang.String message, Window owner)
-
alert
public static void alert(MessageType messageType, java.lang.String message, java.lang.String title, Window owner)
-
alert
public static void alert(MessageType messageType, java.lang.String message, Window owner, DialogCloseListener dialogCloseListener)
-
alert
public static void alert(MessageType messageType, java.lang.String message, Component body, Window owner)
-
alert
public static void alert(MessageType messageType, java.lang.String message, Component body, Window owner, int width)
-
alert
public static void alert(MessageType messageType, java.lang.String message, Component body, Window owner, DialogCloseListener dialogCloseListener)
-
alert
public static void alert(MessageType messageType, java.lang.String message, java.lang.String title, Component body, Window owner, DialogCloseListener dialogCloseListener)
-
alert
public static void alert(MessageType messageType, java.lang.String message, java.lang.String title, Component body, Window owner, int width, DialogCloseListener dialogCloseListener)
-
-