public class MessageAreaGuiImpl extends ScrollPaneGuiImpl implements MessageArea<GuiOutputManager>
ScrollPaneGuiImpl.ShowBars| Modifier and Type | Field and Description |
|---|---|
private GuiDriver |
gd
Screen driver
|
private GuiFontResolver |
gf
Font resolver
|
private int |
lines
Message area lines
|
private ScrollableListGuiImpl |
list
Messages
|
private static int |
MAX_LINES
Maximum number of lines in message area
|
private int |
maxTextWidth
Message text maximum width in pixels
|
private Dimension |
textDimChars
Message text width and height in character units
|
private WindowGuiImpl |
window
Ancestor
|
both, gc, intersectionPanelconfig, rootPanellisteners, location, mousePtr, nativeInsets, physicalLocation| Constructor and Description |
|---|
MessageAreaGuiImpl(WidgetId id,
int rows)
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
private int |
addItem(java.lang.String message)
Add new item to message list.
|
private void |
addMessage(java.lang.String message)
Add a new message text to message area.
|
void |
attach(Window<GuiOutputManager> window)
Attach widget to window.
|
double |
calculateMessageAreaHeight()
Calculates the height of the Message Area in the characters units.
|
private void |
clearMessages()
Clear all messages.
|
void |
clearMessagesNoPause()
Clear the message content and make sure that the message area displays the cleared
space without pausing.
|
void |
doLayout()
Lay out container.
|
void |
draw()
Widget drawing method.
|
boolean |
focusTraversable()
This component will not receive focus when Tab or Shift-Tab is pressed.
|
Color[] |
getMessageColors()
Get all the message colors in this message-area.
|
int |
getMessageLines()
Returns the number of screen lines available for message display.
|
java.lang.String[] |
getMessageTexts()
Get all the message texts in this message-area.
|
private int |
getTextWidth(java.lang.String text)
Get text width.
|
protected int[] |
mouseActions()
Determine the mouse actions processed by this widget.
|
void |
setMessageText(java.lang.String[] message,
Color[] cs)
Shows the new message text.
|
void |
setMessageText(java.lang.String[] msg,
Color[] cs,
boolean force)
Set message main worker routine.
|
private int |
split(java.lang.String text)
Split message.
|
adjustIntersectionPanel, adjustScrollLayout, adjustScrollLayoutImpl, afterConfigUpdate, barSize, barSizeNative, calcInitialViewportSize, calcViewportSizeWithoutScrollbars, draw, enforceDefaultMousePtr, getEffectiveMousePointer, getIntersectionRect, getLoadedMousePointer, getScrollBar, handleScrollEvent, hasIntersectionPanel, mouseClicked, mouseMoved, mouseReleased, mouseWheelMoved, setEnabled, setHorizBarQuirk, setIntersectionPanel, setScrollBarController, setScrollBars, setShowBars, supportsCustomMousePointer, topLevelWindowcalcHscroll, calcVscroll, config, getBorder, getChild, getRootPanel, initialize, isFocusable, minimumSize, setBorder, setLocation, setSize, viewportadd, add, add, addContainerStateListener, addDirectly, belongsTo, checkWidget, childrenLocation, clipping, clipRectangle, copyState, currentFocus, currentFocus, cycleFocus, defaultFocus, deregisterSelectedWidget, destroy, detach, dimension, dumpCurrentWidgets, dumpWidgets, endSizeChange, findMouseSource, firstFocus, focus, focusWorker, formatDump, get, getAllSelectedWidgets, getClipRect, getEffectiveScrollableSize, getFocusInt, getIgnoreFocus, getLayout, getScrollableSize, getTabItemList, hasFocusable, height, insets, lastFocus, moveAfterTabItem, moveBeforeTabItem, moveToBottom, moveToBottomInClass, moveToTop, moveToTopInClass, moveToZpos, nextFocus, normalizeZOrder, onWidgetAdded, onWidgetRemoved, paintOnTop, parentOf, prepareWidgets, prevFocus, processKeyEvent, reflectAncestorChange, reflectLocationChanged, registerSelectedWidget, remove, removeContainerStateListener, repaint, 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, ancestor, ancestorId, autoResize, bounds, clear, clearWidget, clipRectangle, clipRectangle, clipWith, copyColors, createMouseHoverAction, deactivateDirectManipulation, debug, disable, disableTooltip, displayPhysicalLocation, drawCaret, enable, enableTooltip, enclosingFrame, forceCursorOnFocus, forceVisibility, getActualBounds, getAndResetBitmap, getAndSetBitmap, getBitmapCopy, getCachedScreenLocation, getCachedScreenPhysicalLocation, getCustomMousePointer, getDefaultEvent, getId, getMenuMouse, getMouseActions, getMousePosition, getPortableMouseEventCoordinates, getSelectedText, getState, getTextHeight, getTextHeightNative, getTextHeightNative, getTextWidth, getTextWidth, getTextWidthNative, getTextWidthNative, getVisiblePart, getZOrderClass, hasFocus, hasTooltip, hidden, hide, highlighted, ignoreAction, initialHeight, initialWidth, isCurrent, isDirectManipulationActive, isDirectManipulationActiveOrInUIB, isDirectManipulationCapable, isDirectManipulationRequired, isDisplayed, isEnabled, isHeader, isMouseDrag, isRealized, isRepaintDisabled, isRMBEntrySupported, isScreenLocationCached, isTabStop, isThreeD, isTotallyObscured, isVisible, isVisible, location, manageSystemActions, mouseDragged, mouseEntered, mouseExited, mousePressed, moveToBottom, moveToTop, name, navigable, oleDoDrop, oleDrag, oleDragging, oleStartDragging, onOleDragging, onOleDropEnd, parent, parent, parentObject, parentOrSelf, parentOrSelfObject, physicalBounds, physicalDimension, physicalLocation, postprocessConfig, prepParentLocation, preventFocusWhenMouseDownEventDefined, processDirectManipulationEvent, processEvent, processFocusEvent, processKeyEventForSelectableWidget, processKeyListeners, processMnemonic, processMnemonicImpl, processSystemKey, raiseLegacyMouseEvents, reflectSizeChanged, refresh, registerWidgetListener, repaint, repaint, requestSync, resetBitmap, resizeTo, resolveFont, resolvePopupMenuId, resolveTitleFont, screen, screenDimension, screenHeight, screenLocation, screenPhysicalLocation, screenWidth, setBitmap, setCachedScreenLocation, setCachedScreenPhysicalLocation, setDirectManipulationActive, setHidden, setHighlighted, setLocation, setMousePointer, setMousePointer, setParent, setPhysicalLocation, setSensitiveForUIB, setState, setVisible, setWindow, show, showPopupMenu, sync, toString, translate, triggerLocationChanged, unregisterWidgetListener, updateSystemParent, widgetRealized, windowclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitforceVisibilitywidgetsAsListacceptsEscAsAnyKey, acceptTrigger, addFocusListener, addKeyListener, ancestor, ancestorId, bounds, canMovetoTop, clearWidget, completeTrigger, defaultMousePtr, displayPhysicalLocation, drawCaret, enclosingFrame, forceCursorOnFocus, forceVisibility, getActualBounds, getCustomMousePointer, getId, getIdForTrigger, getLegacyWidget, getMenuMouse, getMouseActions, getMousePosition, getSelectedText, getState, getTriggerWidget, getTriggerWidget, getVisiblePart, getZOrderClass, hasFocus, hasFocus, hasTooltip, hidden, hide, highlighted, ignoreEnable, initialHeight, initialWidth, isCurrent, isCurrent, isDirectManipulable, isDirectManipulationActive, isDirectManipulationActiveOrInUIB, isDisplayed, isDroppable, isEnabled, isHeader, isInitialValueLayout, isLegacyFocus, isProcessProgressEvent, isRealized, isRepaintDisabled, isRMBEntrySupported, isTabStop, isThreeD, isTotallyObscured, isVisible, isVisible, location, maySwitchFocus, 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, requestFocus, requestSync, resizeTo, resolvePopupMenuId, screen, screenLocation, screenPhysicalLocation, setDirectManipulationActive, setHidden, setHighlighted, setLocation, setMousePointer, setMousePointer, setParent, setPhysicalLocation, setSensitiveForUIB, setState, setVisible, setWindow, show, startTrigger, systemFocusGrabbed, unregisterWidgetListener, validateDisplayValue, windowprivate static final int MAX_LINES
private WindowGuiImpl window
private GuiDriver gd
private GuiFontResolver gf
private ScrollableListGuiImpl list
private int maxTextWidth
private Dimension textDimChars
private int lines
public MessageAreaGuiImpl(WidgetId id, int rows)
rows - Number of visible rows.public void draw()
draw in interface Widget<GuiOutputManager>draw in class ScrollPaneGuiImplpublic void attach(Window<GuiOutputManager> window)
attach in interface MessageArea<GuiOutputManager>window - parent window.private void addMessage(java.lang.String message)
message - Message text.private int addItem(java.lang.String message)
message - New message.private void clearMessages()
HIDE MESSAGE
public int getMessageLines()
This method corresponds to the Progress built-in function:
MESSAGE-LINES
public void doLayout()
doLayout in interface Container<GuiOutputManager>doLayout in class ScrollPane<GuiOutputManager>public double calculateMessageAreaHeight()
public java.lang.String[] getMessageTexts()
getMessageTexts in interface MessageArea<GuiOutputManager>public void setMessageText(java.lang.String[] msg,
Color[] cs,
boolean force)
setMessageText in interface MessageArea<GuiOutputManager>msg - Message text array.cs - Message color array.force - true means force redisplaying of messages even
if message text is already null.public Color[] getMessageColors()
getMessageColors in interface MessageArea<GuiOutputManager>public void setMessageText(java.lang.String[] message,
Color[] cs)
setMessageText in interface MessageArea<GuiOutputManager>message - Array of two text message which need to be displayed inside the
message area.cs - Array of two color specifications.public void clearMessagesNoPause()
In GUI, clearing the messages and repainting should be enough since this will not trigger any pausing.
clearMessagesNoPause in interface MessageArea<GuiOutputManager>public boolean focusTraversable()
focusTraversable in interface Widget<GuiOutputManager>focusTraversable in class AbstractContainer<GuiOutputManager>falseprotected int[] mouseActions()
mouseActions in class ScrollPaneGuiImplprivate int split(java.lang.String text)
text - Text to split.private int getTextWidth(java.lang.String text)
text - String text.