Packagecom.yworks.canvas.drawing
Classpublic class RectangularSelectionPaintable
InheritanceRectangularSelectionPaintable Inheritance Object
Implements ISelectionPaintable

A simple ISelectionPaintable implementation that draws a rectangle of the bounds of the selected item.



Public Properties
 PropertyDefined By
  fill : IFill
Gets or sets the brush to use for filling the rectangle in the view coordinate system.
RectangularSelectionPaintable
  stroke : IStroke
Gets or sets the pen to use for drawing the rectangle in the view coordinate system.
RectangularSelectionPaintable
Public Methods
 MethodDefined By
  
Creates a selection paintable that paints the bounds.
RectangularSelectionPaintable
  
installSelectionPaintables(userObject:Object, canvas:CanvasComponent, selectionGroup:ICanvasObjectGroup):Array
Creates and installs one or more canvas objects into the canvas that indicate a selection decoration for an item.
RectangularSelectionPaintable
Protected Methods
 MethodDefined By
  
getRectangle(userObject:Object):IRectangle
Factory method that retrieves the bounds for a given user object.
RectangularSelectionPaintable
Property Detail
fillproperty
fill:IFill

Gets or sets the brush to use for filling the rectangle in the view coordinate system.


Implementation
    public function get fill():IFill
    public function set fill(value:IFill):void
strokeproperty 
stroke:IStroke

Gets or sets the pen to use for drawing the rectangle in the view coordinate system.


Implementation
    public function get stroke():IStroke
    public function set stroke(value:IStroke):void
Constructor Detail
RectangularSelectionPaintable()Constructor
public function RectangularSelectionPaintable(bounds:IRectangle)

Creates a selection paintable that paints the bounds.

Parameters
bounds:IRectangle — The bounds to query for the painting.
Method Detail
getRectangle()method
protected function getRectangle(userObject:Object):IRectangle

Factory method that retrieves the bounds for a given user object.

This implementation simply returns the value provided to the constructor.

Parameters

userObject:Object — The user object to get the bounds for.

Returns
IRectangle — The bounds of the user object. This implementation simply returns the value provided to the constructor.
installSelectionPaintables()method 
public function installSelectionPaintables(userObject:Object, canvas:CanvasComponent, selectionGroup:ICanvasObjectGroup):Array

Creates and installs one or more canvas objects into the canvas that indicate a selection decoration for an item.

Parameters

userObject:Object — The item to create a selection for.
 
canvas:CanvasComponent — The canvas to add the selection visualization to.
 
selectionGroup:ICanvasObjectGroup — The canvas object group to add the items to.

Returns
Array — An array of canvas objects this instance has installed into the canvas.