public class AlertBoxGuiImpl extends ModalWindow implements AlertBox<GuiOutputManager>
| Modifier and Type | Class and Description |
|---|---|
private class |
AlertBoxGuiImpl.ButtonsPanel
The class implements the buttons-panel part of the alert box widget.
|
private class |
AlertBoxGuiImpl.MessagePanel
The class implements the message-panel part of the alert box widget.
|
TopLevelWindow.IconDataType| Modifier and Type | Field and Description |
|---|---|
private int |
alertType
The alert type.
|
private java.util.List<Button<GuiOutputManager>> |
buttons
Button list.
|
private static double |
BUTTONS_CHAR_HEIGHT
Height of alert box buttons in characters.
|
private static double |
BUTTONS_CHAR_WIDTH
Width of alert box buttons in characters.
|
private AlertBoxGuiImpl.ButtonsPanel |
buttonsPanel
Buttons panel.
|
private AlertBoxCommons<GuiOutputManager> |
commons
The externalized implementation.
|
private FontDetails |
font
The message font.
|
private GuiDriver |
gd
Cached driver.
|
private ImageWrapper<?> |
icon
The alert box icon.
|
private static int |
MAX_MESSAGE_PIXEL_WIDTH
Max message width in pixels.
|
private AlertBoxGuiImpl.MessagePanel |
messagePanel
Message panel.
|
private java.lang.String |
messageText
Alert box message text.
|
private static int |
MIN_MESSAGE_PIXEL_HEIGHT
Min message height in pixels.
|
private static int |
MIN_MESSAGE_PIXEL_WIDTH
Min message width in pixels.
|
private java.lang.String |
text
Text selected in clipboard
|
contentPane, destroyInProgress, windowPanelisteners, location, mousePtr, nativeInsets, physicalLocationZSCORE_ALWAYS_ON_TOP, ZSCORE_NORMAL, ZSCORE_TOP_ONLY| Constructor and Description |
|---|
AlertBoxGuiImpl(int alertType,
java.lang.Object[] content,
int buttonSet,
logical var,
java.lang.String title,
java.lang.String[] stack)
Default constructor.
|
| Modifier and Type | Method and Description |
|---|---|
void |
close()
Close this window.
|
Widget<GuiOutputManager> |
createGap(WidgetRegistry<GuiOutputManager> registry)
Create effectively invisible widget (the gap) for the stack trace dialog
to avoid explicit coordinates' usage
TODO: at this moment the layout manager doesn't support this approach.
|
TitledWindow |
createStackTraceWindow(java.lang.String title)
Create window for the stack trace
|
void |
dismiss()
Let the modal UI element now that it should finish its modal input processing.
|
void |
doLayout()
Layout.
|
boolean |
findButton(KeyInput keyEvent)
Find the button that matches a passed key event.
|
logical |
getResult()
Helper method to get the edited result when finished.
|
java.util.List<Widget<GuiOutputManager>> |
getTabItemList()
Returns the tab item list for this container.
|
void |
hide()
Hide widget.
|
private void |
init()
Initializes this instance.
|
boolean |
isDismissed()
Returns
true when the modal UI element has dismissed (finished its modal input). |
void |
nextFocus()
Move the input focus to the first widget which can receive a focus in
the peer container.
|
void |
prevFocus()
Move the input focus to the last widget which can receive a focus in
the peer container.
|
void |
processKeyEvent(KeyInput ke)
Process KeyEvents for this widget.
|
void |
setClipboardSelection()
Sets the current selection with information about alert-box.
|
void |
setResult(logical value)
Sets the alert-box result value.
|
void |
show()
Show widget.
|
coordinates, destroy, draw, findMouseSource, getBorder, getClientContentPane, getColorResolver, getContentPane, getFocusCreatedByKeyboard, getGuiMessageArea, getId, getMaxWorkspaceSize, getMessageArea, getMinSize, getPortableMouseEventCoordinates, getRelativeTo, getResizedSize, getScreenDimension, getStatusArea, getTitleBar, getWorkspaceNativeSize, getWorkspaceScreenLocation, getWorkspaceSize, getZOrderScore, hasDecorations, hasTitlebar, isModal, isRealized, isResizeWorkspace, isResizing, processEvent, realize, resizeTo, resolveOwner, setColorResolver, setFocusCreatedByKeyboard, setSize, setWorkspaceLocation, setWorkspaceNativeSizeaddFrame, ancestor, bounds, clipRectangle, defaultFocus, findFrames, findFrames, getFirstVisibleFrame, getFrames, getNextEnabledFrame, getNextVisibleFrame, getOwner, getOwnerOpt, getPlacementManager, getPrevEnabledFrame, getTopFrame, getTopVisibleFrame, getWindowDefaultIcon, isFocusable, isLastLeaveResult, isMaximized, isMinimized, loadWindowIcon, parentOrSelfHidden, physicalBounds, processFocusEvent, reflectLocationChanged, repaint, repaintDecorations, resetMousePointer, resolveTitleFont, screenLocation, screenPhysicalLocation, setLastLeaveResult, setOwner, setWindowDefaultIcon, setWindowIcon, setWindowIcon, windowdrawIntdestroyWidgets, focusTraversable, getZOrderClass, hasFocus, hasTitle, isDisplayed, setTitle, title, toStringadd, add, add, addContainerStateListener, addDirectly, belongsTo, checkWidget, childrenLocation, clipping, clipRectangle, copyState, currentFocus, currentFocus, cycleFocus, deregisterSelectedWidget, detach, dimension, dumpCurrentWidgets, dumpWidgets, endSizeChange, findMouseSource, firstFocus, focus, focusWorker, formatDump, get, getAllSelectedWidgets, getClipRect, getEffectiveScrollableSize, getFocusInt, getIgnoreFocus, getLayout, getScrollableSize, hasFocusable, height, insets, lastFocus, minimumSize, moveAfterTabItem, moveBeforeTabItem, moveToBottom, moveToBottomInClass, moveToTop, moveToTopInClass, moveToZpos, normalizeZOrder, onWidgetAdded, onWidgetRemoved, paintOnTop, parentOf, prepareWidgets, reflectAncestorChange, registerSelectedWidget, remove, removeContainerStateListener, replace, requestFocus, requestFocus, setFocus, setFocusInt, setHeight, setIgnoreFocus, setInsets, setLayout, setPhysicalDimensionInt, setSize, setTabItemList, setWidth, startSizeChange, swap, triggerContainerStateRedrawEnabled, unrealize, updateSizeWorker, widgets, widgetsAsList, widgetStateChanged, width_setHidden, _setVisible, activateDirectManipulation, addFocusListener, addKeyListener, afterConfigUpdateBase, ancestorId, autoResize, clear, clearWidget, clipRectangle, clipWith, config, copyColors, createMouseHoverAction, deactivateDirectManipulation, debug, disable, disableTooltip, displayPhysicalLocation, drawCaret, enable, enableTooltip, enclosingFrame, forceCursorOnFocus, forceVisibility, getActualBounds, getAndResetBitmap, getAndSetBitmap, getBitmapCopy, getCachedScreenLocation, getCachedScreenPhysicalLocation, getCustomMousePointer, getDefaultEvent, getEffectiveMousePointer, getLoadedMousePointer, getMenuMouse, getMouseActions, getMousePosition, getSelectedText, getState, getTextHeight, getTextHeightNative, getTextHeightNative, getTextWidth, getTextWidth, getTextWidthNative, getTextWidthNative, getVisiblePart, hasFocus, hasTooltip, hidden, highlighted, ignoreAction, initialHeight, initialWidth, isCurrent, isDirectManipulationActive, isDirectManipulationActiveOrInUIB, isDirectManipulationCapable, isDirectManipulationRequired, isEnabled, isHeader, isMouseDrag, isRepaintDisabled, isRMBEntrySupported, isScreenLocationCached, isTabStop, isThreeD, isTotallyObscured, isVisible, isVisible, location, manageSystemActions, mouseActions, mouseClicked, mouseDragged, mouseEntered, mouseExited, mouseMoved, mousePressed, mouseReleased, mouseWheelMoved, moveToBottom, moveToTop, name, navigable, oleDoDrop, oleDrag, oleDragging, oleStartDragging, onOleDragging, onOleDropEnd, parent, parent, parentObject, parentOrSelf, parentOrSelfObject, physicalDimension, physicalLocation, postprocessConfig, prepParentLocation, preventFocusWhenMouseDownEventDefined, processDirectManipulationEvent, processKeyEventForSelectableWidget, processKeyListeners, processMnemonic, processMnemonicImpl, processSystemKey, raiseLegacyMouseEvents, reflectSizeChanged, refresh, registerWidgetListener, repaint, repaint, requestSync, resetBitmap, resizeTo, resolveFont, resolvePopupMenuId, screen, screenDimension, screenHeight, screenWidth, setBitmap, setCachedScreenLocation, setCachedScreenPhysicalLocation, setDirectManipulationActive, setEnabled, setHidden, setHighlighted, setLocation, setLocation, setMousePointer, setMousePointer, setParent, setPhysicalLocation, setSensitiveForUIB, setState, setVisible, setWindow, showPopupMenu, supportsCustomMousePointer, sync, topLevelWindow, translate, triggerLocationChanged, unregisterWidgetListener, updateSystemParent, widgetRealizedclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitadd, add, add, addContainerStateListener, childrenLocation, clipping, currentFocus, currentFocus, defaultFocus, detach, endSizeChange, firstFocus, focus, get, getClipRect, getIgnoreFocus, getLayout, hasFocusable, insets, lastFocus, moveAfterTabItem, moveBeforeTabItem, moveToBottom, moveToBottomInClass, moveToTop, moveToTopInClass, moveToZpos, parentOf, remove, removeContainerStateListener, replace, setFocus, setHeight, setIgnoreFocus, setInsets, setLayout, setSize, setSize, setWidth, startSizeChange, widgets, widgetsAsList, widgetsAsListacceptsEscAsAnyKey, acceptTrigger, addFocusListener, addKeyListener, ancestor, ancestorId, bounds, canMovetoTop, clearWidget, completeTrigger, config, defaultMousePtr, destroy, dimension, displayPhysicalLocation, draw, drawCaret, enclosingFrame, enforceDefaultMousePtr, findMouseSource, focusTraversable, forceCursorOnFocus, forceVisibility, getActualBounds, getCustomMousePointer, getEffectiveMousePointer, getId, getIdForTrigger, getLegacyWidget, getLoadedMousePointer, getMenuMouse, getMouseActions, getMousePosition, getSelectedText, getState, getTriggerWidget, getTriggerWidget, getVisiblePart, getZOrderClass, hasFocus, hasFocus, hasTooltip, height, hidden, highlighted, ignoreEnable, initialHeight, initialWidth, isCurrent, isCurrent, isDirectManipulable, isDirectManipulationActive, isDirectManipulationActiveOrInUIB, isDisplayed, isDroppable, isEnabled, isFocusable, isHeader, isInitialValueLayout, isLegacyFocus, isProcessProgressEvent, isRealized, isRepaintDisabled, isRMBEntrySupported, isTabStop, isThreeD, isTotallyObscured, isVisible, isVisible, location, maySwitchFocus, minimumSize, moveToBottom, moveToTop, name, navigable, oleDrag, parent, parent, parent, parentObject, parentOrSelf, parentOrSelfObject, physicalBounds, physicalDimension, physicalLocation, postprocessConfig, preventFocusWhenMouseDownEventDefined, processDirectManipulationEvent, processEvent, processFocusEvent, processKeyListeners, processMnemonic, raiseLegacyMouseEvents, refreshWidget, registerWidgetListener, repaint, repaint, repaint, requestFocus, requestFocus, requestFocus, requestSync, resizeTo, resolvePopupMenuId, screen, screenLocation, screenPhysicalLocation, setDirectManipulationActive, setEnabled, setHidden, setHighlighted, setLocation, setLocation, setMousePointer, setMousePointer, setParent, setPhysicalLocation, setSensitiveForUIB, setState, setVisible, setWindow, startTrigger, supportsCustomMousePointer, systemFocusGrabbed, topLevelWindow, unrealize, unregisterWidgetListener, validateDisplayValue, widgetStateChanged, width, windowmouseClicked, mouseEntered, mouseExited, mousePressed, mouseReleasediconify, isDesktopMinimized, isMaximized, isMinimized, isShareActivationWithOwner, loadWindowIcon, maximize, resizeTo, resolveTitleFont, restore, setLocation, setPhysicalLocation, setWindowIconprivate static int MAX_MESSAGE_PIXEL_WIDTH
private static int MIN_MESSAGE_PIXEL_WIDTH
private static int MIN_MESSAGE_PIXEL_HEIGHT
private static double BUTTONS_CHAR_WIDTH
private static double BUTTONS_CHAR_HEIGHT
private int alertType
private java.lang.String messageText
private java.util.List<Button<GuiOutputManager>> buttons
private ImageWrapper<?> icon
private FontDetails font
private AlertBoxCommons<GuiOutputManager> commons
private GuiDriver gd
private AlertBoxGuiImpl.MessagePanel messagePanel
private AlertBoxGuiImpl.ButtonsPanel buttonsPanel
private java.lang.String text
public AlertBoxGuiImpl(int alertType,
java.lang.Object[] content,
int buttonSet,
logical var,
java.lang.String title,
java.lang.String[] stack)
alertType - One of the ALERT_* constants specifying message type.content - Array of elements which form alert box content.buttonSet - Button set type to be constructed for this AlertBox.var - The variable to be edited. The initial value sets the
default button and the resulting value is changed by the
user's press of a button.title - AlertBox title to be rendered at the top of the one line
border.stack - Progress stack tracepublic void doLayout()
doLayout in interface Container<GuiOutputManager>doLayout in class ModalWindowpublic void show()
show in interface Widget<GuiOutputManager>show in class ModalWindowpublic void hide()
hide in interface Widget<GuiOutputManager>hide in class ModalWindowpublic void close()
close in interface GuiWindowclose in class TopLevelWindow<GuiOutputManager>public void nextFocus()
nextFocus in interface Container<GuiOutputManager>nextFocus in class AbstractContainer<GuiOutputManager>public void prevFocus()
prevFocus in interface Container<GuiOutputManager>prevFocus in class AbstractContainer<GuiOutputManager>public boolean findButton(KeyInput keyEvent)
findButton in interface AlertBox<GuiOutputManager>keyEvent - Event to check.true if matching button is found and event is
processed.public void dismiss()
public boolean isDismissed()
true when the modal UI element has dismissed (finished its modal input).isDismissed in interface IsModalpublic logical getResult()
getResult in interface AlertBox<GuiOutputManager>public void setResult(logical value)
setResult in interface AlertBox<GuiOutputManager>value - The result logical value.public java.util.List<Widget<GuiOutputManager>> getTabItemList()
getTabItemList in interface Container<GuiOutputManager>getTabItemList in class AbstractContainer<GuiOutputManager>public TitledWindow createStackTraceWindow(java.lang.String title)
createStackTraceWindow in interface AlertBox<GuiOutputManager>title - window titlepublic Widget<GuiOutputManager> createGap(WidgetRegistry<GuiOutputManager> registry)
createGap in interface AlertBox<GuiOutputManager>registry - widget registrypublic void processKeyEvent(KeyInput ke)
processKeyEvent in interface Widget<GuiOutputManager>processKeyEvent in class TitledWindow<GuiOutputManager>ke - Key event structure.public void setClipboardSelection()
setClipboardSelection in interface AlertBox<GuiOutputManager>private void init()