Packagecom.yworks.canvas.drawing
Classpublic class OrientedRectangleSelectionPaintable
InheritanceOrientedRectangleSelectionPaintable Inheritance Object
Implements ISelectionPaintable

A simple ISelectionPaintable implementation that draws an oriented rectangle as a selection box.



Public Properties
 PropertyDefined By
  fill : IFill
Gets or sets the fill to use for filling the rectangle in the view coordinate system.
OrientedRectangleSelectionPaintable
  stroke : IStroke
Gets or sets the stroke to use for drawing the rectangle in the view coordinate system.
OrientedRectangleSelectionPaintable
Public Methods
 MethodDefined By
  
Creates a selection paintable that paints the bounds.
OrientedRectangleSelectionPaintable
  
installSelectionPaintables(userObject:Object, canvas:CanvasComponent, selectionGroup:ICanvasObjectGroup):Array
Implements the interface and installs a rectangle into the canvas control.
OrientedRectangleSelectionPaintable
Protected Methods
 MethodDefined By
  
getRectangle(userObject:Object):IOrientedRectangle
Factory method that retrieves the bounds for a given user object.
OrientedRectangleSelectionPaintable
Property Detail
fillproperty
fill:IFill

Gets or sets the fill 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 stroke 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
OrientedRectangleSelectionPaintable()Constructor
public function OrientedRectangleSelectionPaintable(bounds:IOrientedRectangle)

Creates a selection paintable that paints the bounds.

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

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

This implementation simply returns the value provided to the constructor.

Parameters

userObject:Object — user object to get the bounds for

Returns
IOrientedRectangle — an oriented rectangle representing the bounds of the user object.
installSelectionPaintables()method 
public function installSelectionPaintables(userObject:Object, canvas:CanvasComponent, selectionGroup:ICanvasObjectGroup):Array

Implements the interface and installs a rectangle into the canvas control.

This method queries the getRectangle for a suitable rectangle.

Parameters

userObject:Object — The item to create a selection for.
 
canvas:CanvasComponent — The canvas to add the IDisplayObjectCreators for the selection painting 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.

See also