public class FrameChuiImpl extends Frame<ChuiOutputManager>
Frame
is a top-level window with a title and a border.Frame.ScrollContainer
Widget.ZOrderClass
chooseHandler, configUpdateActive, contentPane, currentStatement, cursor, down, downBody, EXTRA_DLG_PIXELS, frameScroll, headersHeight, headersOutput, lastRow, needPause, nonbody, originalHeightChars, paintable, redirected, savedTabOrder, startRow, touched, trailingSkips, underline, underlinedRow, verticalStepBoxed
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, calculateFrameRect, calculateHeight, calculateHeightDelta, calculateWidthDelta, canSetColumn, canSetHeightChars, canSetRow, canSetWidthChars, captionHeight, clear, clearCurrent, clearWorker, clipping, config, createScrollContainer, currentFocus, destroy, 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, 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, hasSavedState, hasTitle, initialize, isActive, isAlive, isAllClear, isAttrSpace, isAutoplacing, isCanHide, isCanHideOthers, isCanWipeScreen, isChooseActive, isConfigUpdateActive, isCurrentTouched, isDelayedRepaint, isDialog, isDown, isDownCalculated, isDynamic, isExplicitHide, isFixedWidth, isFocusAttractor, isFocusReset, isForcedRefresh, isForcePause, isForceWipeScreen, isHonorNextConditionalDown, isInChoose, isInScope, isInternalGo, isLabels, isLastWidget, isLeftMostWidget, isNeedPause, isNeedReset, isNoHide, isPendingFixedDown, isPendingUnderline, isPlacedForRedirected, isRedirected, isRightMostWidget, isRootFrame, isSideLabels, isStreamed, isThreeD, isTopFrame, isViewed, isVisibilityChanged, isWithHeaders, leaveChoose, location, markAsStreamed, moveAboveWidget, moveBelowWidget, moveCursor, moveToBottom, moveToTop, moveWidgetBeforeTabItem, needClearRow, notifyClose, notifyPageBreak, notifyUnbind, physicalLocation, placeAtTop, placed, placeToWindow, placeToWindow, postponePlace, postponeSetVisible, postprocess, postprocessConfig, prepareIteration, preprocess, previousFocus, processCancelButton, 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, setHonorNextConditionalDown, setInnerSize, setInScope, setLabels, setLayout, setNeedPause, setNeedPauseDirect, setNeedReset, setOuterSize, setPaintable, setPendingFixedDown, setPendingUnderline, setProtected, setRedirected, setSavedDimension, setScopeNesting, setSize, setState, setValue, setValue, setViewed, setVisibilityChanged, setVisible, setWidth, shortName, switchLabelsEmptyMode, toString, touchBody, touchRow, unbind, underline, view
add, add, add, addDirectly, belongsTo, checkWidget, childrenLocation, clipRectangle, currentFocus, cycleFocus, defaultFocus, detach, dimension, endSizeChange, findMouseSource, firstFocus, focus, focusTraversable, focusWorker, get, getEffectiveScrollableSize, getFocusInt, getIgnoreFocus, getLayout, getScrollableSize, getWidgetsList, hasFocusable, height, insets, lastFocus, minimumSize, moveAfterTabItem, moveBeforeTabItem, moveToBottom, moveToBottomInClass, moveToTop, moveToTopInClass, moveToZpos, nextFocus, normalizeZOrder, prepareWidgets, prevFocus, remove, replace, setFocus, setFocusInt, setIgnoreFocus, setInsets, setSize, startSizeChange, unrealize, updateSizeWorker, widgets, width
_setHidden, _setVisible, activateDirectManipulation, addFocusListener, addKeyListener, afterConfigUpdateBase, ancestor, ancestorId, autoResize, bounds, clear, clearWidget, clipRectangle, clipRectangle, clipWith, createMouseHoverAction, deactivateDirectManipulation, debug, disable, displayPhysicalLocation, drawCaret, enable, enclosingFrame, forceCursorOnFocus, forceVisibility, getActualBounds, getAndResetBitmap, getAndSetBitmap, getBitmapCopy, getCustomMousePointer, getDefaultEvent, getEffectiveMousePointer, getId, getLoadedMousePointer, getMenuMouse, getMouseActions, getPortableMouseEventCoordinates, getSelectedText, getState, getTextHeight, getTextHeightNative, getTextWidth, getTextWidthNative, getVisiblePart, hasFocus, hidden, hide, highlighted, ignoreAction, isDirectManipulationCapable, isDirectManipulationRequired, isDisplayed, isEnabled, isFocusable, isHeader, isRealized, isRMBEntrySupported, isTabStop, isTotallyObscured, isVisible, manageSystemActions, mouseActions, mouseClicked, mouseDragged, mouseEntered, mouseExited, mouseMoved, mousePressed, mouseReleased, mouseWheelMoved, name, navigable, parent, parent, parentOrSelf, physicalBounds, physicalDimension, prepParentLocation, processDirectManipulationEvent, processEvent, processFocusEvent, processKeyListeners, processMnemonic, processMnemonicImpl, processSystemKey, raiseLegacyMouseEvents, refresh, registerWidgetStateListener, repaint, requestSync, resetBitmap, resizeTo, resolveFont, resolveTitleFont, screen, screenDimension, screenHeight, screenLocation, screenPhysicalLocation, screenWidth, setBitmap, setEnabled, setHidden, setHighlighted, setLocation, setLocation, setMousePointer, setParent, setPhysicalLocation, setState, show, supportsCustomMousePointer, sync, topLevelWindow, translate, window
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
addFocusListener, addKeyListener, ancestor, ancestorId, bounds, clearWidget, defaultMousePtr, displayPhysicalLocation, drawCaret, enclosingFrame, enforceDefaultMousePtr, forceCursorOnFocus, forceVisibility, getActualBounds, getCustomMousePointer, getEffectiveMousePointer, getId, getLegacyWidget, getLoadedMousePointer, getMenuMouse, getMouseActions, getSelectedText, getState, getVisiblePart, hasFocus, hidden, hide, highlighted, isDirectManipulable, isDisplayed, isEnabled, isFocusable, isHeader, isRealized, isRMBEntrySupported, isTabStop, isTotallyObscured, isVisible, name, navigable, parent, parent, parentOrSelf, physicalBounds, physicalDimension, processDirectManipulationEvent, processEvent, processFocusEvent, processKeyListeners, processMnemonic, raiseLegacyMouseEvents, repaint, requestSync, resizeTo, screen, screenLocation, screenPhysicalLocation, setEnabled, setHidden, setHighlighted, setLocation, setLocation, setMousePointer, setParent, setPhysicalLocation, setState, show, supportsCustomMousePointer, topLevelWindow, window
public 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>