flex-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mamsel...@apache.org
Subject [14/15] git commit: [flex-sdk] [refs/heads/develop] - INTEGRATION https://issues.apache.org/jira/browse/FLEX-33777 Dagrid for mobile - use SDK new MultiBitmapSource.getMultiSource() in MobileGridSkin
Date Fri, 04 Oct 2013 23:03:20 GMT
INTEGRATION https://issues.apache.org/jira/browse/FLEX-33777 Dagrid for mobile
- use SDK new MultiBitmapSource.getMultiSource() in MobileGridSkin


Project: http://git-wip-us.apache.org/repos/asf/flex-sdk/repo
Commit: http://git-wip-us.apache.org/repos/asf/flex-sdk/commit/f775f9b4
Tree: http://git-wip-us.apache.org/repos/asf/flex-sdk/tree/f775f9b4
Diff: http://git-wip-us.apache.org/repos/asf/flex-sdk/diff/f775f9b4

Branch: refs/heads/develop
Commit: f775f9b4af1c1df3ad8bb7aebb93b1c538aad5a6
Parents: d2becdf
Author: mamsellem <maurice.amsellem@systar.com>
Authored: Fri Oct 4 18:30:43 2013 +0200
Committer: mamsellem <maurice.amsellem@systar.com>
Committed: Fri Oct 4 18:30:43 2013 +0200

----------------------------------------------------------------------
 .../src/spark/skins/MobileGridSkin.as           |  6 +-
 .../src/spark/utils/MultiDPIBitmapSourceExt.as  | 69 --------------------
 2 files changed, 3 insertions(+), 72 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flex-sdk/blob/f775f9b4/frameworks/projects/experimental_mobile/src/spark/skins/MobileGridSkin.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/experimental_mobile/src/spark/skins/MobileGridSkin.as b/frameworks/projects/experimental_mobile/src/spark/skins/MobileGridSkin.as
index 35353f8..4956dd5 100644
--- a/frameworks/projects/experimental_mobile/src/spark/skins/MobileGridSkin.as
+++ b/frameworks/projects/experimental_mobile/src/spark/skins/MobileGridSkin.as
@@ -33,7 +33,7 @@ import spark.components.supportClasses.MobileGridHeader;
 import spark.layouts.HorizontalAlign;
 import spark.layouts.VerticalLayout;
 import spark.skins.mobile.supportClasses.MobileSkin;
-import spark.utils.MultiDPIBitmapSourceExt;
+import spark.utils.MultiDPIBitmapSource;
 
 use namespace mx_internal;
 
@@ -72,10 +72,10 @@ public class MobileGridSkin extends MobileSkin
                 minWidth = 100;
                 break;
         }
-        var headerShadowSrc:MultiDPIBitmapSourceExt = new MultiDPIBitmapSourceExt();
+        var headerShadowSrc:MultiDPIBitmapSource = new MultiDPIBitmapSource();
         headerShadowSrc.source320dpi = headerShadowCls320;
         headerShadowSrc.source160dpi = headerShadowCls160;
-        headerShadowCls = Class(headerShadowSrc.getSource(NaN));
+        headerShadowCls = Class(headerShadowSrc.getMultiSource());
     }
 
     override protected function commitCurrentState():void

http://git-wip-us.apache.org/repos/asf/flex-sdk/blob/f775f9b4/frameworks/projects/experimental_mobile/src/spark/utils/MultiDPIBitmapSourceExt.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/experimental_mobile/src/spark/utils/MultiDPIBitmapSourceExt.as
b/frameworks/projects/experimental_mobile/src/spark/utils/MultiDPIBitmapSourceExt.as
deleted file mode 100644
index 0a01f34..0000000
--- a/frameworks/projects/experimental_mobile/src/spark/utils/MultiDPIBitmapSourceExt.as
+++ /dev/null
@@ -1,69 +0,0 @@
-////////////////////////////////////////////////////////////////////////////////
-//
-//  Licensed to the Apache Software Foundation (ASF) under one or more
-//  contributor license agreements.  See the NOTICE file distributed with
-//  this work for additional information regarding copyright ownership.
-//  The ASF licenses this file to You under the Apache License, Version 2.0
-//  (the "License"); you may not use this file except in compliance with
-//  the License.  You may obtain a copy of the License at
-//
-//      http://www.apache.org/licenses/LICENSE-2.0
-//
-//  Unless required by applicable law or agreed to in writing, software
-//  distributed under the License is distributed on an "AS IS" BASIS,
-//  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-//  See the License for the specific language governing permissions and
-//  limitations under the License.
-//
-////////////////////////////////////////////////////////////////////////////////
-package spark.utils
-{
-import mx.core.FlexGlobals;
-import mx.utils.DensityUtil;
-
-//TODO mamsellem move this code to parent class, updates any callers, and remove this class
-
-/**  @private
- * Adds default behavior to its parent class MultiDPIBitmapSource.
- *
- */
-public class MultiDPIBitmapSourceExt extends MultiDPIBitmapSource
-{
-
-    /**
-     *  Select one of the sourceXXXdpi properties based on the given DPI.  This
-     *  function handles the fallback to different sourceXXXdpi properties
-     *  if the given one is null.
-     *  The strategy is to try to choose the next highest
-     *  property if it is not null, then return a lower property if not null, then
-     *  just return null.
-     *  If desiredDPI is NaN or 0, return the sourceXXXdpi for the  runtime DPI .
-     *
-     *  @param The desired DPI.
-     *
-     *  @return One of the sourceXXXdpi properties based on the desired DPI.
-     *
-     *  @langversion 3.0
-     *  @playerversion AIR 3.8
-     *  @productversion Flex 4.11
-     */
-
-    override public function getSource(desiredDPI:Number):Object
-    {
-        if (isNaN(desiredDPI) || (desiredDPI == 0))
-        {
-            var app:Object = FlexGlobals.topLevelApplication;
-            var dpi:Number;
-            if ("runtimeDPI" in app)
-                dpi = app["runtimeDPI"];
-            else
-                dpi = DensityUtil.getRuntimeDPI();
-            return getSource(dpi);
-        }
-        else
-            return super.getSource(desiredDPI);
-    }
-
-
-}
-}


Mime
View raw message