public class RectangleImpl extends Rect<ChuiOutputManager>
Widget.ZOrderClass
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, width
_setHidden, _setVisible, activateDirectManipulation, addFocusListener, addKeyListener, afterConfigUpdateBase, ancestor, ancestorId, autoResize, bounds, clear, clearWidget, clipRectangle, clipRectangle, clipWith, createMouseHoverAction, deactivateDirectManipulation, debug, destroy, disable, displayPhysicalLocation, drawCaret, enable, enclosingFrame, findMouseSource, forceCursorOnFocus, forceVisibility, getActualBounds, getAndResetBitmap, getAndSetBitmap, getBitmapCopy, getCustomMousePointer, getDefaultEvent, getEffectiveMousePointer, getId, getLoadedMousePointer, getMenuMouse, getMouseActions, getPortableMouseEventCoordinates, getSelectedText, getState, getTextHeight, getTextHeightNative, getTextWidth, getTextWidthNative, getVisiblePart, getZOrderClass, hasFocus, hidden, hide, highlighted, ignoreAction, insets, isDirectManipulationCapable, isDirectManipulationRequired, isDisplayed, isEnabled, isFocusable, isHeader, isRealized, isRMBEntrySupported, isTabStop, isThreeD, isTotallyObscured, isVisible, location, manageSystemActions, mouseActions, mouseClicked, mouseDragged, mouseEntered, mouseExited, mouseMoved, mousePressed, mouseReleased, mouseWheelMoved, moveToBottom, moveToTop, name, navigable, parent, parent, parentOrSelf, physicalBounds, physicalDimension, physicalLocation, postprocessConfig, prepParentLocation, processDirectManipulationEvent, processEvent, processFocusEvent, processKeyEvent, processKeyListeners, processMnemonic, processMnemonicImpl, processSystemKey, raiseLegacyMouseEvents, refresh, registerWidgetStateListener, repaint, repaint, requestFocus, requestSync, resetBitmap, resizeTo, resolveFont, resolveTitleFont, screen, screenDimension, screenHeight, screenLocation, screenPhysicalLocation, screenWidth, setBitmap, setEnabled, setHidden, setHighlighted, setLocation, setLocation, setMousePointer, setParent, setPhysicalLocation, setState, setVisible, show, supportsCustomMousePointer, sync, topLevelWindow, toString, translate, unrealize, updateSizeWorker, window
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
defaultMousePtr, enforceDefaultMousePtr, getLegacyWidget, isDirectManipulable
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.