Adobe® Flash® Platform için ActionScript® 3.0 Başvurusu
Ana Sayfa  |  Paket ve Sınıf Listesini Gizle |  Paketler  |  Sınıflar  |  Yenilikler  |  Dizin  |  Ekler  |  Niçin İngilizce?
Filtreler: Sunucudan Veri Alınıyor...
Sunucudan Veri Alınıyor...
mx.core 

RuntimeDPIProvider  - AS3 Flex

Paketmx.core
Sınıfpublic class RuntimeDPIProvider
Miras AlmaRuntimeDPIProvider Inheritance Object

Dil Sürümü: ActionScript 3.0
Ürün Sürümü: Flex 4.5
Çalışma Zamanı Sürümleri: Flash Player 10, AIR 2.5

The RuntimeDPIProvider class provides the default mapping of similar device DPI values into predefined DPI classes. An Application may have its runtimeDPIProvider property set to a subclass of RuntimeDPIProvider to override Flex's default mappings. Overriding Flex's default mappings will cause changes in the Application's automatic scaling behavior.

Overriding Flex's default mappings is usually only necessary for devices that incorrectly report their screenDPI and for devices that may scale better in a different DPI class.

Flex's default mappings are:

160 DPI<200 DPI
240 DPI>=200 DPI and <280 DPI
320 DPI>=280 DPI

Subclasses of RuntimeDPIProvider should only depend on runtime APIs and should not depend on any classes specific to the Flex framework except mx.core.DPIClassification.

Örnekleri görüntüle

İlgili API Öğeleri



Genel Özellikler
 ÖzellikTanımlayan:
 Inheritedconstructor : Object
Belirli bir nesne örneği için sınıf nesnesine veya yapıcı işlevine bir başvuru.
Object
  runtimeDPI : Number
[salt okunur] Returns the runtime DPI of the current device by mapping its flash.system.Capabilities.screenDPI to one of several DPI values in mx.core.DPIClassification.
RuntimeDPIProvider
Genel Yöntemler
 YöntemTanımlayan:
  
Constructor.
RuntimeDPIProvider
 Inherited
Bir nesnenin belirli bir özelliğinin tanımlı olup olmadığını gösterir.
Object
 Inherited
Object sınıfının bir örneğinin parametre olarak belirtilen nesnenin prototip zincirinde olup olmadığını gösterir.
Object
 Inherited
Belirtilen özelliğin bulunup bulunmadığını ve numaralandırılabilir olup olmadığını gösterir.
Object
 Inherited
Dinamik bir özelliğin döngü işlemlerinde kullanılabilirliğini ayarlar.
Object
 Inherited
Bu nesnenin, yerel ayara özel kurallara göre biçimlendirilmiş dize temsilini döndürür.
Object
 Inherited
Belirtilen nesnenin dize olarak temsil edilen halini döndürür.
Object
 Inherited
Belirtilen nesnenin temel değerini döndürür.
Object
Özellik Ayrıntısı

runtimeDPI

özellik
runtimeDPI:Number  [salt okunur]

Dil Sürümü: ActionScript 3.0
Ürün Sürümü: Flex 4.5
Çalışma Zamanı Sürümleri: Flash Player 10, AIR 2.5

Returns the runtime DPI of the current device by mapping its flash.system.Capabilities.screenDPI to one of several DPI values in mx.core.DPIClassification. A number of devices can have slightly different DPI values and Flex maps these into the several DPI classes. Flex uses this method to calculate the current DPI value when an Application authored for a specific DPI is adapted to the current one through scaling.



Uygulama
    public function get runtimeDPI():Number

İlgili API Öğeleri

Yapıcı Ayrıntı

RuntimeDPIProvider

()Yapıcı
public function RuntimeDPIProvider()

Dil Sürümü: ActionScript 3.0
Ürün Sürümü: Flex 4.5
Çalışma Zamanı Sürümleri: Flash Player 10, AIR 2.5

Constructor.

RuntimeDPIProviderApp.mxml
<?xml version="1.0" encoding="utf-8"?>
<s:ViewNavigatorApplication xmlns:fx="http://ns.adobe.com/mxml/2009" 
        xmlns:s="library://ns.adobe.com/flex/spark"
        firstView="views.RuntimeDPIProviderAppView" 
        applicationDPI="160" runtimeDPIProvider="RuntimeDPIProviderExample" >
    <fx:Declarations>
        <!-- Place non-visual elements (e.g., services, value objects) here -->
    </fx:Declarations>
</s:ViewNavigatorApplication>
RuntimeDPIProviderExample.as

package
{
import flash.system.Capabilities;

import mx.core.DPIClassification;
import mx.core.RuntimeDPIProvider;

public class RuntimeDPIProviderExample extends RuntimeDPIProvider
{
    public function RuntimeDPIProviderExample()
    {
    }
    
    override public function get runtimeDPI():Number
    {
        // A tablet reporting an incorrect DPI of 240.
        if (Capabilities.screenDPI == 240 &&
            Capabilities.screenResolutionX == 600 &&
            Capabilities.screenResolutionY == 1024)
        {
            return DPIClassification.DPI_160;
        }
        
        return super.runtimeDPI;
    }
}
}
RuntimeDPIProviderAppView.mxml




[ X ]Niçin İngilizce?
ActionScript 3.0 Başvurusu'ndaki içerik İngilizce görünür

ActionScript 3.0 Başvurusu'nun tüm bölümleri tüm dillere çevrilmemiştir. Bir dil öğesi çevrilmediğinde İngilizce görünür. Örneğin, ga.controls.HelpBox sınıfı hiçbir dile çevrilmez. Bu nedenle, başvurunun Türkçe versiyonunda ga.controls.HelpBox sınıfı İngilizce görünür.