Packagecom.yworks.canvas.input
Classpublic class MagnifierInputMode
InheritanceMagnifierInputMode Inheritance AbstractInputMode Inheritance flash.events.EventDispatcher

Input mode that lets you zoom into a view region locally, while preserving the original viewport of the view. The effect is similar to a magnifier that is moved over the view.



Public Properties
 PropertyDefined By
  background : uint
The background color of the magnifier area.
MagnifierInputMode
  border : Stroke
The Stroke for the border which is drawn around the magnifier area.
MagnifierInputMode
 Inheritedcanvas : CanvasComponent
[read-only] The canvas instance this mode is currently installed in or null
AbstractInputMode
  circle : Boolean
Whether the magnifier has a circular shape.
MagnifierInputMode
  enabled : Boolean
Whether this input mode is active.
MagnifierInputMode
  factor : Number
The factor the canvas is magnified by.
MagnifierInputMode
 InheritedinputModeContext : IInputModeContext
[read-only] The context instance this mode is currently installed in or null if this instance is not installed.
AbstractInputMode
 Inheritedinstalled : Boolean
[read-only] Whether this mode is currently installed, i.e if a call to the canvas property will yield a non-null result.
AbstractInputMode
  mouseWheelEnabled : Boolean
Whether the user can adjust size and factor with the mouse wheel.
MagnifierInputMode
  mouseWheelMagnificationFactor : Number
The factor by which the magnification factor is increased when the mouse wheel is used.
MagnifierInputMode
  mouseWheelSizeFactor : Number
The factor by which the magnifier's size is increased when the mouse wheel is used.
MagnifierInputMode
  size : Number
The diameter of the magnifier.
MagnifierInputMode
Public Methods
 MethodDefined By
 Inherited
cancel():void
Cancels the editing of this mode.
AbstractInputMode
 Inherited
dispose():void
Disposes this input mode.
AbstractInputMode
 Inherited
Installs this mode into the canvas of the given context.
AbstractInputMode
 Inherited
stop():Boolean
Tries to stop the editing.
AbstractInputMode
 Inherited
Uninstalls this mode from the canvas.
AbstractInputMode
Protected Methods
 MethodDefined By
  
Creates a new component which is used to display the magnified area.
MagnifierInputMode
 Inherited
AbstractInputMode
 Inherited
AbstractInputMode
 Inherited
AbstractInputMode
 Inherited
AbstractInputMode
 Inherited
initialize():void
Performs one-time initialization of this instance.
AbstractInputMode
  
[override] The implementation of the install() method: installs this mode into the canvas of the given context.
MagnifierInputMode
  
Installs the magnifier component on the canvas.
MagnifierInputMode
 Inherited
invalidate():void
Convenience method for subclass implementations that invalidates the canvasComponent this mode is currently installed in.
AbstractInputMode
  
[override] Implementation of uninstall: Uninstalls this mode from the canvas.
MagnifierInputMode
  
MagnifierInputMode
Events
 Event Summary Defined By
 InheritedDispatched after the input mode was installed.AbstractInputMode
 InheritedDispatched before the input mode will be installed.AbstractInputMode
 InheritedDispatched after the input mode was uninstalled.AbstractInputMode
 InheritedDispatched before the input mode will be uninstalled.AbstractInputMode
Public Constants
 ConstantDefined By
 InheritedINSTALLED : String = installed
[static]
AbstractInputMode
 InheritedINSTALLING : String = installing
[static]
AbstractInputMode
 InheritedUNINSTALLED : String = uninstalled
[static]
AbstractInputMode
 InheritedUNINSTALLING : String = uninstalling
[static]
AbstractInputMode
Property Detail
backgroundproperty
background:uint

The background color of the magnifier area.

The default value is 0xFFFFFF.

This property can be used as the source for data binding.


Implementation
    public function get background():uint
    public function set background(value:uint):void
borderproperty 
border:Stroke

