Package | com.yworks.canvas.input |
Class | public class MagnifierInputMode |
Inheritance | MagnifierInputMode AbstractInputMode flash.events.EventDispatcher |
Property | Defined 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 | ||
canvas : 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 | ||
inputModeContext : IInputModeContext [read-only]
The context instance this mode is currently installed in or
null if this instance is not installed. | AbstractInputMode | ||
installed : 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 |
Method | Defined By | ||
---|---|---|---|
Creates a new component which is used to display the magnified area. | MagnifierInputMode | ||
fireInstalled():void | AbstractInputMode | ||
fireInstalling():void | AbstractInputMode | ||
fireUninstalled():void | AbstractInputMode | ||
fireUninstalling():void | AbstractInputMode | ||
initialize():void
Performs one-time initialization of this instance. | AbstractInputMode | ||
installCore(context:IInputModeContext):void [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 | ||
invalidate():void
Convenience method for subclass implementations that invalidates
the canvasComponent this mode is currently installed in. | AbstractInputMode | ||
uninstallCore(context:IInputModeContext):void [override]
Implementation of uninstall: Uninstalls this mode from the canvas. | MagnifierInputMode | ||
MagnifierInputMode |
background | property |
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.
public function get background():uint
public function set background(value:uint):void
border | property |
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.
public function get border():Stroke
public function set border(value:Stroke):void
circle | property |
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
.
public function get circle():Boolean
public function set circle(value:Boolean):void
enabled | property |
enabled:Boolean
Whether this input mode is active.
The default value is true
.
This property can be used as the source for data binding.
public function get enabled():Boolean
public function set enabled(value:Boolean):void
factor | property |
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.
public function get factor():Number
public function set factor(value:Number):void
mouseWheelEnabled | property |
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.
public function get mouseWheelEnabled():Boolean
public function set mouseWheelEnabled(value:Boolean):void
mouseWheelMagnificationFactor | property |
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.
public function get mouseWheelMagnificationFactor():Number
public function set mouseWheelMagnificationFactor(value:Number):void
mouseWheelSizeFactor | property |
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.
public function get mouseWheelSizeFactor():Number
public function set mouseWheelSizeFactor(value:Number):void
size | property |
size:Number
The diameter of the magnifier.
The default value is 200
.
This property can be used as the source for data binding.
public function get size():Number
public function set size(value:Number):void
createMagnifierComponent | () | method |
protected function createMagnifierComponent(canvas:CanvasComponent):MagnifierComponent
Creates a new component which is used to display the magnified area.
Parameters
canvas:CanvasComponent |
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 |