qnx.fuse.ui.display.Image

Image

Properties | Methods | Events


Packageqnx.fuse.ui.display
Classpublic class Image
InheritanceImage Inheritance UIComponent Inheritance flash.display.MovieClip

The Image class displays an image. It can display an image by using a URL to an image, a Bitmap instance or a BitmapData instance.

Class information:
BlackBerry 10 Version:   10.0.0

See also

qnx.fuse.ui.utils.ImageCache



Public Properties

 PropertyDefined By
  bitmapData : BitmapData
Gets or sets the BitmapData of the internal Bitmap.
Image
  cache : ImageCache
Gets or sets the ImageCache object to use to cache the image.
Image
 InheritedcontextActions : Vector.<ActionSet>
Gets or Sets a Vector of ActionSet objects.
UIComponent
 InheritedcontextMultiSelectText : String
Gets or Sets a String to be displayed when showing the Multi Select Context Menu.
UIComponent
 InheritedcurrentTheme : String
[read-only] Returns the current theme this component is styled with.
UIComponent
 InheritedexplicitHeight : Number
[read-only] Returns the explicit height (actual height, in pixels) of the UI component.
UIComponent
 InheritedexplicitWidth : Number
[read-only] Returns the explicit width (actual width, in pixels) of the UI component.
UIComponent
  fixedAspectRatio : Boolean
Gets or sets if the image should maintain its aspect ratio when resized.
Image
  hAlign : String
Specifies the horizontal alignement of the image within the given size of the image.
Image
 Inheritedid : String
The id is a name for the component that can be used in CSS using the # selector.
UIComponent
 InheritedincludeInLayout : Boolean
Specifies whether or not the component should be included in its parent container's layout.
UIComponent
 InheritedlayoutData : Object
Gets or sets the layoutData.
UIComponent
 Inheritedlocale : String
Gets or sets the current locale of the component.
UIComponent
 InheritedminHeight : Number
Gets or sets the minimum preferred height of the control.
UIComponent
 InheritedminWidth : Number
Gets or sets the minimum preferred width of the control.
UIComponent
  pixelSnapping : String
Controls whether or not the Bitmap object is snapped to the nearest pixel.
Image
  smoothing : Boolean
Controls whether or not the bitmap is smoothed when scaled.
Image
 InheritedstyleChildren : Boolean
Allows you to style the children of this component with CSS.
UIComponent
  vAlign : String
Specifies the vertical alignement of the image within the given size of the image.
Image

Protected Properties

 PropertyDefined By
 InheritedaccessibilityImplimentationClass : Class
UIComponent
  cssID : String
[override] [read-only] Returns the CSS ID of the component.
Image
 InheritedexplicitLocale : Boolean
Set to true when the locale property has been set externally.
UIComponent
 InheritedinternalID : String
The Component's Id used for styling.
UIComponent
 InheritedlongPressEnabled : Boolean
Specifies whether the UIComponent can detect a long press.
UIComponent

Public Methods

 MethodDefined By
  
Constructs an Image instance.
Image
 Inherited
Cancels a long press from occuring on the component.
UIComponent
 Inherited
childChanged(resizedChild:DisplayObject = null):Boolean
Notifies the UIComponent that one or more of its children has changed in a manner that may affect this object's layout.
UIComponent
 Inherited
destroy():void
Call this method when you want to have your object collected by the garbage collector.
UIComponent
 Inherited
Returns the CSS selector for the object, composing it from its position in the display hierarchy and an optional ID selector.
UIComponent
 Inherited
Returns the size options for the given control.
UIComponent
 Inherited
Calling this method results in a call to the components validateDisplayList() method before the display list is rendered.
UIComponent
 Inherited
Calling this method results in a call to the components validateProperties() method before the display list is rendered.
UIComponent
 Inherited
measure(availableWidth:Number, availableHeight:Number):LayoutMeasurement
This method calls doMeasure() in order to calculate the preferred size of the control.
UIComponent
 Inherited
setActualSize(w:Number, h:Number):void
Sets the width and height of the object without setting the explicitWidth and explicitHeight.
UIComponent
  
setImage(image:Object):void
Sets the image.
Image
 Inherited
setLayoutBounds(bounds:Rectangle):void
Sets the receiver's size and location to the rectangular area specified by the arguments.
UIComponent
 Inherited
setPosition(x:Number, y:Number):void
Sets the x and y position of the component.
UIComponent
 Inherited
updateDefaultLocale(updateChildren:Boolean = true):void
Updates the locale property to be the same as the locale of the device.
UIComponent
 Inherited
Lets a component that contains text know that it should update its font formats as the font settings have changed.
UIComponent
 Inherited
Validates the display list of the component by calling the updateDisplayList().
UIComponent
 Inherited
Validates the component immediately by calling validateProperties(), validateSizes(), and validateDisplayList() if necessary.
UIComponent
 Inherited
Validates the properties of the component by calling the commitProperties() method.
UIComponent

Protected Methods

 MethodDefined By
 Inherited
allowShowContextMenu(target:IEventDispatcher):Boolean
When the user presses on the component this method is called with the object that dispatched the event.
UIComponent
 Inherited
Process properties of the component.
UIComponent
 Inherited
Process the state of the component.
UIComponent
 Inherited
Style the component after the style has changed.
UIComponent
 Inherited