The Stroke for the border which is drawn around the magnifier area.

No border will be drawn if this property is set to null.

The default value is new Stroke(0x808080, 2).

This property can be used as the source for data binding.


Implementation
    public function get border():Stroke
    public function set border(value:Stroke):void
circleproperty 
circle:Boolean

Whether the magnifier has a circular shape.

If set to true the magnifier has a circular shape.

Note that system fonts, i.e. non-embedded fonts, will not be clipped correctly in a circular shape.

The default value is true.


Implementation
    public function get circle():Boolean
    public function set circle(value:Boolean):void
enabledproperty 
enabled:Boolean

Whether this input mode is active.

The default value is true.

This property can be used as the source for data binding.


Implementation
    public function get enabled():Boolean
    public function set enabled(value:Boolean):void
factorproperty 
factor:Number

The factor the canvas is magnified by.

The default value is 2.

This property can be used as the source for data binding.


Implementation
    public function get factor():Number
    public function set factor(value:Number):void
mouseWheelEnabledproperty 
mouseWheelEnabled:Boolean

Whether the user can adjust size and factor with the mouse wheel.

If set to true using the mouse wheel with the shift key held down increases/decreases the magnification factor of the magnifier. Using the mouse wheel with shift and ctrl held down increases/decreases the magnifier's size.

The mouse wheel gestures of the canvas are not affected.

The default value is true.

This property can be used as the source for data binding.


Implementation
    public function get mouseWheelEnabled():Boolean
    public function set mouseWheelEnabled(value:Boolean):void
mouseWheelMagnificationFactorproperty 
mouseWheelMagnificationFactor:Number

The factor by which the magnification factor is increased when the mouse wheel is used.

The default value is 1.1.

This property can be used as the source for data binding.


Implementation
    public function get mouseWheelMagnificationFactor():Number
    public function set mouseWheelMagnificationFactor(value:Number):void
mouseWheelSizeFactorproperty 
mouseWheelSizeFactor:Number

The factor by which the magnifier's size is increased when the mouse wheel is used.

The default value is 1.05.

This property can be used as the source for data binding.


Implementation
    public function get mouseWheelSizeFactor():Number
    public function set mouseWheelSizeFactor(value:Number):void
sizeproperty 
size:Number

The diameter of the magnifier.

The default value is 200.

This property can be used as the source for data binding.


Implementation
    public function get size():Number
    public function set size(value:Number):void
Method Detail
createMagnifierComponent()method
protected function createMagnifierComponent(canvas:CanvasComponent):MagnifierComponent

Creates a new component which is used to display the magnified area.

Parameters

canvas:CanvasComponent

Returns
MagnifierComponent — The new component.
installCore()method 
override protected function installCore(context:IInputModeContext):void

The implementation of the install() method: installs this mode into the canvas of the given context.

Subclasses should override this method and call super.installCore(context), first. One-time initialization should be performed in the initialize method. The install method will call the initialize method the first time this mode gets installed.

Parameters

context:IInputModeContext — The context to use for installation.

installMagnifierComponent()method 
protected function installMagnifierComponent(canvas:CanvasComponent, magnifier:MagnifierComponent):void

Installs the magnifier component on the canvas.

Parameters

canvas:CanvasComponent — The canvas to install the magnifier on.
 
magnifier:MagnifierComponent — The magnifier component to install.

uninstallCore()method 
override protected function uninstallCore(context:IInputModeContext):void

Implementation of uninstall: Uninstalls this mode from the canvas.

Subclasses should always call super.uninstallCore( context ) as the last statement.

Parameters

context:IInputModeContext — The context to remove this mode from. This is the same instance that has been passed to install( IInputModeContext ).

uninstallMagnifierComponent()method 
protected function uninstallMagnifierComponent(canvas:CanvasComponent, magnifier:MagnifierComponent):void

Parameters

canvas:CanvasComponent
 
magnifier:MagnifierComponent