You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@flex.apache.org by ma...@apache.org on 2013/10/04 01:38:58 UTC
[2/2] git commit: [flex-sdk] [refs/heads/mobileexperimental] -
https://issues.apache.org/jira/browse/FLEX-33777 Dagrid for mobile - clean up
code to prepare integration with SDK (continued) renamed class DensityUtil2
to MobileGridUtil
https://issues.apache.org/jira/browse/FLEX-33777 Dagrid for mobile
- clean up code to prepare integration with SDK (continued)
renamed class DensityUtil2 to MobileGridUtil
Project: http://git-wip-us.apache.org/repos/asf/flex-sdk/repo
Commit: http://git-wip-us.apache.org/repos/asf/flex-sdk/commit/4c4d2dc8
Tree: http://git-wip-us.apache.org/repos/asf/flex-sdk/tree/4c4d2dc8
Diff: http://git-wip-us.apache.org/repos/asf/flex-sdk/diff/4c4d2dc8
Branch: refs/heads/mobileexperimental
Commit: 4c4d2dc8021d0b6db4ff55ea592886cb6b0bc913
Parents: 908829a
Author: mamsellem <ma...@systar.com>
Authored: Fri Oct 4 01:37:57 2013 +0200
Committer: mamsellem <ma...@systar.com>
Committed: Fri Oct 4 01:37:57 2013 +0200
----------------------------------------------------------------------
.../src/spark/utils/DensityUtil2.as | 80 --------------------
1 file changed, 80 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/flex-sdk/blob/4c4d2dc8/frameworks/projects/experimental_mobile/src/spark/utils/DensityUtil2.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/experimental_mobile/src/spark/utils/DensityUtil2.as b/frameworks/projects/experimental_mobile/src/spark/utils/DensityUtil2.as
deleted file mode 100644
index 247c234..0000000
--- a/frameworks/projects/experimental_mobile/src/spark/utils/DensityUtil2.as
+++ /dev/null
@@ -1,80 +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.DPIClassification;
-import mx.core.FlexGlobals;
-import mx.managers.SystemManager;
-
-import spark.components.Application;
-
-//TODO merge with spark.utils.DensityUtil
-
-/**
- * @private
- * Utility class for density computations
- *
- * @langversion 3.0
- * @playerversion AIR 3.8
- * @productversion Flex 4.11
-
- */
-
-
-public class DensityUtil2
-{
-
- private static var _setApplicationDPI:Number = 0;
-
- /** returns the actual value for a value authored for <code>sourceDPI</code>, taking into account any dpi scaling.
- * <ul>
- * <li> If Application.applicationDPI has been set, which means dpi scaling factor is already applied, return the original value.</li>
- * <li> If Application.applicationDPI has not been set, then return scaled value runTimeDPI / sourceDPI </li>
- * </li>
- * @param sourceDPI
- * @return scaled value
- */
- public static function dpiScale(value:Number, sourceDPI:Number = DPIClassification.DPI_160):Number
- {
- var appDPI:Number = getSetApplicationDPI();
- if (isNaN(appDPI))
- {
- var runDPI:Number = FlexGlobals.topLevelApplication.runtimeDPI;
- return value * runDPI / sourceDPI;
- }
- else
- return value; // already scaled
- }
-
- /**
- * returns the applicationDPI that was explicitly set in top level application , or NaN if none */
- private static function getSetApplicationDPI():Number
- {
- if (_setApplicationDPI == 0)
- {
- var application:Application = FlexGlobals.topLevelApplication as Application;
- var sm:SystemManager = application ? application.systemManager as SystemManager : null;
- _setApplicationDPI = sm ? sm.info()["applicationDPI"] : NaN;
- }
- return _setApplicationDPI;
- }
-
-}
-}