public class RectangleImpl extends Rect<ChuiOutputManager>
insets, location, LOG, mousePtr, nativeInsets, physicalLocation
Constructor and Description |
---|
RectangleImpl(WidgetId id,
Container<ChuiOutputManager> owner)
This constructor creates a rectangle.
|
RectangleImpl(WidgetId id,
RectangleConfig cfg)
Special constructor used to restore component using given configuration.
|
Modifier and Type | Method and Description |
---|---|
void |
draw()
Draw the rectangle.
|
private void |
drawRectangleBorder(ChuiOutputManager screen,
Point origin,
Dimension dimension,
int borderSize,
Color color)
Draw rectangle character border.
|
private void |
drawRectangleCell(ChuiOutputManager screen,
int x,
int y,
int character,
Color color)
Draw rectangle cell.
|
private void |
fillRectangle(ChuiOutputManager screen,
Point origin,
Dimension dimension,
int borderSize,
Color color)
Fill rectangle.
|
private boolean |
isBorder(int value,
int minValue,
int maxValue)
Check if the value is inside the border area.
|
afterConfigUpdate, config, dimension, focusTraversable, height, initialize, minimumSize, setSize, width
_setHidden, _setVisible, activateDirectManipulation, addFocusListener, addKeyListener, afterConfigUpdateBase, ancestor, ancestorId, autoResize, bounds, clear, clearWidget, clipRectangle, clipRectangle, clipWith, copyColors, copyState, createMouseHoverAction, deactivateDirectManipulation, debug, destroy, disable, disableTooltip, displayPhysicalLocation, drawCaret, enable, enableTooltip, enclosingFrame, findMouseSource, 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, getZOrderClass, hasFocus, hidden, hide, highlighted, ignoreAction, initialHeight, initialWidth, insets, isCurrent, isDirectManipulationActive, isDirectManipulationCapable, isDirectManipulationRequired, isDisplayed, isEnabled, isFocusable, isHeader, isMouseDrag, isRealized, 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, physicalBounds, physicalDimension, physicalLocation, postprocessConfig, prepParentLocation, preventFocusWhenMouseDownEventDefined, processDirectManipulationEvent, processEvent, processFocusEvent, processKeyEvent, processKeyEventForSelectableWidget, processKeyListeners, processMnemonic, processMnemonicImpl, processSystemKey, raiseLegacyMouseEvents, reflectAncestorChange, reflectLocationChange, refresh, registerWidgetStateListener, repaint, repaint, repaint, requestFocus, requestSync, resetBitmap, resizeTo, resolveFont, resolvePopupMenuId, resolveTitleFont, screen, screenDimension, screenHeight, screenLocation, screenPhysicalLocation, screenWidth, setBitmap, setCachedScreenLocation, setCachedScreenPhysicalLocation, setEnabled, setHidden, setHighlighted, setLocation, setLocation, setMousePointer, setParent, setPhysicalLocation, setState, setVisible, show, showPopupMenu, supportsCustomMousePointer, sync, topLevelWindow, toString, translate, unrealize, unregisterWidgetStateListener, updateSizeWorker, widgetStateChanged, window
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
canMovetoTop, defaultMousePtr, enforceDefaultMousePtr, getLegacyWidget, getTriggerWidget, getTriggerWidget, hasFocus, ignoreEnable, isDirectManipulable, isDroppable, isInitialValueLayout, isLegacyFocus, maySwitchFocus, parent, refreshWidget, requestFocus, requestFocus, systemFocusGrabbed, validateDisplayValue
RectangleImpl(WidgetId id, Container<ChuiOutputManager> owner)
id
- The widget's ID.owner
- The parent container, frame which will include this
rectangle.public RectangleImpl(WidgetId id, RectangleConfig cfg)
id
- The widget's ID.cfg
- Configuration data.public void draw()
draw
in interface Widget<ChuiOutputManager>
draw
in class Rect<ChuiOutputManager>
private void drawRectangleBorder(ChuiOutputManager screen, Point origin, Dimension dimension, int borderSize, Color color)
screen
- Screen manager.origin
- Rectangle origin.dimension
- Rectangle size.borderSize
- Border size characters.color
- Border color.private boolean isBorder(int value, int minValue, int maxValue)
value
- Current value.minValue
- Minimum value.maxValue
- Maximum value.true
if is inside the border area
false
otherwise.private void fillRectangle(ChuiOutputManager screen, Point origin, Dimension dimension, int borderSize, Color color)
screen
- Screen manager.origin
- Rectangle origin.dimension
- Rectangle size.borderSize
- Border size characters.color
- Fill color.private void drawRectangleCell(ChuiOutputManager screen, int x, int y, int character, Color color)
screen
- Screen manager.x
- Column position.y
- Row position.character
- Character to writecolor
- Cell color.