doMeasure(availableWidth:Number, availableHeight:Number):LayoutMeasurement
Performs a measurement on the control, and returns a LayoutMeasurement instance containing the available width and height within the layout.
UIComponent
 Inherited
excemptFromCSSStyling(target:*, property:String = null):void
Exempts a property on an object from being styled by CSS.
UIComponent
 Inherited
flushCache():void
Invoked as part of parentLayoutChanged.
UIComponent
 Inherited
getStyleApplier():Function
A style applier is a method that gets called every time a property from the stylesheet should be applied to the component.
UIComponent
 Inherited
onAdded():void
Called when the instance is added to the stage.
UIComponent
 Inherited
Is called when a user is no longer long pressing on the component.
UIComponent
 Inherited
Is called when a user long presses on the component.
UIComponent
 Inherited
onRemoved():void
Called when the instance is removed from the stage.
UIComponent
 Inherited
Invalidates the parent's size and display list if includeInLayout property is set to true.
UIComponent
 Inherited
Calling this function will refresh the ContextMenu with whatever actions were set by contextActions.
UIComponent
 Inherited
Shows the context menu if there are contextActions associated with the control.
UIComponent
 Inherited
styleState():void
Style the component after state has changed.
UIComponent
 Inherited
updateDisplayList(unscaledWidth:Number, unscaledHeight:Number):void
Sets the size and position of the children of the component.
UIComponent

Events

 Event Summary Defined By
 InheritedDispatched when an action in the Context Menu is selected.UIComponent
  Dispatched when the image is loaded and ready to be used.Image
 InheritedDispatched when the Context Menu has closed to the DISMISSED state.UIComponent
 InheritedDispatched when the ContextMenu is closing to the DISMISSED state.UIComponent
 InheritedDispatched when the Context Menu has opened to the PEEK or EXPANDED state.UIComponent
 InheritedDispatched when the ContextMenu is opening from the DISMISSED state.UIComponent
  Dispatched when the image cannot be loaded.Image
 InheritedDispatched when the CrossCut multiselect has been canceled.UIComponent

Property Detail

bitmapData


bitmapData:BitmapData

Gets or sets the BitmapData of the internal Bitmap.


Implementation

public function get bitmapData():BitmapData
public function set bitmapData(value:BitmapData):void

cache


cache:ImageCache

Gets or sets the ImageCache object to use to cache the image.


Implementation

public function get cache():ImageCache
public function set cache(value:ImageCache):void

See also

qnx.fuse.ui.utils.ImageCache

cssID


cssID:String  [read-only]
[override]

Returns the CSS ID of the component. The CSS ID is used for identifying the type of component in CSS.

The default value is Image.


Implementation

protected function get cssID():String

fixedAspectRatio


fixedAspectRatio:Boolean

Gets or sets if the image should maintain its aspect ratio when resized.


Implementation

public function get fixedAspectRatio():Boolean
public function set fixedAspectRatio(value:Boolean):void

hAlign


hAlign:String

Specifies the horizontal alignement of the image within the given size of the image.

If the fixedAspectRatio property is set to true the image will be aligned horizontally if there is extra space.

The default value is The default value is Align.CENTER.


Implementation

public function get hAlign():String
public function set hAlign(value:String):void

See also

Align

pixelSnapping


pixelSnapping:String

Controls whether or not the Bitmap object is snapped to the nearest pixel. The PixelSnapping class includes possible values:

  • PixelSnapping.NEVER — No pixel snapping occurs.
  • PixelSnapping.ALWAYS — The image is always snapped to the nearest pixel, independent of transformation.
  • PixelSnapping.AUTO — The image is snapped to the nearest pixel if it is drawn with no rotation or skew and it is drawn at a scale factor of 99.9% to 100.1%. If these conditions are satisfied, the bitmap image is drawn at 100% scale, snapped to the nearest pixel. Internally, this value allows the image to be drawn as fast as possible using the vector renderer.

PixelSnapping values are found in flash.display.PixelSnapping.


Implementation

public function get pixelSnapping():String
public function set pixelSnapping(value:String):void

smoothing


smoothing:Boolean

Controls whether or not the bitmap is smoothed when scaled. If true, the bitmap is smoothed when scaled. If false, the bitmap is not smoothed when scaled.


Implementation

public function get smoothing():Boolean
public function set smoothing(value:Boolean):void

vAlign


vAlign:String

Specifies the vertical alignement of the image within the given size of the image.

If the fixedAspectRatio property is set to true the image will be aligned vertically if there is extra space.

The default value is The default value is Align.CENTER.


Implementation

public function get vAlign():String
public function set vAlign(value:String):void

See also

Align

Constructor Detail

Image()


public function Image()

Constructs an Image instance.

Method Detail

setImage()


public function setImage(image:Object):void

Sets the image. The image parameter can be of type String as a URL to an external image, Bitmap instance, a BitmapData instance or a URLRequest instance.

Parameters

image:Object — The image to be set.

Event Detail

complete


Event Object Type: flash.events.Event
Event.type property = flash.events.Event.COMPLETE

Dispatched when the image is loaded and ready to be used.

ioError


Event Object Type: flash.events.IOErrorEvent
IOErrorEvent.type property = flash.events.IOErrorEvent.IO_ERROR

Dispatched when the image cannot be loaded.





comments powered by Disqus