public class FrameChuiImpl extends Frame<ChuiOutputManager>
Frame is a top-level window with a title and a border.Frame.FrameScrollContainerchooseHandler, configUpdateActive, contentPane, currentStatement, cursor, down, downBody, EXTRA_DLG_PIXELS, frameScroll, headersHeight, headersOutput, lastRow, needPause, nonbody, originalHeightChars, paintable, positionChanged, redirected, savedTabOrder, sizeChanged, skipMoveToTop, startRow, touched, trailingSkips, underline, underlinedRow, verticalStepBoxedlisteners, location, mousePtr, nativeInsets, physicalLocation| Constructor and Description |
|---|
FrameChuiImpl(WidgetId id,
FrameConfig cfg)
Special constructor used to restore component using given configuration.
|
| Modifier and Type | Method and Description |
|---|---|
protected double |
adjustMinSize(double minWidthOrHeight,
boolean isHeight)
Adjusts the minimum frame width or height value depending on the current min value and
the presense of the box within the frame.
|
protected Colors |
compareColors(BaseConfig config,
Colors colors)
Compare colors.
|
void |
draw(Point origin,
Dimension size)
Draw the peer container.
|
private void |
drawTitle(Point origin,
int width,
boolean redir,
Color tcolor)
Draw frame title.
|
protected void |
drawUnderline(Widget<ChuiOutputManager> comp)
Draw underline for specified widget.
|
protected void |
forceBox(double start,
double lines)
Forces drawing of a box character for a number of consecutive lines
in redirected mode.
|
protected void |
forceNewLine()
Forces drawing of an empty line in redirected mode.
|
protected void |
forceSkips(int where)
Forces drawing of skips in redirected mode.
|
protected Rectangle |
frameContentBounds()
Get the bounds of the frame's content.
|
Rectangle |
getClipRect()
Get clipping rectangle.
|
double |
getLabelHeight(java.lang.String labelText,
LabeledWidget<ChuiOutputManager> widget,
boolean topLabel)
Compute the label height in character units.
|
double |
getLabelWidth(java.lang.String label,
LabeledWidget<ChuiOutputManager> widget)
Compute the label width in character units.
|
double |
getRowDelta()
Get a delta which is added between frames, when their Y coordinate is automatically
computed.
|
protected void |
resetColors(BaseConfig config)
Reset colors.
|
addWidget, adjustDown, adjustDown, adjustWidth, afterConfigUpdate, allFramesVisible, applyConfig, arrangeToInteract, arrangeToStream, attachToWindow, calcDefaultFocus, calculateFrameRect, calculateHeight, calculateHeightDelta, calculateWidthDelta, canSetColumn, canSetHeightChars, canSetRow, canSetWidthChars, captionHeight, clear, clearCurrent, clearWorker, clipping, config, copyState, createScrollContainer, currentFocus, destroy, detach, doLayout, doLayout, doLayoutWorker, draw, drawDownFrame, enableAllWidgets, enabledWidgetsByList, enterChoose, fixNonBody, getBorderBottomChars, getBorderLeftChars, getBorderRightChars, getBorderTopChars, getChooseData, getChooseHelp, getContentPane, getCursor, getDialogDecorationCharSize, getDown, getDownConfigs, getField, getField, getFirstEnabledWidget, getFirstFocusableId, getFirstFocusableId, getFixedHeight, getFocusId, getFrameRegion, getFrameValue, getFrameValue, getInnerSize, getIterationHeight, getIterationIds, getLeadingSkipSize, getMaxFrameSize, getMinHeight, getNextEnabledWidget, getOriginalHeightChars, getRootFrame, getSavedDimension, getScopeNesting, getSelectedField, getSelectedWidget, getStreamId, getTrailingSkipSize, getValues, getZOrderClass, hasAnyEnabled, hasBox, hasDefaultButton, hasEditors, hasEnabled, hasHeaders, hasParentFrame, hasSavedState, hasTitle, initialize, initializeWidget, isActive, isAlive, isAllClear, isAttrSpace, isAutoplacing, isCanHide, isCanHideOthers, isCanWipeScreen, isChanged, isChooseActive, isConfigUpdateActive, isCurrentTouched, isDelayedRepaint, isDialog, isDown, isDownCalculated, isDynamic, isExplicitHide, isFixedWidth, isFocusAttractor, isFocusReset, isForcedRefresh, isForcePause, isForceWipeScreen, isHonorNextConditionalDown, isInChoose, isInScope, isInternalGo, isLabels, isLastWidget, isLastWidget, isLeftMostWidget, isNeedPause, isNeedReset, isNoHide, isPendingFixedDown, isPendingUnderline, isPlacedForRedirected, isRedirected, isRightMostWidget, isRootFrame, isSideLabels, isStreamed, isThreeD, isTopFrame, isViewed, isVisibilityChanged, isWithHeaders, leaveChoose, location, markAsStreamed, markChanged, moveAboveWidget, moveBelowWidget, moveCursor, moveToBottom, moveToTop, moveToTop, moveWidgetBeforeTabItem, needClearRow, notifyClose, notifyPageBreak, notifyUnbind, onFromVisibleToHidden, physicalLocation, placeAtTop, placed, placeToWindow, placeToWindow, postponePlace, postponeSetVisible, postprocess, postprocessConfig, prepareIteration, preprocess, preventFocusWhenMouseDownEventDefined, previousFocus, processCancelButton, processDefaultButton, processDefaultButton, processFrameMnemonic, processKeyEvent, realizeFrame, rearrangeEditors, relayout, relocateComponent, repaint, repaintCurrent, repaintUninitialized, requestFocus, reset, resetAll, resetAutoplacing, resetChanged, resetForcedRefresh, resetNeedPause, resetPlacementQuirk, resetWidget, resolveWidgetId, restore, restoreEditors, restoreInitialTabOrder, scroll, setAlive, setAllClear, setAttrSpace, setBodyVisible, setBox, setCanHide, setCanHideOthers, setCanWipeScreen, setChooseAt, setColumns, setCurrentStatement, setCursor, setDelayedRepaint, setDown, setDynCol, setDynRow, setExplicitHide, setFocusAttractor, setFocusId, setFocusReset, setForcePause, setForceWipeScreen, setFormatCheck, setHeight, setHidden, setHonorNextConditionalDown, setInnerSize, setInScope, setLabels, setLayout, setNeedPause, setNeedPauseDirect, setNeedReset, setNonBodyVisible, setOuterSize, setPaintable, setPendingFixedDown, setPendingUnderline, setProtected, setRedirected, setSavedDimension, setScopeNesting, setSensitive, setSize, setSkipMoveToTop, setState, setTabItemList, setTabItemList, setValue, setValue, setViewed, setVisibilityChanged, setVisible, setWidth, shortName, switchLabelsEmptyMode, thisAndAncestryVisible, toString, touchBody, touchRow, unbind, underline, updateInnerSize, viewadd, add, add, addContainerStateListener, addDirectly, belongsTo, checkWidget, childrenLocation, clipRectangle, currentFocus, cycleFocus, defaultFocus, deregisterSelectedWidget, dimension, dumpCurrentWidgets, dumpWidgets, endSizeChange, findMouseSource, firstFocus, focus, focusTraversable, focusWorker, formatDump, get, getAllSelectedWidgets, getEffectiveScrollableSize, getFocusInt, getIgnoreFocus, getLayout, getScrollableSize, getTabItemList, hasFocusable, height, insets, lastFocus, minimumSize, moveAfterTabItem, moveBeforeTabItem, moveToBottom, moveToBottomInClass, moveToTop, moveToTopInClass, moveToZpos, nextFocus, normalizeZOrder, onWidgetAdded, onWidgetRemoved, paintOnTop, parentOf, prepareWidgets, prevFocus, reflectAncestorChange, reflectLocationChanged, registerSelectedWidget, remove, removeContainerStateListener, replace, requestFocus, requestFocus, setFocus, setFocusInt, setIgnoreFocus, setInsets, setPhysicalDimensionInt, setSize, 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, getEffectiveMousePointer, getId, getLoadedMousePointer, getMenuMouse, getMouseActions, getMousePosition, getPortableMouseEventCoordinates, getSelectedText, getState, getTextHeight, getTextHeightNative, getTextHeightNative, getTextWidth, getTextWidth, getTextWidthNative, getTextWidthNative, getVisiblePart, hasFocus, hasTooltip, hidden, hide, highlighted, ignoreAction, initialHeight, initialWidth, isCurrent, isDirectManipulationActive, isDirectManipulationActiveOrInUIB, isDirectManipulationCapable, isDirectManipulationRequired, isDisplayed, isEnabled, isFocusable, isHeader, isMouseDrag, isRealized, isRepaintDisabled, isRMBEntrySupported, isScreenLocationCached, isTabStop, isTotallyObscured, isVisible, isVisible, manageSystemActions, mouseActions, mouseClicked, mouseDragged, mouseEntered, mouseExited, mouseMoved, mousePressed, mouseReleased, mouseWheelMoved, name, navigable, oleDoDrop, oleDrag, oleDragging, oleStartDragging, onOleDragging, onOleDropEnd, parent, parent, parentObject, parentOrSelf, parentOrSelfObject, physicalBounds, physicalDimension, prepParentLocation, 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, setEnabled, setHighlighted, setLocation, setLocation, setMousePointer, setMousePointer, setParent, setPhysicalLocation, setSensitiveForUIB, setState, setWindow, show, showPopupMenu, supportsCustomMousePointer, sync, topLevelWindow, translate, triggerLocationChanged, unregisterWidgetListener, updateSystemParent, widgetRealized, windowclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitwidgetsAsListacceptsEscAsAnyKey, acceptTrigger, addFocusListener, addKeyListener, ancestor, ancestorId, bounds, canMovetoTop, clearWidget, completeTrigger, defaultMousePtr, displayPhysicalLocation, drawCaret, enclosingFrame, enforceDefaultMousePtr, forceCursorOnFocus, forceVisibility, getActualBounds, getCustomMousePointer, getEffectiveMousePointer, getId, getIdForTrigger, getLegacyWidget, getLoadedMousePointer, getMenuMouse, getMouseActions, getMousePosition, getSelectedText, getState, getTriggerWidget, getTriggerWidget, getVisiblePart, hasFocus, hasFocus, hasTooltip, hidden, hide, highlighted, ignoreEnable, initialHeight, initialWidth, isCurrent, isCurrent, isDirectManipulable, isDirectManipulationActive, isDirectManipulationActiveOrInUIB, isDisplayed, isDroppable, isEnabled, isFocusable, isHeader, isInitialValueLayout, isLegacyFocus, isProcessProgressEvent, isRealized, isRepaintDisabled, isRMBEntrySupported, isTabStop, isTotallyObscured, isVisible, isVisible, maySwitchFocus, name, navigable, oleDrag, parent, parent, parent, parentObject, parentOrSelf, parentOrSelfObject, physicalBounds, physicalDimension, processDirectManipulationEvent, processEvent, processFocusEvent, processKeyListeners, processMnemonic, raiseLegacyMouseEvents, refreshWidget, registerWidgetListener, repaint, repaint, requestSync, resizeTo, resolvePopupMenuId, screen, screenLocation, screenPhysicalLocation, setDirectManipulationActive, setEnabled, setHighlighted, setLocation, setLocation, setMousePointer, setMousePointer, setParent, setPhysicalLocation, setSensitiveForUIB, setState, setWindow, show, startTrigger, supportsCustomMousePointer, systemFocusGrabbed, topLevelWindow, unregisterWidgetListener, validateDisplayValue, windowpublic FrameChuiImpl(WidgetId id, FrameConfig cfg)
id - The widget's ID.cfg - Configuration data.public double getLabelWidth(java.lang.String label,
LabeledWidget<ChuiOutputManager> widget)
getLabelWidth in class Frame<ChuiOutputManager>label - The label text.widget - The widgeth to which the label belongs.label string.public double getLabelHeight(java.lang.String labelText,
LabeledWidget<ChuiOutputManager> widget,
boolean topLabel)
getLabelHeight in class Frame<ChuiOutputManager>labelText - The label text.widget - The widget to which the label belongs.topLabel - Flag identifying that the label is shown above the widget.public double getRowDelta()
getRowDelta in class Frame<ChuiOutputManager>0.public Rectangle getClipRect()
getClipRect in interface Container<ChuiOutputManager>getClipRect in class AbstractContainer<ChuiOutputManager>public void draw(Point origin, Dimension size)
Drawing for the redirected terminal differs. Labels/headers are drawn only once per page, instead of the usual once per frame.
draw in class Frame<ChuiOutputManager>origin - The coordinate of the upper-left corner for peer container in
character units.size - The size of the peer container in character units.protected double adjustMinSize(double minWidthOrHeight,
boolean isHeight)
adjustMinSize in class Frame<ChuiOutputManager>minWidthOrHeight - The size value to be adjusted.isHeight - TRUE if the size value is height, FALSE if width.protected void drawUnderline(Widget<ChuiOutputManager> comp)
drawUnderline in class Frame<ChuiOutputManager>comp - The base component to draw underline for.private void drawTitle(Point origin, int width, boolean redir, Color tcolor)
origin - Frame origin.width - Frame width.redir - Redirected mode flag.tcolor - Title color.protected void forceNewLine()
protected void forceBox(double start,
double lines)
forceBox in class Frame<ChuiOutputManager>start - line number in screen coordinates where the output startslines - number of lines to output toprotected void forceSkips(int where)
where - Vertical position.protected void resetColors(BaseConfig config)
resetColors in class Frame<ChuiOutputManager>config - Widget configuration.protected Colors compareColors(BaseConfig config, Colors colors)
ChUI implementation must compare dcolor and pfcolor.
GUI implementation must compare bgcolor and fgcolor.
compareColors in class Frame<ChuiOutputManager>config - Widget configuration.colors - Colors to be compared.protected Rectangle frameContentBounds()
frameContentBounds in class Frame<ChuiOutputManager>