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.
|
contentPane, windowPane
location, mousePtr, nativeInsets, physicalLocation
ZSCORE_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 |
setResult(logical value)
Sets the alert-box result value.
|
void |
show()
Show widget.
|
coordinates, destroy, draw, findMouseSource, getBorder, getClientContentPane, getColorResolver, getContentPane, getGuiMessageArea, getId, getMaxWorkspaceSize, getMessageArea, getMinSize, getPortableMouseEventCoordinates, getResizedSize, getScreenDimension, getStatusArea, getTitleBar, getWorkspaceNativeSize, getWorkspaceScreenLocation, getWorkspaceSize, getZOrderScore, hasDecorations, hasTitlebar, isModal, isRealized, isResizeWorkspace, isResizing, processEvent, realize, resizeTo, resolveOwner, setColorResolver, setSize, setWorkspaceLocation, setWorkspaceNativeSize
addFrame, 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, reflectLocationChange, repaint, repaintDecorations, resolveTitleFont, screenLocation, screenPhysicalLocation, setLastLeaveResult, setOwner, setWindowDefaultIcon, setWindowIcon, window
drawInt
destroyWidgets, focusTraversable, getZOrderClass, hasFocus, hasTitle, isDisplayed, processKeyEvent, setTitle, title, toString
add, add, add, addContainerStateListener, addDirectly, belongsTo, checkWidget, childrenLocation, clipping, clipRectangle, copyState, currentFocus, currentFocus, cycleFocus, detach, dimension, dumpCurrentWidgets, dumpWidgets, endSizeChange, findMouseSource, firstFocus, focus, focusWorker, formatDump, get, getClipRect, getEffectiveScrollableSize, getFocusInt, getIgnoreFocus, getLayout, getScrollableSize, hasFocusable, height, insets, lastFocus, minimumSize, moveAfterTabItem, moveBeforeTabItem, moveToBottom, moveToBottomInClass, moveToTop, moveToTopInClass, moveToZpos, normalizeZOrder, onWidgetAdded, onWidgetRemoved, prepareWidgets, reflectAncestorChange, remove, removeContainerStateListener, replace, requestFocus, setFocus, setFocusInt, setHeight, setIgnoreFocus, setInsets, setLayout, setSize, setTabItemList, setWidth, startSizeChange, triggerContainerStateRedrawEnabled, unrealize, updateSizeWorker, widgets, widgetsAsList, width
_setHidden, _setVisible, activateDirectManipulation, addFocusListener, addKeyListener, afterConfigUpdateBase, ancestorId, autoResize, clear, clearWidget, clipRectangle, clipWith, config, copyColors, createMouseHoverAction, deactivateDirectManipulation, debug, disable, displayPhysicalLocation, drawCaret, enable, enclosingFrame, forceCursorOnFocus, forceVisibility, getActualBounds, getAndResetBitmap, getAndSetBitmap, getBitmapCopy, getCachedScreenLocation, getCachedScreenPhysicalLocation, getCustomMousePointer, getDefaultEvent, getEffectiveMousePointer, getLoadedMousePointer, getMenuMouse, getMouseActions, getSelectedText, getState, getTextHeight, getTextHeightNative, getTextWidth, getTextWidth, getTextWidthNative, getTextWidthNative, getVisiblePart, hidden, highlighted, ignoreAction, isCurrent, isDirectManipulationCapable, isDirectManipulationRequired, isEnabled, isHeader, isRepaintDisabled, isRMBEntrySupported, isScreenLocationCached, isTabStop, isThreeD, isTotallyObscured, isVisible, isVisible, location, manageSystemActions, mouseActions, mouseClicked, mouseDragged, mouseEntered, mouseExited, mouseMoved, mousePressed, mouseReleased, mouseWheelMoved, moveToBottom, moveToTop, name, navigable, parent, parent, parentObject, parentOrSelf, parentOrSelfObject, physicalDimension, physicalLocation, postprocessConfig, prepParentLocation, processDirectManipulationEvent, processKeyListeners, processMnemonic, processMnemonicImpl, processSystemKey, raiseLegacyMouseEvents, refresh, registerWidgetStateListener, repaint, requestSync, resetBitmap, resizeTo, resolveFont, resolvePopupMenuId, screen, screenDimension, screenHeight, screenWidth, setBitmap, setCachedScreenLocation, setCachedScreenPhysicalLocation, setEnabled, setHidden, setHighlighted, setLocation, setLocation, setMousePointer, setParent, setPhysicalLocation, setState, setVisible, showPopupMenu, supportsCustomMousePointer, sync, topLevelWindow, translate
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
add, 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, remove, removeContainerStateListener, replace, setFocus, setHeight, setIgnoreFocus, setInsets, setLayout, setSize, setSize, setWidth, startSizeChange, widgets, widgetsAsList
addFocusListener, addKeyListener, ancestor, ancestorId, bounds, clearWidget, config, defaultMousePtr, destroy, dimension, displayPhysicalLocation, draw, drawCaret, enclosingFrame, enforceDefaultMousePtr, findMouseSource, focusTraversable, forceCursorOnFocus, forceVisibility, getActualBounds, getCustomMousePointer, getEffectiveMousePointer, getId, getLegacyWidget, getLoadedMousePointer, getMenuMouse, getMouseActions, getSelectedText, getState, getVisiblePart, getZOrderClass, hasFocus, height, hidden, highlighted, isCurrent, isDirectManipulable, isDisplayed, isDroppable, isEnabled, isFocusable, isHeader, isRealized, isRepaintDisabled, isRMBEntrySupported, isTabStop, isThreeD, isTotallyObscured, isVisible, isVisible, location, maySwitchFocus, minimumSize, moveToBottom, moveToTop, name, navigable, parent, parent, parentObject, parentOrSelf, parentOrSelfObject, physicalBounds, physicalDimension, physicalLocation, postprocessConfig, processDirectManipulationEvent, processEvent, processFocusEvent, processKeyEvent, processKeyListeners, processMnemonic, raiseLegacyMouseEvents, repaint, repaint, requestFocus, requestFocus, requestSync, resizeTo, resolvePopupMenuId, screen, screenLocation, screenPhysicalLocation, setEnabled, setHidden, setHighlighted, setLocation, setLocation, setMousePointer, setParent, setPhysicalLocation, setState, setVisible, supportsCustomMousePointer, topLevelWindow, unrealize, width, window
mouseClicked, mouseEntered, mouseExited, mousePressed, mouseReleased
iconify, isDesktopMinimized, isMaximized, isMinimized, isShareActivationWithOwner, loadWindowIcon, maximize, resizeTo, resolveTitleFont, restore, setLocation, setPhysicalLocation, setWindowIcon
private 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
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 ModalWindow
public void show()
show
in interface Widget<GuiOutputManager>
show
in class ModalWindow
public void hide()
hide
in interface Widget<GuiOutputManager>
hide
in class ModalWindow
public void close()
close
in interface GuiWindow
close
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 IsModal
public 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 registryprivate void init()