org.apache.pivot.wtk
Class Prompt

java.lang.Object
  extended by org.apache.pivot.wtk.Component
      extended by org.apache.pivot.wtk.Container
          extended by org.apache.pivot.wtk.Window
              extended by org.apache.pivot.wtk.Sheet
                  extended by org.apache.pivot.wtk.Prompt
All Implemented Interfaces:
Iterable<Component>, Sequence<Component>, ConstrainedVisual, Visual

public class Prompt
extends Sheet

Class representing an "prompt", a sheet commonly used to perform simple user interaction.

Prompt is a semantic sibling of Alert, but whereas alerts are dialogs, prompts are sheets, meaning that an alert will be modal over its entire owner hierarchy (its entire "application", in common usage) but a prompt will be modal only over its owner's content.


Nested Class Summary
 
Nested classes/interfaces inherited from class org.apache.pivot.wtk.Window
Window.ActionMapping, Window.ActionMappingSequence, Window.Skin
 
Nested classes/interfaces inherited from class org.apache.pivot.wtk.Component
Component.ComponentDictionary, Component.DecoratorSequence, Component.StyleDictionary, Component.UserDataDictionary
 
Nested classes/interfaces inherited from interface org.apache.pivot.collections.Sequence
Sequence.Tree
 
Constructor Summary
Prompt(MessageType type, String message, Sequence<?> options)
           
Prompt(MessageType type, String message, Sequence<?> options, Component body)
           
 
Method Summary
 Component getBody()
           
 String getMessage()
           
 MessageType getMessageType()
           
 Object getOption(int index)
           
 int getOptionCount()
           
 ListenerList<PromptListener> getPromptListeners()
           
 int getSelectedOption()
           
static void prompt(MessageType messageType, String message, Component body, Window owner)
           
static void prompt(MessageType messageType, String message, Component body, Window owner, SheetCloseListener sheetCloseListener)
           
static void prompt(MessageType messageType, String message, Window owner)
           
static void prompt(String message, Window owner)
           
 void setSelectedOption(int selectedOption)
           
 
Methods inherited from class org.apache.pivot.wtk.Sheet
close, close, getResult, getSheetCloseListener, getSheetStateListeners, isClosing, open, open, open, setOwner
 
Methods inherited from class org.apache.pivot.wtk.Window
align, align, descendantGainedFocus, descendantRemoved, getActionMappings, getActiveWindow, getClientArea, getContent, getFocusDescendant, getIcon, getOwnedWindow, getOwnedWindowCount, getOwner, getRootOwner, getTitle, getWindowActionMappingListeners, getWindowClassListeners, getWindowListeners, getWindowStateListeners, isActive, isAuxilliary, isClosed, isMaximized, isOpen, isOpening, isOwner, keyReleased, moveToBack, moveToFront, remove, requestActive, setActive, setContent, setEnabled, setIcon, setIcon, setIcon, setMaximized, setParent, setTitle, setVisible
 
Methods inherited from class org.apache.pivot.wtk.Container
add, containsFocus, descendantLostFocus, get, getComponentAt, getContainerListeners, getContainerMouseListeners, getContextKey, getDescendantAt, getFocusTraversalPolicy, getLength, indexOf, insert, isAncestor, iterator, load, mouseClick, mouseDown, mouseMove, mouseOut, mouseUp, mouseWheel, move, paint, remove, removeAll, requestFocus, setContextKey, setFocusTraversalPolicy, setTooltip, store, transferFocus, update, validate
 
Methods inherited from class org.apache.pivot.wtk.Component
clearFocus, getAttributes, getBounds, getComponentClassListeners, getComponentDataListeners, getComponentDecoratorListeners, getComponentKeyListeners, getComponentListeners, getComponentMouseButtonListeners, getComponentMouseListeners, getComponentMouseWheelListeners, getComponents, getComponentStateListeners, getCursor, getDecoratedBounds, getDecorators, getDisplay, getDragSource, getDropTarget, getFocusedComponent, getGraphics, getHandle, getHeight, getLocation, getMaximumPreferredHeight, getMaximumPreferredWidth, getMenuHandler, getMinimumPreferredHeight, getMinimumPreferredWidth, getParent, getPreferredHeight, getPreferredHeight, getPreferredHeightLimits, getPreferredSize, getPreferredWidth, getPreferredWidth, getPreferredWidthLimits, getSize, getSkin, getStyles, getTooltipText, getUserData, getVisibleArea, getVisibleArea, getVisibleArea, getWidth, getWindow, getX, getY, installSkin, invalidate, isBlocked, isEnabled, isFocusable, isFocused, isMouseOver, isOpaque, isPreferredHeightSet, isPreferredSizeSet, isPreferredWidthSet, isShowing, isValid, isVisible, keyPressed, keyTyped, load, mapPointFromAncestor, mapPointToAncestor, mouseOver, repaint, repaint, repaint, repaint, repaint, repaint, scrollAreaToVisible, scrollAreaToVisible, setAttributes, setCursor, setCursor, setDragSource, setDropTarget, setHeight, setLocation, setLocation, setMaximumPreferredHeight, setMaximumPreferredWidth, setMenuHandler, setMinimumPreferredHeight, setMinimumPreferredWidth, setPreferredHeight, setPreferredHeightLimits, setPreferredHeightLimits, setPreferredSize, setPreferredSize, setPreferredWidth, setPreferredWidthLimits, setPreferredWidthLimits, setSize, setSize, setSkin, setStyles, setStyles, setStyles, setTooltipText, setWidth, setX, setY, store, toString, transferFocus
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Prompt

public Prompt(MessageType type,
              String message,
              Sequence<?> options)

Prompt

public Prompt(MessageType type,
              String message,
              Sequence<?> options,
              Component body)
Method Detail

getMessageType

public MessageType getMessageType()

getMessage

public String getMessage()

getOption

public Object getOption(int index)

getOptionCount

public int getOptionCount()

getBody

public Component getBody()

getSelectedOption

public int getSelectedOption()

setSelectedOption

public void setSelectedOption(int selectedOption)

getPromptListeners

public ListenerList<PromptListener> getPromptListeners()

prompt

public static void prompt(String message,
                          Window owner)

prompt

public static void prompt(MessageType messageType,
                          String message,
                          Window owner)

prompt

public static void prompt(MessageType messageType,
                          String message,
                          Component body,
                          Window owner)

prompt

public static void prompt(MessageType messageType,
                          String message,
                          Component body,
                          Window owner,
                          SheetCloseListener sheetCloseListener)