You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@flex.apache.org by jh...@apache.org on 2012/04/07 01:39:15 UTC
svn commit: r1310637 [32/45] - in /incubator/flex/whiteboard/jhouser: ./
FXGImage/ FXGImage/Workspace/ FXGImage/Workspace/.metadata/
FXGImage/Workspace/.metadata/.mylyn/
FXGImage/Workspace/.metadata/.mylyn/contexts/
FXGImage/Workspace/.metadata/.plugin...
Added: incubator/flex/whiteboard/jhouser/FXGImage/Workspace/.metadata/.plugins/org.eclipse.core.resources/.history/1b/80b499cb078000111f3892a3be300bbe
URL: http://svn.apache.org/viewvc/incubator/flex/whiteboard/jhouser/FXGImage/Workspace/.metadata/.plugins/org.eclipse.core.resources/.history/1b/80b499cb078000111f3892a3be300bbe?rev=1310637&view=auto
==============================================================================
--- incubator/flex/whiteboard/jhouser/FXGImage/Workspace/.metadata/.plugins/org.eclipse.core.resources/.history/1b/80b499cb078000111f3892a3be300bbe (added)
+++ incubator/flex/whiteboard/jhouser/FXGImage/Workspace/.metadata/.plugins/org.eclipse.core.resources/.history/1b/80b499cb078000111f3892a3be300bbe Fri Apr 6 23:38:20 2012
@@ -0,0 +1,142 @@
+<?xml version="1.0" encoding="utf-8"?>
+<s:Application xmlns:fx="http://ns.adobe.com/mxml/2009"
+ xmlns:s="library://ns.adobe.com/flex/spark"
+ xmlns:mx="library://ns.adobe.com/flex/mx" minWidth="955" minHeight="600" xmlns:local="*"
+ xmlns:utils="org.apache.utils.*">
+<!--
+////////////////////////////////////////////////////////////////////////////////
+//
+// 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.
+//
+////////////////////////////////////////////////////////////////////////////////
+-->
+
+
+ <fx:Script>
+ <![CDATA[
+ protected function onXPositionSliderChange(event:Event):void
+ {
+ flexLogo.x = xPositionSlider.value;
+ }
+
+ protected function onYPositionSliderChange(event:Event):void
+ {
+ flexLogo.y = yPositionSlider.value;
+ }
+
+ protected function onHeightSliderChange(event:Event):void
+ {
+ flexLogo.height = this.heightSlider.value;
+ }
+
+ protected function onWidthSliderChange(event:Event):void
+ {
+ flexLogo.width = this.widthSlider.value;
+ }
+
+ protected function onYOffsetSliderChange(event:Event):void
+ {
+ flexLogo.yOffset = this.yOffSetSlider.value;
+ }
+
+ protected function onXOffsetSliderChange(event:Event):void
+ {
+ flexLogo.xOffset = this.xOffSetSlider.value;
+ }
+
+ protected function onHeightIncrementSliderChange(event:Event):void
+ {
+ flexLogo.heightIncrement = this.heightIncrementSlider.value;
+ }
+
+ protected function onWidthIncrementSliderChange(event:Event):void
+ {
+ flexLogo.widthIncrement = this.widthIncrementSlider.value;
+ }
+
+ protected function onReset(event:MouseEvent):void
+ {
+ this.xPositionSlider.value = 0;
+ this.onXPositionSliderChange(event);
+ this.yPositionSlider.value = 0;
+ this.onYPositionSliderChange(event);
+
+ this.xOffSetSlider.value = 0;
+ this.onXOffsetSliderChange(event);
+ this.yOffSetSlider.value = 0;
+ this.onYOffsetSliderChange(event);
+
+ this.heightSlider.value = 168;
+ this.onHeightSliderChange(event);
+ this.widthSlider.value = 283;
+ this.onWidthSliderChange(event);
+
+ this.widthIncrementSlider.value = 0;
+ this.onWidthIncrementSliderChange(event);
+ this.heightIncrementSlider.value = 0;
+ this.onHeightIncrementSliderChange(event);
+ }
+
+ ]]>
+ </fx:Script>
+
+ <fx:Declarations>
+ <!-- Place non-visual elements (e.g., services, value objects) here -->
+ </fx:Declarations>
+
+
+ <s:HGroup width="100%" height="100%">
+ <s:Form>
+ <s:FormItem label="x" >
+ <s:HSlider id="xPositionSlider" value="0" minimum="0" maximum="{imageGroup.width}" change="onXPositionSliderChange(event)" />
+ </s:FormItem>
+ <s:FormItem label="y" >
+ <s:HSlider id="yPositionSlider" value="0" minimum="0" maximum="{imageGroup.height}" change="onYPositionSliderChange(event)"/>
+ </s:FormItem>
+ <s:FormItem label="xOffset" >
+ <s:HSlider id="xOffSetSlider" value="0" minimum="-100" maximum="100" change="onXOffsetSliderChange(event)"/>
+ </s:FormItem>
+ <s:FormItem label="yOffset" >
+ <s:HSlider id="yOffSetSlider" value="0" minimum="-100" maximum="100" change="onYOffsetSliderChange(event)"/>
+ </s:FormItem>
+ <s:FormItem label="width" >
+ <s:HSlider id="widthSlider" value="283" minimum="0" maximum="{imageGroup.width}" change="onWidthSliderChange(event)" />
+ </s:FormItem>
+ <s:FormItem label="height" >
+ <s:HSlider id="heightSlider" value="168" minimum="0" maximum="{imageGroup.height}" change="onHeightSliderChange(event)"/>
+ </s:FormItem>
+ <s:FormItem label="width Increment" >
+ <s:HSlider id="widthIncrementSlider" value="0" minimum="-100" maximum="100" change="onWidthIncrementSliderChange(event)" />
+ </s:FormItem>
+ <s:FormItem label="heightIncrement" >
+ <s:HSlider id="heightIncrementSlider" value="0" minimum="-100" maximum="100" change="onHeightIncrementSliderChange(event)"/>
+ </s:FormItem>
+
+ <s:FormItem >
+ <s:Button label="reset" click="onReset(event)" />
+ </s:FormItem>
+ </s:Form>
+
+
+ <s:Group width="100%" height="100%" id="imageGroup">
+ <utils:FXGImage source="org.apache.assets.apacheLogo.ApacheFlexLogo" id="flexLogo" width="283" height="168" />
+ </s:Group>
+
+ </s:HGroup>
+
+
+
+</s:Application>
Propchange: incubator/flex/whiteboard/jhouser/FXGImage/Workspace/.metadata/.plugins/org.eclipse.core.resources/.history/1b/80b499cb078000111f3892a3be300bbe
------------------------------------------------------------------------------
svn:eol-style = native
Added: incubator/flex/whiteboard/jhouser/FXGImage/Workspace/.metadata/.plugins/org.eclipse.core.resources/.history/25/20d14ece01800011188aed2ccaf77e02
URL: http://svn.apache.org/viewvc/incubator/flex/whiteboard/jhouser/FXGImage/Workspace/.metadata/.plugins/org.eclipse.core.resources/.history/25/20d14ece01800011188aed2ccaf77e02?rev=1310637&view=auto
==============================================================================
--- incubator/flex/whiteboard/jhouser/FXGImage/Workspace/.metadata/.plugins/org.eclipse.core.resources/.history/25/20d14ece01800011188aed2ccaf77e02 (added)
+++ incubator/flex/whiteboard/jhouser/FXGImage/Workspace/.metadata/.plugins/org.eclipse.core.resources/.history/25/20d14ece01800011188aed2ccaf77e02 Fri Apr 6 23:38:20 2012
@@ -0,0 +1,109 @@
+<?xml version="1.0" encoding="utf-8"?>
+<s:Application xmlns:fx="http://ns.adobe.com/mxml/2009"
+ xmlns:s="library://ns.adobe.com/flex/spark"
+ xmlns:mx="library://ns.adobe.com/flex/mx" minWidth="955" minHeight="600" xmlns:local="*"
+ xmlns:utils="org.apache.utils.*">
+
+ <fx:Script>
+ <![CDATA[
+ protected function onXPositionSliderChange(event:Event):void
+ {
+ flexLogo.x = xPositionSlider.value;
+ }
+
+ protected function onYPositionSliderChange(event:Event):void
+ {
+ flexLogo.y = yPositionSlider.value;
+ }
+
+ protected function onHeightSliderChange(event:Event):void
+ {
+ flexLogo.height = this.heightSlider.value;
+ }
+
+ protected function onWidthSliderChange(event:Event):void
+ {
+ flexLogo.width = this.widthSlider.value;
+ }
+
+ protected function onYOffsetChange(event:Event):void
+ {
+ flexLogo.yOffset = this.yOffSetSlider.value;
+ }
+
+ protected function onXOffsetChange(event:Event):void
+ {
+ flexLogo.xOffset = this.xOffSetSlider.value;
+ }
+
+ protected function onHeightIncrementSliderChange(event:Event):void
+ {
+ flexLogo.heightIncrement = this.heightIncrementSlider.value;
+ }
+
+ protected function onWidthIncrementSliderChange(event:Event):void
+ {
+ flexLogo.widthIncrement = this.widthIncrementSlider.value;
+ }
+
+ protected function onReset(event:MouseEvent):void
+ {
+ // a fake change event
+ var event :Event = new Event();
+
+ this.xPositionSlider.value = 0;
+ this.onXPositionSliderChange(event);
+ this.yPositionSlider.value = 0;
+ this.onYPositionSliderChange(event);
+ }
+
+ ]]>
+ </fx:Script>
+
+ <fx:Declarations>
+ <!-- Place non-visual elements (e.g., services, value objects) here -->
+ </fx:Declarations>
+
+
+ <s:HGroup width="100%" height="100%">
+ <s:Form>
+ <s:FormItem label="x" >
+ <s:HSlider id="xPositionSlider" value="0" minimum="0" maximum="{imageGroup.width}" change="onXPositionSliderChange(event)" />
+ </s:FormItem>
+ <s:FormItem label="y" >
+ <s:HSlider id="yPositionSlider" value="0" minimum="0" maximum="{imageGroup.height}" change="onYPositionSliderChange(event)"/>
+ </s:FormItem>
+ <s:FormItem label="xOffset" >
+ <s:HSlider id="xOffSetSlider" value="0" minimum="-100" maximum="100" change="onXOffsetChange(event)"/>
+ </s:FormItem>
+ <s:FormItem label="yOffset" >
+ <s:HSlider id="yOffSetSlider" value="0" minimum="-100" maximum="100" change="onYOffsetChange(event)"/>
+ </s:FormItem>
+ <s:FormItem label="width" >
+ <s:HSlider id="widthSlider" value="0" minimum="0" maximum="{imageGroup.width}" change="onWidthSliderChange(event)" />
+ </s:FormItem>
+ <s:FormItem label="height" >
+ <s:HSlider id="heightSlider" value="0" minimum="0" maximum="{imageGroup.height}" change="onHeightSliderChange(event)"/>
+ </s:FormItem>
+ <s:FormItem label="width Increment" >
+ <s:HSlider id="widthIncrementSlider" value="0" minimum="-100" maximum="100" change="onWidthIncrementSliderChange(event)" />
+ </s:FormItem>
+ <s:FormItem label="heightIncrement" >
+ <s:HSlider id="heightIncrementSlider" value="0" minimum="-100" maximum="100" change="onHeightIncrementSliderChange(event)"/>
+ </s:FormItem>
+
+ <s:FormItem >
+ <s:Button label="reset" click="onReset(event)" />
+ </s:FormItem>
+ </s:Form>
+
+
+ <s:Group width="100%" height="100%" id="imageGroup">
+ <utils:FXGImage source="org.apache.assets.apacheLogo.ApacheFlexLogo" id="flexLogo" width="283" height="168" />
+ </s:Group>
+
+ </s:HGroup>
+
+
+
+</s:Application>
Propchange: incubator/flex/whiteboard/jhouser/FXGImage/Workspace/.metadata/.plugins/org.eclipse.core.resources/.history/25/20d14ece01800011188aed2ccaf77e02
------------------------------------------------------------------------------
svn:eol-style = native
Added: incubator/flex/whiteboard/jhouser/FXGImage/Workspace/.metadata/.plugins/org.eclipse.core.resources/.history/2c/90b93dab00800011188aed2ccaf77e02
URL: http://svn.apache.org/viewvc/incubator/flex/whiteboard/jhouser/FXGImage/Workspace/.metadata/.plugins/org.eclipse.core.resources/.history/2c/90b93dab00800011188aed2ccaf77e02?rev=1310637&view=auto
==============================================================================
--- incubator/flex/whiteboard/jhouser/FXGImage/Workspace/.metadata/.plugins/org.eclipse.core.resources/.history/2c/90b93dab00800011188aed2ccaf77e02 (added)
+++ incubator/flex/whiteboard/jhouser/FXGImage/Workspace/.metadata/.plugins/org.eclipse.core.resources/.history/2c/90b93dab00800011188aed2ccaf77e02 Fri Apr 6 23:38:20 2012
@@ -0,0 +1,93 @@
+<?xml version="1.0" encoding="utf-8"?>
+<s:Application xmlns:fx="http://ns.adobe.com/mxml/2009"
+ xmlns:s="library://ns.adobe.com/flex/spark"
+ xmlns:mx="library://ns.adobe.com/flex/mx" minWidth="955" minHeight="600" xmlns:local="*"
+ xmlns:utils="org.apache.utils.*">
+
+ <fx:Script>
+ <![CDATA[
+ protected function onXPositionChange(event:Event):void
+ {
+ flexLogo.x = xPosition.value;
+ }
+
+ protected function onYPositionChange(event:Event):void
+ {
+ flexLogo.y = yPosition.value;
+ }
+
+ protected function onHeightSliderChange(event:Event):void
+ {
+ flexLogo.height = this.heightSlider.value;
+ }
+
+ protected function onWidthSliderChange(event:Event):void
+ {
+ flexLogo.width = this.widthSlider.value;
+ }
+
+
+ protected function button1_clickHandler(event:MouseEvent):void
+ {
+ // TODO Auto-generated method stub
+ trace(flexLogo.width);
+ trace(flexLogo.height);
+ trace(imageGroup.width);
+ trace(imageGroup.height);
+ }
+
+
+ protected function onYOffsetChange(event:Event):void
+ {
+ flexLogo.YOffset = this.yOffSetSlider.value;
+ }
+
+ protected function onXOffsetChange(event:Event):void
+ {
+ flexLogo.XOffset = this.xOffSetSlider.value;
+ }
+
+ ]]>
+ </fx:Script>
+
+ <fx:Declarations>
+ <!-- Place non-visual elements (e.g., services, value objects) here -->
+ </fx:Declarations>
+
+
+ <s:HGroup width="100%" height="100%">
+ <s:Form>
+ <s:FormItem label="x" >
+ <s:HSlider id="xPosition" value="0" minimum="0" maximum="{imageGroup.width}" change="onXPositionChange(event)" />
+ </s:FormItem>
+ <s:FormItem label="y" >
+ <s:HSlider id="yPosition" value="0" minimum="0" maximum="{imageGroup.height}" change="onYPositionChange(event)"/>
+ </s:FormItem>
+ <s:FormItem label="width" >
+ <s:HSlider id="widthSlider" value="0" minimum="0" maximum="{imageGroup.width}" change="onWidthSliderChange(event)" />
+ </s:FormItem>
+ <s:FormItem label="height" >
+ <s:HSlider id="heightSlider" value="0" minimum="0" maximum="{imageGroup.height}" change="onHeightSliderChange(event)"/>
+ </s:FormItem>
+ <s:FormItem label="xOffset" >
+ <s:HSlider id="xOffSetSlider" value="0" minimum="-100" maximum="100" change="onXOffsetChange(event)"/>
+ </s:FormItem>
+ <s:FormItem label="yOffset" >
+ <s:HSlider id="yOffSetSlider" value="0" minimum="-100" maximum="100" change="onYOffsetChange(event)"/>
+ </s:FormItem>
+
+<!-- <s:FormItem >
+ <s:Button click="button1_clickHandler(event)" />
+ </s:FormItem>-->
+ </s:Form>
+
+
+ <s:Group width="100%" height="100%" id="imageGroup">
+ <utils:FXGImage source="org.apache.assets.apacheLogo.ApacheFlexLogo" id="flexLogo" />
+ </s:Group>
+
+ </s:HGroup>
+
+
+
+</s:Application>
Propchange: incubator/flex/whiteboard/jhouser/FXGImage/Workspace/.metadata/.plugins/org.eclipse.core.resources/.history/2c/90b93dab00800011188aed2ccaf77e02
------------------------------------------------------------------------------
svn:eol-style = native
Added: incubator/flex/whiteboard/jhouser/FXGImage/Workspace/.metadata/.plugins/org.eclipse.core.resources/.history/36/80eacb4ef47f0011188aed2ccaf77e02
URL: http://svn.apache.org/viewvc/incubator/flex/whiteboard/jhouser/FXGImage/Workspace/.metadata/.plugins/org.eclipse.core.resources/.history/36/80eacb4ef47f0011188aed2ccaf77e02?rev=1310637&view=auto
==============================================================================
--- incubator/flex/whiteboard/jhouser/FXGImage/Workspace/.metadata/.plugins/org.eclipse.core.resources/.history/36/80eacb4ef47f0011188aed2ccaf77e02 (added)
+++ incubator/flex/whiteboard/jhouser/FXGImage/Workspace/.metadata/.plugins/org.eclipse.core.resources/.history/36/80eacb4ef47f0011188aed2ccaf77e02 Fri Apr 6 23:38:20 2012
@@ -0,0 +1,21 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<actionScriptProperties analytics="false" mainApplicationPath="FXGImageLibrary.as" projectUUID="4f3232a9-c281-4f31-8248-fbd24b38377a" version="10">
+ <compiler additionalCompilerArguments="-locale en_US" autoRSLOrdering="true" copyDependentFiles="false" flexSDK="Flex 4.6.0" fteInMXComponents="false" generateAccessible="false" htmlExpressInstall="true" htmlGenerate="false" htmlHistoryManagement="false" htmlPlayerVersionCheck="true" includeNetmonSwc="false" outputFolderPath="bin" removeUnusedRSL="true" sourceFolderPath="src" strict="true" targetPlayerVersion="0.0.0" useApolloConfig="false" useDebugRSLSwfs="true" verifyDigests="true" warn="true">
+ <compilerSourcePath/>
+ <libraryPath defaultLinkType="0">
+ <libraryPathEntry kind="4" path="">
+ <excludedEntries>
+ <libraryPathEntry kind="3" linkType="1" path="${PROJECT_FRAMEWORKS}/libs/flex.swc" useDefaultLinkType="false"/>
+ <libraryPathEntry kind="3" linkType="1" path="${PROJECT_FRAMEWORKS}/libs/core.swc" useDefaultLinkType="false"/>
+ </excludedEntries>
+ </libraryPathEntry>
+ </libraryPath>
+ <sourceAttachmentPath/>
+ </compiler>
+ <applications>
+ <application path="FXGImageLibrary.as"/>
+ </applications>
+ <modules/>
+ <buildCSSFiles/>
+ <flashCatalyst validateFlashCatalystCompatibility="false"/>
+</actionScriptProperties>
Propchange: incubator/flex/whiteboard/jhouser/FXGImage/Workspace/.metadata/.plugins/org.eclipse.core.resources/.history/36/80eacb4ef47f0011188aed2ccaf77e02
------------------------------------------------------------------------------
svn:eol-style = native
Added: incubator/flex/whiteboard/jhouser/FXGImage/Workspace/.metadata/.plugins/org.eclipse.core.resources/.history/36/a0be1e3602800011188aed2ccaf77e02
URL: http://svn.apache.org/viewvc/incubator/flex/whiteboard/jhouser/FXGImage/Workspace/.metadata/.plugins/org.eclipse.core.resources/.history/36/a0be1e3602800011188aed2ccaf77e02?rev=1310637&view=auto
==============================================================================
--- incubator/flex/whiteboard/jhouser/FXGImage/Workspace/.metadata/.plugins/org.eclipse.core.resources/.history/36/a0be1e3602800011188aed2ccaf77e02 (added)
+++ incubator/flex/whiteboard/jhouser/FXGImage/Workspace/.metadata/.plugins/org.eclipse.core.resources/.history/36/a0be1e3602800011188aed2ccaf77e02 Fri Apr 6 23:38:20 2012
@@ -0,0 +1,110 @@
+<?xml version="1.0" encoding="utf-8"?>
+<s:Application xmlns:fx="http://ns.adobe.com/mxml/2009"
+ xmlns:s="library://ns.adobe.com/flex/spark"
+ xmlns:mx="library://ns.adobe.com/flex/mx" minWidth="955" minHeight="600" xmlns:local="*"
+ xmlns:utils="org.apache.utils.*">
+
+ <fx:Script>
+ <![CDATA[
+ protected function onXPositionSliderChange(event:Event):void
+ {
+ flexLogo.x = xPositionSlider.value;
+ }
+
+ protected function onYPositionSliderChange(event:Event):void
+ {
+ flexLogo.y = yPositionSlider.value;
+ }
+
+ protected function onHeightSliderChange(event:Event):void
+ {
+ flexLogo.height = this.heightSlider.value;
+ }
+
+ protected function onWidthSliderChange(event:Event):void
+ {
+ flexLogo.width = this.widthSlider.value;
+ }
+
+ protected function onYOffsetChange(event:Event):void
+ {
+ flexLogo.yOffset = this.yOffSetSlider.value;
+ }
+
+ protected function onXOffsetChange(event:Event):void
+ {
+ flexLogo.xOffset = this.xOffSetSlider.value;
+ }
+
+ protected function onHeightIncrementSliderChange(event:Event):void
+ {
+ flexLogo.heightIncrement = this.heightIncrementSlider.value;
+ }
+
+ protected function onWidthIncrementSliderChange(event:Event):void
+ {
+ flexLogo.widthIncrement = this.widthIncrementSlider.value;
+ }
+
+ protected function onReset(event:MouseEvent):void
+ {
+ this.xPositionSlider.value = 0;
+ this.onXPositionSliderChange(event);
+ this.yPositionSlider.value = 0;
+ this.onYPositionSliderChange(event);
+ this.xOffSetSlider.value = 0;
+ this.onXOffsetChange(event);
+ this.yOffSetSlider.value = 0;
+ this.onYOffsetChange(event);
+ }
+
+ ]]>
+ </fx:Script>
+
+ <fx:Declarations>
+ <!-- Place non-visual elements (e.g., services, value objects) here -->
+ </fx:Declarations>
+
+
+ <s:HGroup width="100%" height="100%">
+ <s:Form>
+ <s:FormItem label="x" >
+ <s:HSlider id="xPositionSlider" value="0" minimum="0" maximum="{imageGroup.width}" change="onXPositionSliderChange(event)" />
+ </s:FormItem>
+ <s:FormItem label="y" >
+ <s:HSlider id="yPositionSlider" value="0" minimum="0" maximum="{imageGroup.height}" change="onYPositionSliderChange(event)"/>
+ </s:FormItem>
+ <s:FormItem label="xOffset" >
+ <s:HSlider id="xOffSetSlider" value="0" minimum="-100" maximum="100" change="onXOffsetChange(event)"/>
+ </s:FormItem>
+ <s:FormItem label="yOffset" >
+ <s:HSlider id="yOffSetSlider" value="0" minimum="-100" maximum="100" change="onYOffsetChange(event)"/>
+ </s:FormItem>
+ <s:FormItem label="width" >
+ <s:HSlider id="widthSlider" value="0" minimum="0" maximum="{imageGroup.width}" change="onWidthSliderChange(event)" />
+ </s:FormItem>
+ <s:FormItem label="height" >
+ <s:HSlider id="heightSlider" value="0" minimum="0" maximum="{imageGroup.height}" change="onHeightSliderChange(event)"/>
+ </s:FormItem>
+ <s:FormItem label="width Increment" >
+ <s:HSlider id="widthIncrementSlider" value="0" minimum="-100" maximum="100" change="onWidthIncrementSliderChange(event)" />
+ </s:FormItem>
+ <s:FormItem label="heightIncrement" >
+ <s:HSlider id="heightIncrementSlider" value="0" minimum="-100" maximum="100" change="onHeightIncrementSliderChange(event)"/>
+ </s:FormItem>
+
+ <s:FormItem >
+ <s:Button label="reset" click="onReset(event)" />
+ </s:FormItem>
+ </s:Form>
+
+
+ <s:Group width="100%" height="100%" id="imageGroup">
+ <utils:FXGImage source="org.apache.assets.apacheLogo.ApacheFlexLogo" id="flexLogo" width="283" height="168" />
+ </s:Group>
+
+ </s:HGroup>
+
+
+
+</s:Application>
Propchange: incubator/flex/whiteboard/jhouser/FXGImage/Workspace/.metadata/.plugins/org.eclipse.core.resources/.history/36/a0be1e3602800011188aed2ccaf77e02
------------------------------------------------------------------------------
svn:eol-style = native
Added: incubator/flex/whiteboard/jhouser/FXGImage/Workspace/.metadata/.plugins/org.eclipse.core.resources/.history/49/00dbf819f57f0011188aed2ccaf77e02
URL: http://svn.apache.org/viewvc/incubator/flex/whiteboard/jhouser/FXGImage/Workspace/.metadata/.plugins/org.eclipse.core.resources/.history/49/00dbf819f57f0011188aed2ccaf77e02?rev=1310637&view=auto
==============================================================================
--- incubator/flex/whiteboard/jhouser/FXGImage/Workspace/.metadata/.plugins/org.eclipse.core.resources/.history/49/00dbf819f57f0011188aed2ccaf77e02 (added)
+++ incubator/flex/whiteboard/jhouser/FXGImage/Workspace/.metadata/.plugins/org.eclipse.core.resources/.history/49/00dbf819f57f0011188aed2ccaf77e02 Fri Apr 6 23:38:20 2012
@@ -0,0 +1,13 @@
+<?xml version="1.0" encoding="utf-8"?>
+<s:Application xmlns:fx="http://ns.adobe.com/mxml/2009"
+ xmlns:s="library://ns.adobe.com/flex/spark"
+ xmlns:mx="library://ns.adobe.com/flex/mx" minWidth="955" minHeight="600" xmlns:local="*"
+ xmlns:utils="org.apache.utils.*">
+ <fx:Declarations>
+ <!-- Place non-visual elements (e.g., services, value objects) here -->
+ </fx:Declarations>
+
+ <utils:FXGImage source="org.apache.assets.ApacheLogo.ApacheFlexLogo" />
+
+
+</s:Application>
Propchange: incubator/flex/whiteboard/jhouser/FXGImage/Workspace/.metadata/.plugins/org.eclipse.core.resources/.history/49/00dbf819f57f0011188aed2ccaf77e02
------------------------------------------------------------------------------
svn:eol-style = native
Added: incubator/flex/whiteboard/jhouser/FXGImage/Workspace/.metadata/.plugins/org.eclipse.core.resources/.history/4a/103dbb6f01800011188aed2ccaf77e02
URL: http://svn.apache.org/viewvc/incubator/flex/whiteboard/jhouser/FXGImage/Workspace/.metadata/.plugins/org.eclipse.core.resources/.history/4a/103dbb6f01800011188aed2ccaf77e02?rev=1310637&view=auto
==============================================================================
--- incubator/flex/whiteboard/jhouser/FXGImage/Workspace/.metadata/.plugins/org.eclipse.core.resources/.history/4a/103dbb6f01800011188aed2ccaf77e02 (added)
+++ incubator/flex/whiteboard/jhouser/FXGImage/Workspace/.metadata/.plugins/org.eclipse.core.resources/.history/4a/103dbb6f01800011188aed2ccaf77e02 Fri Apr 6 23:38:20 2012
@@ -0,0 +1,202 @@
+package org.apache.utils
+{
+ import flash.display.DisplayObject;
+ import flash.display.Sprite;
+
+ import mx.core.UIComponent;
+
+ public class FXGImage extends UIComponent
+ {
+ public function FXGImage(source:Class = null)
+ {
+ if(source){
+ this.source = source;
+ }
+ super();
+ }
+
+ private var _source : Class;
+
+ /**
+ * @private
+ * This property is used to tell if the source has changed (or not).
+ */
+ protected var sourceChanged :Boolean = true;
+
+ /**
+ * This property will be used to reference the class we want to use for the display.
+ * Only tested with FXG files; but in theory any class name should work, such as an embedded library symbol from a Flash Pro SWF.
+ */
+ public function get source():Class
+ {
+ return _source;
+ }
+
+ public function set source(value:Class):void
+ {
+ _source = value;
+ sourceChanged = true;
+ this.commitProperties();
+ }
+
+
+ /**
+ * This will contain the instance created from the source.
+ */
+ protected var imageInstance : DisplayObject;
+
+
+ private var _xOffset :int = 0;
+
+ /**
+ * If we want to off set the X position of the asset; you can use this.
+ *
+ * @default 0
+ */
+ public function get xOffset():int
+ {
+ return _xOffset;
+ }
+
+ /**
+ * @private
+ */
+ public function set xOffset(value:int):void
+ {
+ _xOffset = value;
+ this.invalidateDisplayList();
+ }
+
+
+ private var _yOffset :int = 0;
+
+ /**
+ * If we want to off set the Y position of the asset; you can use this.
+ *
+ * @default 0
+ */
+ public function get yOffset():int
+ {
+ return _yOffset;
+ }
+
+ /**
+ * @private
+ */
+ public function set yOffset(value:int):void
+ {
+ _yOffset = value;
+ this.invalidateDisplayList();
+ }
+
+
+ private var _heightIncrement :int = 0;
+
+ /**
+ * If we want to add a value to the asset's default height; you can use this property. The default is zero, which means the asset
+ * will be sized based on the height and width of this component.
+ *
+ * @default 0
+ */
+ public function get heightIncrement():int
+ {
+ return _heightIncrement;
+ }
+
+ /**
+ * @private
+ */
+ public function set heightIncrement(value:int):void
+ {
+ _heightIncrement = value;
+ this.invalidateDisplayList();
+ }
+
+
+ private var _widthIncrement :int = 0;
+
+ /**
+ * If we want to add a value to the asset's default width; you can use this property. The default is zero, which means the asset
+ * will be sized based on the height and width of this component.
+ *
+ * @default 0
+ */
+ public function get widthIncrement():int
+ {
+ return _widthIncrement;
+ this.invalidateDisplayList();
+ }
+
+ /**
+ * @private
+ */
+ public function set widthIncrement(value:int):void
+ {
+ _widthIncrement = value;
+ }
+
+
+ /**
+ * @private
+ */
+ override protected function createChildren():void{
+ super.createChildren();
+
+ // if the source has changed we want to create, or recreate, the image instance
+ if(this.sourceChanged){
+ // if the instance has a value, then delete it
+ if(this.imageInstance){
+ this.removeChild(this.imageInstance);
+ this.imageInstance = null;
+ }
+
+ // if we have a source value; create the source
+ if(this.source){
+ this.imageInstance = new source();
+ this.imageInstance.x = 0 + xOffset;
+ this.imageInstance.y = 0 + yOffset;
+ this.addChild(this.imageInstance);
+ }
+ this.sourceChanged = false;
+
+ }
+ }
+
+ /**
+ * @private
+ */
+ override protected function commitProperties():void{
+ super.commitProperties();
+
+ if(this.sourceChanged){
+ // if the source changed re-created it; which is done in createChildren();
+ this.createChildren();
+ }
+ }
+
+ /**
+ * @private
+ */
+ override protected function updateDisplayList(unscaledWidth:Number, unscaledHeight:Number):void{
+ super.updateDisplayList(unscaledWidth, unscaledHeight);
+
+ // size the element.
+ // I don't remember why I Wrote the code to check for unscaledHeight and unscaledWidth being 0
+ if(unscaledHeight != 0){
+ this.imageInstance.height = unscaledHeight + this.heightIncrement;
+ }
+ if(unscaledWidth != 0){
+ this.imageInstance.width = unscaledWidth + this.widthIncrement;
+ }
+
+ // position the element
+ this.imageInstance.x = 0 + xOffset;
+ this.imageInstance.y = 0 + yOffset;
+
+ trace(imageInstance.width);
+ trace(imageInstance.height);
+
+ }
+
+ }
+}
\ No newline at end of file
Propchange: incubator/flex/whiteboard/jhouser/FXGImage/Workspace/.metadata/.plugins/org.eclipse.core.resources/.history/4a/103dbb6f01800011188aed2ccaf77e02
------------------------------------------------------------------------------
svn:eol-style = native
Added: incubator/flex/whiteboard/jhouser/FXGImage/Workspace/.metadata/.plugins/org.eclipse.core.resources/.history/4e/e05362c1f47f0011188aed2ccaf77e02
URL: http://svn.apache.org/viewvc/incubator/flex/whiteboard/jhouser/FXGImage/Workspace/.metadata/.plugins/org.eclipse.core.resources/.history/4e/e05362c1f47f0011188aed2ccaf77e02?rev=1310637&view=auto
==============================================================================
--- incubator/flex/whiteboard/jhouser/FXGImage/Workspace/.metadata/.plugins/org.eclipse.core.resources/.history/4e/e05362c1f47f0011188aed2ccaf77e02 (added)
+++ incubator/flex/whiteboard/jhouser/FXGImage/Workspace/.metadata/.plugins/org.eclipse.core.resources/.history/4e/e05362c1f47f0011188aed2ccaf77e02 Fri Apr 6 23:38:20 2012
@@ -0,0 +1,22 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<actionScriptProperties analytics="false" mainApplicationPath="FXGImageSample.mxml" projectUUID="44e95d29-e099-470a-a9a7-e3ca75de4831" version="10">
+ <compiler additionalCompilerArguments="-locale en_US" autoRSLOrdering="true" copyDependentFiles="true" flexSDK="Flex 4.6.0" fteInMXComponents="false" generateAccessible="true" htmlExpressInstall="true" htmlGenerate="true" htmlHistoryManagement="true" htmlPlayerVersionCheck="true" includeNetmonSwc="false" outputFolderPath="bin-debug" removeUnusedRSL="true" sourceFolderPath="src" strict="true" targetPlayerVersion="0.0.0" useApolloConfig="false" useDebugRSLSwfs="true" verifyDigests="true" warn="true">
+ <compilerSourcePath/>
+ <libraryPath defaultLinkType="0">
+ <libraryPathEntry kind="4" path="">
+ <excludedEntries>
+ <libraryPathEntry kind="3" linkType="1" path="${PROJECT_FRAMEWORKS}/libs/flex.swc" useDefaultLinkType="false"/>
+ <libraryPathEntry kind="3" linkType="1" path="${PROJECT_FRAMEWORKS}/libs/core.swc" useDefaultLinkType="false"/>
+ </excludedEntries>
+ </libraryPathEntry>
+ <libraryPathEntry kind="1" linkType="1" path="libs"/>
+ </libraryPath>
+ <sourceAttachmentPath/>
+ </compiler>
+ <applications>
+ <application path="FXGImageSample.mxml"/>
+ </applications>
+ <modules/>
+ <buildCSSFiles/>
+ <flashCatalyst validateFlashCatalystCompatibility="false"/>
+</actionScriptProperties>
Propchange: incubator/flex/whiteboard/jhouser/FXGImage/Workspace/.metadata/.plugins/org.eclipse.core.resources/.history/4e/e05362c1f47f0011188aed2ccaf77e02
------------------------------------------------------------------------------
svn:eol-style = native
Added: incubator/flex/whiteboard/jhouser/FXGImage/Workspace/.metadata/.plugins/org.eclipse.core.resources/.history/54/106368aef47f0011188aed2ccaf77e02
URL: http://svn.apache.org/viewvc/incubator/flex/whiteboard/jhouser/FXGImage/Workspace/.metadata/.plugins/org.eclipse.core.resources/.history/54/106368aef47f0011188aed2ccaf77e02?rev=1310637&view=auto
==============================================================================
--- incubator/flex/whiteboard/jhouser/FXGImage/Workspace/.metadata/.plugins/org.eclipse.core.resources/.history/54/106368aef47f0011188aed2ccaf77e02 (added)
+++ incubator/flex/whiteboard/jhouser/FXGImage/Workspace/.metadata/.plugins/org.eclipse.core.resources/.history/54/106368aef47f0011188aed2ccaf77e02 Fri Apr 6 23:38:20 2012
@@ -0,0 +1,12 @@
+package org.apache.utils
+{
+ import mx.core.UIComponent;
+
+ public class FXGImage extends UIComponent
+ {
+ public function FXGImage()
+ {
+ super();
+ }
+ }
+}
\ No newline at end of file
Propchange: incubator/flex/whiteboard/jhouser/FXGImage/Workspace/.metadata/.plugins/org.eclipse.core.resources/.history/54/106368aef47f0011188aed2ccaf77e02
------------------------------------------------------------------------------
svn:eol-style = native
Added: incubator/flex/whiteboard/jhouser/FXGImage/Workspace/.metadata/.plugins/org.eclipse.core.resources/.history/55/20724f9ef47f0011188aed2ccaf77e02
URL: http://svn.apache.org/viewvc/incubator/flex/whiteboard/jhouser/FXGImage/Workspace/.metadata/.plugins/org.eclipse.core.resources/.history/55/20724f9ef47f0011188aed2ccaf77e02?rev=1310637&view=auto
==============================================================================
--- incubator/flex/whiteboard/jhouser/FXGImage/Workspace/.metadata/.plugins/org.eclipse.core.resources/.history/55/20724f9ef47f0011188aed2ccaf77e02 (added)
+++ incubator/flex/whiteboard/jhouser/FXGImage/Workspace/.metadata/.plugins/org.eclipse.core.resources/.history/55/20724f9ef47f0011188aed2ccaf77e02 Fri Apr 6 23:38:20 2012
@@ -0,0 +1,21 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<actionScriptProperties analytics="false" mainApplicationPath="FXGImageLibrary.as" projectUUID="f3387138-0673-4cb0-97b6-b083d244913f" version="10">
+ <compiler additionalCompilerArguments="-locale en_US" autoRSLOrdering="true" copyDependentFiles="false" flexSDK="Flex 4.6.0" fteInMXComponents="false" generateAccessible="false" htmlExpressInstall="true" htmlGenerate="false" htmlHistoryManagement="false" htmlPlayerVersionCheck="true" includeNetmonSwc="false" outputFolderPath="bin" removeUnusedRSL="true" sourceFolderPath="src" strict="true" targetPlayerVersion="0.0.0" useApolloConfig="false" useDebugRSLSwfs="true" verifyDigests="true" warn="true">
+ <compilerSourcePath/>
+ <libraryPath defaultLinkType="0">
+ <libraryPathEntry kind="4" path="">
+ <excludedEntries>
+ <libraryPathEntry kind="3" linkType="1" path="${PROJECT_FRAMEWORKS}/libs/flex.swc" useDefaultLinkType="false"/>
+ <libraryPathEntry kind="3" linkType="1" path="${PROJECT_FRAMEWORKS}/libs/core.swc" useDefaultLinkType="false"/>
+ </excludedEntries>
+ </libraryPathEntry>
+ </libraryPath>
+ <sourceAttachmentPath/>
+ </compiler>
+ <applications>
+ <application path="FXGImageLibrary.as"/>
+ </applications>
+ <modules/>
+ <buildCSSFiles/>
+ <flashCatalyst validateFlashCatalystCompatibility="false"/>
+</actionScriptProperties>
Propchange: incubator/flex/whiteboard/jhouser/FXGImage/Workspace/.metadata/.plugins/org.eclipse.core.resources/.history/55/20724f9ef47f0011188aed2ccaf77e02
------------------------------------------------------------------------------
svn:eol-style = native
Added: incubator/flex/whiteboard/jhouser/FXGImage/Workspace/.metadata/.plugins/org.eclipse.core.resources/.history/58/9019ebc401800011188aed2ccaf77e02
URL: http://svn.apache.org/viewvc/incubator/flex/whiteboard/jhouser/FXGImage/Workspace/.metadata/.plugins/org.eclipse.core.resources/.history/58/9019ebc401800011188aed2ccaf77e02?rev=1310637&view=auto
==============================================================================
--- incubator/flex/whiteboard/jhouser/FXGImage/Workspace/.metadata/.plugins/org.eclipse.core.resources/.history/58/9019ebc401800011188aed2ccaf77e02 (added)
+++ incubator/flex/whiteboard/jhouser/FXGImage/Workspace/.metadata/.plugins/org.eclipse.core.resources/.history/58/9019ebc401800011188aed2ccaf77e02 Fri Apr 6 23:38:20 2012
@@ -0,0 +1,104 @@
+<?xml version="1.0" encoding="utf-8"?>
+<s:Application xmlns:fx="http://ns.adobe.com/mxml/2009"
+ xmlns:s="library://ns.adobe.com/flex/spark"
+ xmlns:mx="library://ns.adobe.com/flex/mx" minWidth="955" minHeight="600" xmlns:local="*"
+ xmlns:utils="org.apache.utils.*">
+
+ <fx:Script>
+ <![CDATA[
+ protected function onXPositionSliderChange(event:Event):void
+ {
+ flexLogo.x = xPositionSlider.value;
+ }
+
+ protected function onYPositionSliderChange(event:Event):void
+ {
+ flexLogo.y = yPositionSlider.value;
+ }
+
+ protected function onHeightSliderChange(event:Event):void
+ {
+ flexLogo.height = this.heightSlider.value;
+ }
+
+ protected function onWidthSliderChange(event:Event):void
+ {
+ flexLogo.width = this.widthSlider.value;
+ }
+
+ protected function onYOffsetChange(event:Event):void
+ {
+ flexLogo.yOffset = this.yOffSetSlider.value;
+ }
+
+ protected function onXOffsetChange(event:Event):void
+ {
+ flexLogo.xOffset = this.xOffSetSlider.value;
+ }
+
+ protected function onHeightIncrementSliderChange(event:Event):void
+ {
+ flexLogo.heightIncrement = this.heightIncrementSlider.value;
+ }
+
+ protected function onWidthIncrementSliderChange(event:Event):void
+ {
+ flexLogo.widthIncrement = this.widthIncrementSlider.value;
+ }
+
+ protected function onReset(event:MouseEvent):void
+ {
+ this.xPositionSlider.value = 0;
+ this.yPositionSlider.value = 0;
+ }
+
+ ]]>
+ </fx:Script>
+
+ <fx:Declarations>
+ <!-- Place non-visual elements (e.g., services, value objects) here -->
+ </fx:Declarations>
+
+
+ <s:HGroup width="100%" height="100%">
+ <s:Form>
+ <s:FormItem label="x" >
+ <s:HSlider id="xPositionSlider" value="0" minimum="0" maximum="{imageGroup.width}" change="onXPositionSliderChange(event)" />
+ </s:FormItem>
+ <s:FormItem label="y" >
+ <s:HSlider id="yPositionSlider" value="0" minimum="0" maximum="{imageGroup.height}" change="onYPositionSliderChange(event)"/>
+ </s:FormItem>
+ <s:FormItem label="xOffset" >
+ <s:HSlider id="xOffSetSlider" value="0" minimum="-100" maximum="100" change="onXOffsetChange(event)"/>
+ </s:FormItem>
+ <s:FormItem label="yOffset" >
+ <s:HSlider id="yOffSetSlider" value="0" minimum="-100" maximum="100" change="onYOffsetChange(event)"/>
+ </s:FormItem>
+ <s:FormItem label="width" >
+ <s:HSlider id="widthSlider" value="0" minimum="0" maximum="{imageGroup.width}" change="onWidthSliderChange(event)" />
+ </s:FormItem>
+ <s:FormItem label="height" >
+ <s:HSlider id="heightSlider" value="0" minimum="0" maximum="{imageGroup.height}" change="onHeightSliderChange(event)"/>
+ </s:FormItem>
+ <s:FormItem label="width Increment" >
+ <s:HSlider id="widthIncrementSlider" value="0" minimum="-100" maximum="100" change="onWidthIncrementSliderChange(event)" />
+ </s:FormItem>
+ <s:FormItem label="heightIncrement" >
+ <s:HSlider id="heightIncrementSlider" value="0" minimum="-100" maximum="100" change="onHeightIncrementSliderChange(event)"/>
+ </s:FormItem>
+
+ <s:FormItem >
+ <s:Button label="reset" click="onReset(event)" />
+ </s:FormItem>
+ </s:Form>
+
+
+ <s:Group width="100%" height="100%" id="imageGroup">
+ <utils:FXGImage source="org.apache.assets.apacheLogo.ApacheFlexLogo" id="flexLogo" width="283" height="168" />
+ </s:Group>
+
+ </s:HGroup>
+
+
+
+</s:Application>
Propchange: incubator/flex/whiteboard/jhouser/FXGImage/Workspace/.metadata/.plugins/org.eclipse.core.resources/.history/58/9019ebc401800011188aed2ccaf77e02
------------------------------------------------------------------------------
svn:eol-style = native
Added: incubator/flex/whiteboard/jhouser/FXGImage/Workspace/.metadata/.plugins/org.eclipse.core.resources/.history/5c/e0de6ce701800011188aed2ccaf77e02
URL: http://svn.apache.org/viewvc/incubator/flex/whiteboard/jhouser/FXGImage/Workspace/.metadata/.plugins/org.eclipse.core.resources/.history/5c/e0de6ce701800011188aed2ccaf77e02?rev=1310637&view=auto
==============================================================================
--- incubator/flex/whiteboard/jhouser/FXGImage/Workspace/.metadata/.plugins/org.eclipse.core.resources/.history/5c/e0de6ce701800011188aed2ccaf77e02 (added)
+++ incubator/flex/whiteboard/jhouser/FXGImage/Workspace/.metadata/.plugins/org.eclipse.core.resources/.history/5c/e0de6ce701800011188aed2ccaf77e02 Fri Apr 6 23:38:20 2012
@@ -0,0 +1,108 @@
+<?xml version="1.0" encoding="utf-8"?>
+<s:Application xmlns:fx="http://ns.adobe.com/mxml/2009"
+ xmlns:s="library://ns.adobe.com/flex/spark"
+ xmlns:mx="library://ns.adobe.com/flex/mx" minWidth="955" minHeight="600" xmlns:local="*"
+ xmlns:utils="org.apache.utils.*">
+
+ <fx:Script>
+ <![CDATA[
+ protected function onXPositionSliderChange(event:Event):void
+ {
+ flexLogo.x = xPositionSlider.value;
+ }
+
+ protected function onYPositionSliderChange(event:Event):void
+ {
+ flexLogo.y = yPositionSlider.value;
+ }
+
+ protected function onHeightSliderChange(event:Event):void
+ {
+ flexLogo.height = this.heightSlider.value;
+ }
+
+ protected function onWidthSliderChange(event:Event):void
+ {
+ flexLogo.width = this.widthSlider.value;
+ }
+
+ protected function onYOffsetChange(event:Event):void
+ {
+ flexLogo.yOffset = this.yOffSetSlider.value;
+ }
+
+ protected function onXOffsetChange(event:Event):void
+ {
+ flexLogo.xOffset = this.xOffSetSlider.value;
+ }
+
+ protected function onHeightIncrementSliderChange(event:Event):void
+ {
+ flexLogo.heightIncrement = this.heightIncrementSlider.value;
+ }
+
+ protected function onWidthIncrementSliderChange(event:Event):void
+ {
+ flexLogo.widthIncrement = this.widthIncrementSlider.value;
+ }
+
+ protected function onReset(event:MouseEvent):void
+ {
+ // a fake change event
+
+ this.xPositionSlider.value = 0;
+ this.onXPositionSliderChange(event);
+ this.yPositionSlider.value = 0;
+ this.onYPositionSliderChange(event);
+ }
+
+ ]]>
+ </fx:Script>
+
+ <fx:Declarations>
+ <!-- Place non-visual elements (e.g., services, value objects) here -->
+ </fx:Declarations>
+
+
+ <s:HGroup width="100%" height="100%">
+ <s:Form>
+ <s:FormItem label="x" >
+ <s:HSlider id="xPositionSlider" value="0" minimum="0" maximum="{imageGroup.width}" change="onXPositionSliderChange(event)" />
+ </s:FormItem>
+ <s:FormItem label="y" >
+ <s:HSlider id="yPositionSlider" value="0" minimum="0" maximum="{imageGroup.height}" change="onYPositionSliderChange(event)"/>
+ </s:FormItem>
+ <s:FormItem label="xOffset" >
+ <s:HSlider id="xOffSetSlider" value="0" minimum="-100" maximum="100" change="onXOffsetChange(event)"/>
+ </s:FormItem>
+ <s:FormItem label="yOffset" >
+ <s:HSlider id="yOffSetSlider" value="0" minimum="-100" maximum="100" change="onYOffsetChange(event)"/>
+ </s:FormItem>
+ <s:FormItem label="width" >
+ <s:HSlider id="widthSlider" value="0" minimum="0" maximum="{imageGroup.width}" change="onWidthSliderChange(event)" />
+ </s:FormItem>
+ <s:FormItem label="height" >
+ <s:HSlider id="heightSlider" value="0" minimum="0" maximum="{imageGroup.height}" change="onHeightSliderChange(event)"/>
+ </s:FormItem>
+ <s:FormItem label="width Increment" >
+ <s:HSlider id="widthIncrementSlider" value="0" minimum="-100" maximum="100" change="onWidthIncrementSliderChange(event)" />
+ </s:FormItem>
+ <s:FormItem label="heightIncrement" >
+ <s:HSlider id="heightIncrementSlider" value="0" minimum="-100" maximum="100" change="onHeightIncrementSliderChange(event)"/>
+ </s:FormItem>
+
+ <s:FormItem >
+ <s:Button label="reset" click="onReset(event)" />
+ </s:FormItem>
+ </s:Form>
+
+
+ <s:Group width="100%" height="100%" id="imageGroup">
+ <utils:FXGImage source="org.apache.assets.apacheLogo.ApacheFlexLogo" id="flexLogo" width="283" height="168" />
+ </s:Group>
+
+ </s:HGroup>
+
+
+
+</s:Application>
Propchange: incubator/flex/whiteboard/jhouser/FXGImage/Workspace/.metadata/.plugins/org.eclipse.core.resources/.history/5c/e0de6ce701800011188aed2ccaf77e02
------------------------------------------------------------------------------
svn:eol-style = native
Added: incubator/flex/whiteboard/jhouser/FXGImage/Workspace/.metadata/.plugins/org.eclipse.core.resources/.history/5f/10066a4301800011188aed2ccaf77e02
URL: http://svn.apache.org/viewvc/incubator/flex/whiteboard/jhouser/FXGImage/Workspace/.metadata/.plugins/org.eclipse.core.resources/.history/5f/10066a4301800011188aed2ccaf77e02?rev=1310637&view=auto
==============================================================================
--- incubator/flex/whiteboard/jhouser/FXGImage/Workspace/.metadata/.plugins/org.eclipse.core.resources/.history/5f/10066a4301800011188aed2ccaf77e02 (added)
+++ incubator/flex/whiteboard/jhouser/FXGImage/Workspace/.metadata/.plugins/org.eclipse.core.resources/.history/5f/10066a4301800011188aed2ccaf77e02 Fri Apr 6 23:38:20 2012
@@ -0,0 +1,199 @@
+package org.apache.utils
+{
+ import flash.display.DisplayObject;
+ import flash.display.Sprite;
+
+ import mx.core.UIComponent;
+
+ public class FXGImage extends UIComponent
+ {
+ public function FXGImage(source:Class = null)
+ {
+ if(source){
+ this.source = source;
+ }
+ super();
+ }
+
+ private var _source : Class;
+
+ /**
+ * @private
+ * This property is used to tell if the source has changed (or not).
+ */
+ protected var sourceChanged :Boolean = true;
+
+ /**
+ * This property will be used to reference the class we want to use for the display.
+ * Only tested with FXG files; but in theory any class name should work, such as an embedded library symbol from a Flash Pro SWF.
+ */
+ public function get source():Class
+ {
+ return _source;
+ }
+
+ public function set source(value:Class):void
+ {
+ _source = value;
+ sourceChanged = true;
+ this.commitProperties();
+ }
+
+
+ /**
+ * This will contain the instance created from the source.
+ */
+ protected var imageInstance : DisplayObject;
+
+
+ private var _xOffset :int = 0;
+
+ /**
+ * If we want to off set the X position of the asset; you can use this.
+ *
+ * @default 0
+ */
+ public function get xOffset():int
+ {
+ return _xOffset;
+ }
+
+ /**
+ * @private
+ */
+ public function set xOffset(value:int):void
+ {
+ _xOffset = value;
+ this.invalidateDisplayList();
+ }
+
+
+ private var _yOffset :int = 0;
+
+ /**
+ * If we want to off set the Y position of the asset; you can use this.
+ *
+ * @default 0
+ */
+ public function get yOffset():int
+ {
+ return _yOffset;
+ }
+
+ /**
+ * @private
+ */
+ public function set yOffset(value:int):void
+ {
+ _yOffset = value;
+ this.invalidateDisplayList();
+ }
+
+
+ private var _heightIncrement :int = 0;
+
+ /**
+ * If we want to add a value to the asset's default height; you can use this property. The default is zero, which means the asset
+ * will be sized based on the height and width of this component.
+ *
+ * @default 0
+ */
+ public function get heightIncrement():int
+ {
+ return _heightIncrement;
+ }
+
+ /**
+ * @private
+ */
+ public function set heightIncrement(value:int):void
+ {
+ _heightIncrement = value;
+ this.invalidateDisplayList();
+ }
+
+
+ private var _widthIncrement :int = 0;
+
+ /**
+ * If we want to add a value to the asset's default width; you can use this property. The default is zero, which means the asset
+ * will be sized based on the height and width of this component.
+ *
+ * @default 0
+ */
+ public function get widthIncrement():int
+ {
+ return _widthIncrement;
+ this.invalidateDisplayList();
+ }
+
+ /**
+ * @private
+ */
+ public function set widthIncrement(value:int):void
+ {
+ _widthIncrement = value;
+ }
+
+
+ /**
+ * @private
+ */
+ override protected function createChildren():void{
+ super.createChildren();
+
+ // if the source has changed we want to create, or recreate, the image instance
+ if(this.sourceChanged){
+ // if the instance has a value, then delete it
+ if(this.imageInstance){
+ this.removeChild(this.imageInstance);
+ this.imageInstance = null;
+ }
+
+ // if we have a source value; create the source
+ if(this.source){
+ this.imageInstance = new source();
+ this.imageInstance.x = 0 + xOffset;
+ this.imageInstance.y = 0 + yOffset;
+ this.addChild(this.imageInstance);
+ }
+ this.sourceChanged = false;
+
+ }
+ }
+
+ /**
+ * @private
+ */
+ override protected function commitProperties():void{
+ super.commitProperties();
+
+ if(this.sourceChanged){
+ // if the source changed re-created it; which is done in createChildren();
+ this.createChildren();
+ }
+ }
+
+ /**
+ * @private
+ */
+ override protected function updateDisplayList(unscaledWidth:Number, unscaledHeight:Number):void{
+ super.updateDisplayList(unscaledWidth, unscaledHeight);
+
+ // size the element.
+ // I don't remember why I Wrote the code to check for unscaledHeight and unscaledWidth being 0
+ if(unscaledHeight != 0){
+ this.imageInstance.height = unscaledHeight + this.heightIncrement;
+ }
+ if(unscaledWidth != 0){
+ this.imageInstance.width = unscaledWidth + this.widthIncrement;
+ }
+
+ // position the element
+ this.imageInstance.x = 0 + xOffset;
+ this.imageInstance.y = 0 + yOffset;
+
+ }
+
+ }
+}
\ No newline at end of file
Propchange: incubator/flex/whiteboard/jhouser/FXGImage/Workspace/.metadata/.plugins/org.eclipse.core.resources/.history/5f/10066a4301800011188aed2ccaf77e02
------------------------------------------------------------------------------
svn:eol-style = native
Added: incubator/flex/whiteboard/jhouser/FXGImage/Workspace/.metadata/.plugins/org.eclipse.core.resources/.history/5f/a0ff73c7078000111f3892a3be300bbe
URL: http://svn.apache.org/viewvc/incubator/flex/whiteboard/jhouser/FXGImage/Workspace/.metadata/.plugins/org.eclipse.core.resources/.history/5f/a0ff73c7078000111f3892a3be300bbe?rev=1310637&view=auto
==============================================================================
--- incubator/flex/whiteboard/jhouser/FXGImage/Workspace/.metadata/.plugins/org.eclipse.core.resources/.history/5f/a0ff73c7078000111f3892a3be300bbe (added)
+++ incubator/flex/whiteboard/jhouser/FXGImage/Workspace/.metadata/.plugins/org.eclipse.core.resources/.history/5f/a0ff73c7078000111f3892a3be300bbe Fri Apr 6 23:38:20 2012
@@ -0,0 +1,23 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<actionScriptProperties analytics="false" mainApplicationPath="FXGImageSample.mxml" projectUUID="1dd1ec67-15ab-487d-9480-30a2b2c66612" version="10">
+ <compiler additionalCompilerArguments="-locale en_US" autoRSLOrdering="true" copyDependentFiles="true" flexSDK="Flex 4.6.0" fteInMXComponents="false" generateAccessible="true" htmlExpressInstall="true" htmlGenerate="true" htmlHistoryManagement="true" htmlPlayerVersionCheck="true" includeNetmonSwc="false" outputFolderPath="bin-debug" removeUnusedRSL="true" sourceFolderPath="src" strict="true" targetPlayerVersion="0.0.0" useApolloConfig="false" useDebugRSLSwfs="true" verifyDigests="true" warn="true">
+ <compilerSourcePath/>
+ <libraryPath defaultLinkType="0">
+ <libraryPathEntry kind="4" path="">
+ <excludedEntries>
+ <libraryPathEntry kind="3" linkType="1" path="${PROJECT_FRAMEWORKS}/libs/flex.swc" useDefaultLinkType="false"/>
+ <libraryPathEntry kind="3" linkType="1" path="${PROJECT_FRAMEWORKS}/libs/core.swc" useDefaultLinkType="false"/>
+ </excludedEntries>
+ </libraryPathEntry>
+ <libraryPathEntry kind="1" linkType="1" path="libs"/>
+ <libraryPathEntry kind="3" linkType="1" path="/FXGImageLibrary/bin/FXGImageLibrary.swc" useDefaultLinkType="false"/>
+ </libraryPath>
+ <sourceAttachmentPath/>
+ </compiler>
+ <applications>
+ <application path="FXGImageSample.mxml"/>
+ </applications>
+ <modules/>
+ <buildCSSFiles/>
+ <flashCatalyst validateFlashCatalystCompatibility="false"/>
+</actionScriptProperties>
Propchange: incubator/flex/whiteboard/jhouser/FXGImage/Workspace/.metadata/.plugins/org.eclipse.core.resources/.history/5f/a0ff73c7078000111f3892a3be300bbe
------------------------------------------------------------------------------
svn:eol-style = native
Added: incubator/flex/whiteboard/jhouser/FXGImage/Workspace/.metadata/.plugins/org.eclipse.core.resources/.history/60/c086cc4ef47f0011188aed2ccaf77e02
URL: http://svn.apache.org/viewvc/incubator/flex/whiteboard/jhouser/FXGImage/Workspace/.metadata/.plugins/org.eclipse.core.resources/.history/60/c086cc4ef47f0011188aed2ccaf77e02?rev=1310637&view=auto
==============================================================================
--- incubator/flex/whiteboard/jhouser/FXGImage/Workspace/.metadata/.plugins/org.eclipse.core.resources/.history/60/c086cc4ef47f0011188aed2ccaf77e02 (added)
+++ incubator/flex/whiteboard/jhouser/FXGImage/Workspace/.metadata/.plugins/org.eclipse.core.resources/.history/60/c086cc4ef47f0011188aed2ccaf77e02 Fri Apr 6 23:38:20 2012
@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<flexLibProperties includeAllClasses="true" useMultiPlatformConfig="false" version="3">
+ <includeClasses/>
+ <includeResources/>
+ <namespaceManifests/>
+</flexLibProperties>
Propchange: incubator/flex/whiteboard/jhouser/FXGImage/Workspace/.metadata/.plugins/org.eclipse.core.resources/.history/60/c086cc4ef47f0011188aed2ccaf77e02
------------------------------------------------------------------------------
svn:eol-style = native
Added: incubator/flex/whiteboard/jhouser/FXGImage/Workspace/.metadata/.plugins/org.eclipse.core.resources/.history/6c/900850d8fe7f0011188aed2ccaf77e02
URL: http://svn.apache.org/viewvc/incubator/flex/whiteboard/jhouser/FXGImage/Workspace/.metadata/.plugins/org.eclipse.core.resources/.history/6c/900850d8fe7f0011188aed2ccaf77e02?rev=1310637&view=auto
==============================================================================
--- incubator/flex/whiteboard/jhouser/FXGImage/Workspace/.metadata/.plugins/org.eclipse.core.resources/.history/6c/900850d8fe7f0011188aed2ccaf77e02 (added)
+++ incubator/flex/whiteboard/jhouser/FXGImage/Workspace/.metadata/.plugins/org.eclipse.core.resources/.history/6c/900850d8fe7f0011188aed2ccaf77e02 Fri Apr 6 23:38:20 2012
@@ -0,0 +1,58 @@
+<?xml version="1.0" encoding="utf-8"?>
+<s:Application xmlns:fx="http://ns.adobe.com/mxml/2009"
+ xmlns:s="library://ns.adobe.com/flex/spark"
+ xmlns:mx="library://ns.adobe.com/flex/mx" minWidth="955" minHeight="600" xmlns:local="*"
+ xmlns:utils="org.apache.utils.*">
+
+ <fx:Script>
+ <![CDATA[
+ protected function onXPositionChange(event:Event):void
+ {
+ flexLogo.x = xPosition.value;
+ }
+
+ protected function onYPositionChange(event:Event):void
+ {
+ flexLogo.y = yPosition.value;
+ }
+
+ protected function button1_clickHandler(event:MouseEvent):void
+ {
+ // TODO Auto-generated method stub
+ trace(flexLogo.width);
+ trace(flexLogo.height);
+ trace(imageGroup.width);
+ trace(imageGroup.height);
+ }
+
+ ]]>
+ </fx:Script>
+
+ <fx:Declarations>
+ <!-- Place non-visual elements (e.g., services, value objects) here -->
+ </fx:Declarations>
+
+
+ <s:HGroup>
+ <s:Form>
+ <s:FormItem label="x" >
+ <s:HSlider id="xPosition" value="0" minimum="0" maximum="{imageGroup.width}" change="onXPositionChange(event)" />
+ </s:FormItem>
+ <s:FormItem label="y" >
+ <s:HSlider id="yPosition" value="0" minimum="0" maximum="{imageGroup.height}" change="onYPositionChange(event)"/>
+ </s:FormItem>
+ <s:FormItem >
+ <s:Button click="button1_clickHandler(event)" />
+ </s:FormItem>
+ </s:Form>
+
+
+ <s:Group width="100%" id="imageGroup">
+ <utils:FXGImage source="org.apache.assets.apacheLogo.ApacheFlexLogo" id="flexLogo" />
+ </s:Group>
+
+ </s:HGroup>
+
+
+
+</s:Application>
Propchange: incubator/flex/whiteboard/jhouser/FXGImage/Workspace/.metadata/.plugins/org.eclipse.core.resources/.history/6c/900850d8fe7f0011188aed2ccaf77e02
------------------------------------------------------------------------------
svn:eol-style = native
Added: incubator/flex/whiteboard/jhouser/FXGImage/Workspace/.metadata/.plugins/org.eclipse.core.resources/.history/73/200e5ec1f47f0011188aed2ccaf77e02
URL: http://svn.apache.org/viewvc/incubator/flex/whiteboard/jhouser/FXGImage/Workspace/.metadata/.plugins/org.eclipse.core.resources/.history/73/200e5ec1f47f0011188aed2ccaf77e02?rev=1310637&view=auto
==============================================================================
--- incubator/flex/whiteboard/jhouser/FXGImage/Workspace/.metadata/.plugins/org.eclipse.core.resources/.history/73/200e5ec1f47f0011188aed2ccaf77e02 (added)
+++ incubator/flex/whiteboard/jhouser/FXGImage/Workspace/.metadata/.plugins/org.eclipse.core.resources/.history/73/200e5ec1f47f0011188aed2ccaf77e02 Fri Apr 6 23:38:20 2012
@@ -0,0 +1,22 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<actionScriptProperties analytics="false" mainApplicationPath="FXGImageSample.mxml" projectUUID="3a693342-ae5f-439b-ab88-79ea37eb9270" version="10">
+ <compiler additionalCompilerArguments="-locale en_US" autoRSLOrdering="true" copyDependentFiles="true" flexSDK="Flex 4.6.0" fteInMXComponents="false" generateAccessible="true" htmlExpressInstall="true" htmlGenerate="true" htmlHistoryManagement="true" htmlPlayerVersionCheck="true" includeNetmonSwc="false" outputFolderPath="bin-debug" removeUnusedRSL="true" sourceFolderPath="src" strict="true" targetPlayerVersion="0.0.0" useApolloConfig="false" useDebugRSLSwfs="true" verifyDigests="true" warn="true">
+ <compilerSourcePath/>
+ <libraryPath defaultLinkType="0">
+ <libraryPathEntry kind="4" path="">
+ <excludedEntries>
+ <libraryPathEntry kind="3" linkType="1" path="${PROJECT_FRAMEWORKS}/libs/flex.swc" useDefaultLinkType="false"/>
+ <libraryPathEntry kind="3" linkType="1" path="${PROJECT_FRAMEWORKS}/libs/core.swc" useDefaultLinkType="false"/>
+ </excludedEntries>
+ </libraryPathEntry>
+ <libraryPathEntry kind="1" linkType="1" path="libs"/>
+ </libraryPath>
+ <sourceAttachmentPath/>
+ </compiler>
+ <applications>
+ <application path="FXGImageSample.mxml"/>
+ </applications>
+ <modules/>
+ <buildCSSFiles/>
+ <flashCatalyst validateFlashCatalystCompatibility="false"/>
+</actionScriptProperties>
Propchange: incubator/flex/whiteboard/jhouser/FXGImage/Workspace/.metadata/.plugins/org.eclipse.core.resources/.history/73/200e5ec1f47f0011188aed2ccaf77e02
------------------------------------------------------------------------------
svn:eol-style = native
Added: incubator/flex/whiteboard/jhouser/FXGImage/Workspace/.metadata/.plugins/org.eclipse.core.resources/.history/78/102344cf00800011188aed2ccaf77e02
URL: http://svn.apache.org/viewvc/incubator/flex/whiteboard/jhouser/FXGImage/Workspace/.metadata/.plugins/org.eclipse.core.resources/.history/78/102344cf00800011188aed2ccaf77e02?rev=1310637&view=auto
==============================================================================
--- incubator/flex/whiteboard/jhouser/FXGImage/Workspace/.metadata/.plugins/org.eclipse.core.resources/.history/78/102344cf00800011188aed2ccaf77e02 (added)
+++ incubator/flex/whiteboard/jhouser/FXGImage/Workspace/.metadata/.plugins/org.eclipse.core.resources/.history/78/102344cf00800011188aed2ccaf77e02 Fri Apr 6 23:38:20 2012
@@ -0,0 +1,153 @@
+package org.apache.utils
+{
+ import flash.display.DisplayObject;
+ import flash.display.Sprite;
+
+ import mx.core.UIComponent;
+
+ public class FXGImage extends UIComponent
+ {
+ public function FXGImage(source:Class = null)
+ {
+ if(source){
+ this.source = source;
+ }
+ super();
+ }
+
+ private var _source : Class;
+
+ /**
+ * @private
+ * This property is used to tell if the source has changed (or not).
+ */
+ protected var sourceChanged :Boolean = true;
+
+ /**
+ * This property will be used to reference the class we want to use for the display.
+ * Only tested with FXG files; but in theory any class name should work, such as an embedded library symbol from a Flash Pro SWF.
+ */
+ public function get source():Class
+ {
+ return _source;
+ }
+
+ public function set source(value:Class):void
+ {
+ _source = value;
+ sourceChanged = true;
+ this.commitProperties();
+ }
+
+
+ /**
+ * This will contain the instance created from the source.
+ */
+ protected var imageInstance : DisplayObject;
+
+ private var _xOffset :int = 0;
+
+ /**
+ * If we want to off set the X position of the asset; you can use this.
+ *
+ * @default 0
+ */
+ public function get xOffset():int
+ {
+ return _xOffset;
+ }
+
+ /**
+ * @private
+ */
+ public function set xOffset(value:int):void
+ {
+ _xOffset = value;
+ }
+
+
+ /**
+ * If we want to off set the Y position of the asset; you can use this.
+ *
+ * @default 0
+ */
+ public var yOffset :int = 0;
+
+ /**
+ * If we want to add a value to the asset's default height; you can use this property. The default is zero, which means the asset
+ * will be sized based on the height and width of this component.
+ *
+ * @default 0
+ */
+ public var heightIncrement :int = 0;
+
+ /**
+ * If we want to add a value to the asset's default width; you can use this property. The default is zero, which means the asset
+ * will be sized based on the height and width of this component.
+ *
+ * @default 0
+ */
+ public var widthIncrement :int = 0;
+
+
+ /**
+ * @private
+ */
+ override protected function createChildren():void{
+ super.createChildren();
+
+ // if the source has changed we want to create, or recreate, the image instance
+ if(this.sourceChanged){
+ // if the instance has a value, then delete it
+ if(this.imageInstance){
+ this.removeChild(this.imageInstance);
+ this.imageInstance = null;
+ }
+
+ // if we have a source value; create the source
+ if(this.source){
+ this.imageInstance = new source();
+ this.imageInstance.x = 0 + xOffset;
+ this.imageInstance.y = 0 + yOffset;
+ this.addChild(this.imageInstance);
+ }
+ this.sourceChanged = false;
+
+ }
+ }
+
+ /**
+ * @private
+ */
+ override protected function commitProperties():void{
+ super.commitProperties();
+
+ if(this.sourceChanged){
+ // if the source changed re-created it; which is done in createChildren();
+ this.createChildren();
+ }
+ }
+
+ /**
+ * @private
+ */
+ override protected function updateDisplayList(unscaledWidth:Number, unscaledHeight:Number):void{
+ super.updateDisplayList(unscaledWidth, unscaledHeight);
+
+ // size the element.
+ // I don't remember why I Wrote the code to check for unscaledHeight and unscaledWidth being 0
+ if(unscaledHeight != 0){
+ this.imageInstance.height = unscaledHeight + this.heightIncrement;
+ }
+ if(unscaledWidth != 0){
+ this.imageInstance.width = unscaledWidth + this.widthIncrement;
+ }
+
+ // position the element
+ this.imageInstance.x = 0 + xOffset;
+ this.imageInstance.y = 0 + yOffset;
+
+ }
+
+ }
+}
\ No newline at end of file
Propchange: incubator/flex/whiteboard/jhouser/FXGImage/Workspace/.metadata/.plugins/org.eclipse.core.resources/.history/78/102344cf00800011188aed2ccaf77e02
------------------------------------------------------------------------------
svn:eol-style = native
Added: incubator/flex/whiteboard/jhouser/FXGImage/Workspace/.metadata/.plugins/org.eclipse.core.resources/.history/7b/10ab592201800011188aed2ccaf77e02
URL: http://svn.apache.org/viewvc/incubator/flex/whiteboard/jhouser/FXGImage/Workspace/.metadata/.plugins/org.eclipse.core.resources/.history/7b/10ab592201800011188aed2ccaf77e02?rev=1310637&view=auto
==============================================================================
--- incubator/flex/whiteboard/jhouser/FXGImage/Workspace/.metadata/.plugins/org.eclipse.core.resources/.history/7b/10ab592201800011188aed2ccaf77e02 (added)
+++ incubator/flex/whiteboard/jhouser/FXGImage/Workspace/.metadata/.plugins/org.eclipse.core.resources/.history/7b/10ab592201800011188aed2ccaf77e02 Fri Apr 6 23:38:20 2012
@@ -0,0 +1,109 @@
+<?xml version="1.0" encoding="utf-8"?>
+<s:Application xmlns:fx="http://ns.adobe.com/mxml/2009"
+ xmlns:s="library://ns.adobe.com/flex/spark"
+ xmlns:mx="library://ns.adobe.com/flex/mx" minWidth="955" minHeight="600" xmlns:local="*"
+ xmlns:utils="org.apache.utils.*">
+
+ <fx:Script>
+ <![CDATA[
+ protected function onXPositionChange(event:Event):void
+ {
+ flexLogo.x = xPosition.value;
+ }
+
+ protected function onYPositionChange(event:Event):void
+ {
+ flexLogo.y = yPosition.value;
+ }
+
+ protected function onHeightSliderChange(event:Event):void
+ {
+ flexLogo.height = this.heightSlider.value;
+ }
+
+ protected function onWidthSliderChange(event:Event):void
+ {
+ flexLogo.width = this.widthSlider.value;
+ }
+
+
+ protected function button1_clickHandler(event:MouseEvent):void
+ {
+ // TODO Auto-generated method stub
+ trace(flexLogo.width);
+ trace(flexLogo.height);
+ trace(imageGroup.width);
+ trace(imageGroup.height);
+ }
+
+
+ protected function onYOffsetChange(event:Event):void
+ {
+ flexLogo.yOffset = this.yOffSetSlider.value;
+ }
+
+ protected function onXOffsetChange(event:Event):void
+ {
+ flexLogo.xOffset = this.xOffSetSlider.value;
+ }
+
+ protected function onHeightIncrementSliderChange(event:Event):void
+ {
+ flexLogo.heightIncrement = this.heightIncrementSlider.value;
+ }
+
+ protected function onWidthIncrementSliderChange(event:Event):void
+ {
+ flexLogo.widthIncrement = this.widthIncrementSlider.value;
+ }
+
+ ]]>
+ </fx:Script>
+
+ <fx:Declarations>
+ <!-- Place non-visual elements (e.g., services, value objects) here -->
+ </fx:Declarations>
+
+
+ <s:HGroup width="100%" height="100%">
+ <s:Form>
+ <s:FormItem label="x" >
+ <s:HSlider id="xPosition" value="0" minimum="0" maximum="{imageGroup.width}" change="onXPositionChange(event)" />
+ </s:FormItem>
+ <s:FormItem label="y" >
+ <s:HSlider id="yPosition" value="0" minimum="0" maximum="{imageGroup.height}" change="onYPositionChange(event)"/>
+ </s:FormItem>
+ <s:FormItem label="xOffset" >
+ <s:HSlider id="xOffSetSlider" value="0" minimum="-100" maximum="100" change="onXOffsetChange(event)"/>
+ </s:FormItem>
+ <s:FormItem label="yOffset" >
+ <s:HSlider id="yOffSetSlider" value="0" minimum="-100" maximum="100" change="onYOffsetChange(event)"/>
+ </s:FormItem>
+ <s:FormItem label="width" >
+ <s:HSlider id="widthSlider" value="0" minimum="0" maximum="{imageGroup.width}" change="onWidthSliderChange(event)" />
+ </s:FormItem>
+ <s:FormItem label="height" >
+ <s:HSlider id="heightSlider" value="0" minimum="0" maximum="{imageGroup.height}" change="onHeightSliderChange(event)"/>
+ </s:FormItem>
+ <s:FormItem label="width Increment" >
+ <s:HSlider id="widthIncrementSlider" value="0" minimum="-100" maximum="100" change="onWidthIncrementSliderChange(event)" />
+ </s:FormItem>
+ <s:FormItem label="heightIncrement" >
+ <s:HSlider id="heightIncrementSlider" value="0" minimum="-100" maximum="100" change="onHeightIncrementSliderChange(event)"/>
+ </s:FormItem>
+
+<!-- <s:FormItem >
+ <s:Button click="button1_clickHandler(event)" />
+ </s:FormItem>-->
+ </s:Form>
+
+
+ <s:Group width="100%" height="100%" id="imageGroup">
+ <utils:FXGImage source="org.apache.assets.apacheLogo.ApacheFlexLogo" id="flexLogo" />
+ </s:Group>
+
+ </s:HGroup>
+
+
+
+</s:Application>
Propchange: incubator/flex/whiteboard/jhouser/FXGImage/Workspace/.metadata/.plugins/org.eclipse.core.resources/.history/7b/10ab592201800011188aed2ccaf77e02
------------------------------------------------------------------------------
svn:eol-style = native
Added: incubator/flex/whiteboard/jhouser/FXGImage/Workspace/.metadata/.plugins/org.eclipse.core.resources/.history/80/10ba15e400800011188aed2ccaf77e02
URL: http://svn.apache.org/viewvc/incubator/flex/whiteboard/jhouser/FXGImage/Workspace/.metadata/.plugins/org.eclipse.core.resources/.history/80/10ba15e400800011188aed2ccaf77e02?rev=1310637&view=auto
==============================================================================
--- incubator/flex/whiteboard/jhouser/FXGImage/Workspace/.metadata/.plugins/org.eclipse.core.resources/.history/80/10ba15e400800011188aed2ccaf77e02 (added)
+++ incubator/flex/whiteboard/jhouser/FXGImage/Workspace/.metadata/.plugins/org.eclipse.core.resources/.history/80/10ba15e400800011188aed2ccaf77e02 Fri Apr 6 23:38:20 2012
@@ -0,0 +1,184 @@
+package org.apache.utils
+{
+ import flash.display.DisplayObject;
+ import flash.display.Sprite;
+
+ import mx.core.UIComponent;
+
+ public class FXGImage extends UIComponent
+ {
+ public function FXGImage(source:Class = null)
+ {
+ if(source){
+ this.source = source;
+ }
+ super();
+ }
+
+ private var _source : Class;
+
+ /**
+ * @private
+ * This property is used to tell if the source has changed (or not).
+ */
+ protected var sourceChanged :Boolean = true;
+
+ /**
+ * This property will be used to reference the class we want to use for the display.
+ * Only tested with FXG files; but in theory any class name should work, such as an embedded library symbol from a Flash Pro SWF.
+ */
+ public function get source():Class
+ {
+ return _source;
+ }
+
+ public function set source(value:Class):void
+ {
+ _source = value;
+ sourceChanged = true;
+ this.commitProperties();
+ }
+
+
+ /**
+ * This will contain the instance created from the source.
+ */
+ protected var imageInstance : DisplayObject;
+
+
+ private var _xOffset :int = 0;
+
+ /**
+ * If we want to off set the X position of the asset; you can use this.
+ *
+ * @default 0
+ */
+ public function get xOffset():int
+ {
+ return _xOffset;
+ }
+
+ /**
+ * @private
+ */
+ public function set xOffset(value:int):void
+ {
+ _xOffset = value;
+ this.invalidateDisplayList();
+ }
+
+
+ private var _yOffset :int = 0;
+
+ /**
+ * If we want to off set the Y position of the asset; you can use this.
+ *
+ * @default 0
+ */
+ public function get yOffset():int
+ {
+ return _yOffset;
+ }
+
+ /**
+ * @private
+ */
+ public function set yOffset(value:int):void
+ {
+ _yOffset = value;
+ this.invalidateDisplayList();
+ }
+
+
+ private var _heightIncrement :int = 0;
+
+ /**
+ * If we want to add a value to the asset's default height; you can use this property. The default is zero, which means the asset
+ * will be sized based on the height and width of this component.
+ *
+ * @default 0
+ */
+ public function get heightIncrement():int
+ {
+ return _heightIncrement;
+ }
+
+ /**
+ * @private
+ */
+ public function set heightIncrement(value:int):void
+ {
+ _heightIncrement = value;
+ }
+
+
+ /**
+ * If we want to add a value to the asset's default width; you can use this property. The default is zero, which means the asset
+ * will be sized based on the height and width of this component.
+ *
+ * @default 0
+ */
+ public var widthIncrement :int = 0;
+
+
+ /**
+ * @private
+ */
+ override protected function createChildren():void{
+ super.createChildren();
+
+ // if the source has changed we want to create, or recreate, the image instance
+ if(this.sourceChanged){
+ // if the instance has a value, then delete it
+ if(this.imageInstance){
+ this.removeChild(this.imageInstance);
+ this.imageInstance = null;
+ }
+
+ // if we have a source value; create the source
+ if(this.source){
+ this.imageInstance = new source();
+ this.imageInstance.x = 0 + xOffset;
+ this.imageInstance.y = 0 + yOffset;
+ this.addChild(this.imageInstance);
+ }
+ this.sourceChanged = false;
+
+ }
+ }
+
+ /**
+ * @private
+ */
+ override protected function commitProperties():void{
+ super.commitProperties();
+
+ if(this.sourceChanged){
+ // if the source changed re-created it; which is done in createChildren();
+ this.createChildren();
+ }
+ }
+
+ /**
+ * @private
+ */
+ override protected function updateDisplayList(unscaledWidth:Number, unscaledHeight:Number):void{
+ super.updateDisplayList(unscaledWidth, unscaledHeight);
+
+ // size the element.
+ // I don't remember why I Wrote the code to check for unscaledHeight and unscaledWidth being 0
+ if(unscaledHeight != 0){
+ this.imageInstance.height = unscaledHeight + this.heightIncrement;
+ }
+ if(unscaledWidth != 0){
+ this.imageInstance.width = unscaledWidth + this.widthIncrement;
+ }
+
+ // position the element
+ this.imageInstance.x = 0 + xOffset;
+ this.imageInstance.y = 0 + yOffset;
+
+ }
+
+ }
+}
\ No newline at end of file
Propchange: incubator/flex/whiteboard/jhouser/FXGImage/Workspace/.metadata/.plugins/org.eclipse.core.resources/.history/80/10ba15e400800011188aed2ccaf77e02
------------------------------------------------------------------------------
svn:eol-style = native
Added: incubator/flex/whiteboard/jhouser/FXGImage/Workspace/.metadata/.plugins/org.eclipse.core.resources/.history/80/803b5dbcf47f0011188aed2ccaf77e02
URL: http://svn.apache.org/viewvc/incubator/flex/whiteboard/jhouser/FXGImage/Workspace/.metadata/.plugins/org.eclipse.core.resources/.history/80/803b5dbcf47f0011188aed2ccaf77e02?rev=1310637&view=auto
==============================================================================
--- incubator/flex/whiteboard/jhouser/FXGImage/Workspace/.metadata/.plugins/org.eclipse.core.resources/.history/80/803b5dbcf47f0011188aed2ccaf77e02 (added)
+++ incubator/flex/whiteboard/jhouser/FXGImage/Workspace/.metadata/.plugins/org.eclipse.core.resources/.history/80/803b5dbcf47f0011188aed2ccaf77e02 Fri Apr 6 23:38:20 2012
@@ -0,0 +1,22 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<actionScriptProperties analytics="false" mainApplicationPath="FXGImageSample.mxml" projectUUID="3a693342-ae5f-439b-ab88-79ea37eb9270" version="10">
+ <compiler additionalCompilerArguments="-locale en_US" autoRSLOrdering="true" copyDependentFiles="true" flexSDK="Flex 4.6.0" fteInMXComponents="false" generateAccessible="true" htmlExpressInstall="true" htmlGenerate="true" htmlHistoryManagement="true" htmlPlayerVersionCheck="true" includeNetmonSwc="false" outputFolderPath="bin-debug" removeUnusedRSL="true" sourceFolderPath="src" strict="true" targetPlayerVersion="0.0.0" useApolloConfig="false" useDebugRSLSwfs="true" verifyDigests="true" warn="true">
+ <compilerSourcePath/>
+ <libraryPath defaultLinkType="0">
+ <libraryPathEntry kind="4" path="">
+ <excludedEntries>
+ <libraryPathEntry kind="3" linkType="1" path="${PROJECT_FRAMEWORKS}/libs/flex.swc" useDefaultLinkType="false"/>
+ <libraryPathEntry kind="3" linkType="1" path="${PROJECT_FRAMEWORKS}/libs/core.swc" useDefaultLinkType="false"/>
+ </excludedEntries>
+ </libraryPathEntry>
+ <libraryPathEntry kind="1" linkType="1" path="libs"/>
+ </libraryPath>
+ <sourceAttachmentPath/>
+ </compiler>
+ <applications>
+ <application path="FXGImageSample.mxml"/>
+ </applications>
+ <modules/>
+ <buildCSSFiles/>
+ <flashCatalyst validateFlashCatalystCompatibility="false"/>
+</actionScriptProperties>
Propchange: incubator/flex/whiteboard/jhouser/FXGImage/Workspace/.metadata/.plugins/org.eclipse.core.resources/.history/80/803b5dbcf47f0011188aed2ccaf77e02
------------------------------------------------------------------------------
svn:eol-style = native
Added: incubator/flex/whiteboard/jhouser/FXGImage/Workspace/.metadata/.plugins/org.eclipse.core.resources/.history/84/20f99fc1f47f0011188aed2ccaf77e02
URL: http://svn.apache.org/viewvc/incubator/flex/whiteboard/jhouser/FXGImage/Workspace/.metadata/.plugins/org.eclipse.core.resources/.history/84/20f99fc1f47f0011188aed2ccaf77e02?rev=1310637&view=auto
==============================================================================
--- incubator/flex/whiteboard/jhouser/FXGImage/Workspace/.metadata/.plugins/org.eclipse.core.resources/.history/84/20f99fc1f47f0011188aed2ccaf77e02 (added)
+++ incubator/flex/whiteboard/jhouser/FXGImage/Workspace/.metadata/.plugins/org.eclipse.core.resources/.history/84/20f99fc1f47f0011188aed2ccaf77e02 Fri Apr 6 23:38:20 2012
@@ -0,0 +1,22 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<actionScriptProperties analytics="false" mainApplicationPath="FXGImageSample.mxml" projectUUID="1dd1ec67-15ab-487d-9480-30a2b2c66612" version="10">
+ <compiler additionalCompilerArguments="-locale en_US" autoRSLOrdering="true" copyDependentFiles="true" flexSDK="Flex 4.6.0" fteInMXComponents="false" generateAccessible="true" htmlExpressInstall="true" htmlGenerate="true" htmlHistoryManagement="true" htmlPlayerVersionCheck="true" includeNetmonSwc="false" outputFolderPath="bin-debug" removeUnusedRSL="true" sourceFolderPath="src" strict="true" targetPlayerVersion="0.0.0" useApolloConfig="false" useDebugRSLSwfs="true" verifyDigests="true" warn="true">
+ <compilerSourcePath/>
+ <libraryPath defaultLinkType="0">
+ <libraryPathEntry kind="4" path="">
+ <excludedEntries>
+ <libraryPathEntry kind="3" linkType="1" path="${PROJECT_FRAMEWORKS}/libs/flex.swc" useDefaultLinkType="false"/>
+ <libraryPathEntry kind="3" linkType="1" path="${PROJECT_FRAMEWORKS}/libs/core.swc" useDefaultLinkType="false"/>
+ </excludedEntries>
+ </libraryPathEntry>
+ <libraryPathEntry kind="1" linkType="1" path="libs"/>
+ </libraryPath>
+ <sourceAttachmentPath/>
+ </compiler>
+ <applications>
+ <application path="FXGImageSample.mxml"/>
+ </applications>
+ <modules/>
+ <buildCSSFiles/>
+ <flashCatalyst validateFlashCatalystCompatibility="false"/>
+</actionScriptProperties>
Propchange: incubator/flex/whiteboard/jhouser/FXGImage/Workspace/.metadata/.plugins/org.eclipse.core.resources/.history/84/20f99fc1f47f0011188aed2ccaf77e02
------------------------------------------------------------------------------
svn:eol-style = native
Added: incubator/flex/whiteboard/jhouser/FXGImage/Workspace/.metadata/.plugins/org.eclipse.core.resources/.history/86/101b891e01800011188aed2ccaf77e02
URL: http://svn.apache.org/viewvc/incubator/flex/whiteboard/jhouser/FXGImage/Workspace/.metadata/.plugins/org.eclipse.core.resources/.history/86/101b891e01800011188aed2ccaf77e02?rev=1310637&view=auto
==============================================================================
--- incubator/flex/whiteboard/jhouser/FXGImage/Workspace/.metadata/.plugins/org.eclipse.core.resources/.history/86/101b891e01800011188aed2ccaf77e02 (added)
+++ incubator/flex/whiteboard/jhouser/FXGImage/Workspace/.metadata/.plugins/org.eclipse.core.resources/.history/86/101b891e01800011188aed2ccaf77e02 Fri Apr 6 23:38:20 2012
@@ -0,0 +1,93 @@
+<?xml version="1.0" encoding="utf-8"?>
+<s:Application xmlns:fx="http://ns.adobe.com/mxml/2009"
+ xmlns:s="library://ns.adobe.com/flex/spark"
+ xmlns:mx="library://ns.adobe.com/flex/mx" minWidth="955" minHeight="600" xmlns:local="*"
+ xmlns:utils="org.apache.utils.*">
+
+ <fx:Script>
+ <![CDATA[
+ protected function onXPositionChange(event:Event):void
+ {
+ flexLogo.x = xPosition.value;
+ }
+
+ protected function onYPositionChange(event:Event):void
+ {
+ flexLogo.y = yPosition.value;
+ }
+
+ protected function onHeightSliderChange(event:Event):void
+ {
+ flexLogo.height = this.heightSlider.value;
+ }
+
+ protected function onWidthSliderChange(event:Event):void
+ {
+ flexLogo.width = this.widthSlider.value;
+ }
+
+
+ protected function button1_clickHandler(event:MouseEvent):void
+ {
+ // TODO Auto-generated method stub
+ trace(flexLogo.width);
+ trace(flexLogo.height);
+ trace(imageGroup.width);
+ trace(imageGroup.height);
+ }
+
+
+ protected function onYOffsetChange(event:Event):void
+ {
+ flexLogo.yOffset = this.yOffSetSlider.value;
+ }
+
+ protected function onXOffsetChange(event:Event):void
+ {
+ flexLogo.xOffset = this.xOffSetSlider.value;
+ }
+
+ ]]>
+ </fx:Script>
+
+ <fx:Declarations>
+ <!-- Place non-visual elements (e.g., services, value objects) here -->
+ </fx:Declarations>
+
+
+ <s:HGroup width="100%" height="100%">
+ <s:Form>
+ <s:FormItem label="x" >
+ <s:HSlider id="xPosition" value="0" minimum="0" maximum="{imageGroup.width}" change="onXPositionChange(event)" />
+ </s:FormItem>
+ <s:FormItem label="y" >
+ <s:HSlider id="yPosition" value="0" minimum="0" maximum="{imageGroup.height}" change="onYPositionChange(event)"/>
+ </s:FormItem>
+ <s:FormItem label="width" >
+ <s:HSlider id="widthSlider" value="0" minimum="0" maximum="{imageGroup.width}" change="onWidthSliderChange(event)" />
+ </s:FormItem>
+ <s:FormItem label="height" >
+ <s:HSlider id="heightSlider" value="0" minimum="0" maximum="{imageGroup.height}" change="onHeightSliderChange(event)"/>
+ </s:FormItem>
+ <s:FormItem label="xOffset" >
+ <s:HSlider id="xOffSetSlider" value="0" minimum="-100" maximum="100" change="onXOffsetChange(event)"/>
+ </s:FormItem>
+ <s:FormItem label="yOffset" >
+ <s:HSlider id="yOffSetSlider" value="0" minimum="-100" maximum="100" change="onYOffsetChange(event)"/>
+ </s:FormItem>
+
+<!-- <s:FormItem >
+ <s:Button click="button1_clickHandler(event)" />
+ </s:FormItem>-->
+ </s:Form>
+
+
+ <s:Group width="100%" height="100%" id="imageGroup">
+ <utils:FXGImage source="org.apache.assets.apacheLogo.ApacheFlexLogo" id="flexLogo" />
+ </s:Group>
+
+ </s:HGroup>
+
+
+
+</s:Application>
Propchange: incubator/flex/whiteboard/jhouser/FXGImage/Workspace/.metadata/.plugins/org.eclipse.core.resources/.history/86/101b891e01800011188aed2ccaf77e02
------------------------------------------------------------------------------
svn:eol-style = native
Added: incubator/flex/whiteboard/jhouser/FXGImage/Workspace/.metadata/.plugins/org.eclipse.core.resources/.history/8b/007599ba00800011188aed2ccaf77e02
URL: http://svn.apache.org/viewvc/incubator/flex/whiteboard/jhouser/FXGImage/Workspace/.metadata/.plugins/org.eclipse.core.resources/.history/8b/007599ba00800011188aed2ccaf77e02?rev=1310637&view=auto
==============================================================================
--- incubator/flex/whiteboard/jhouser/FXGImage/Workspace/.metadata/.plugins/org.eclipse.core.resources/.history/8b/007599ba00800011188aed2ccaf77e02 (added)
+++ incubator/flex/whiteboard/jhouser/FXGImage/Workspace/.metadata/.plugins/org.eclipse.core.resources/.history/8b/007599ba00800011188aed2ccaf77e02 Fri Apr 6 23:38:20 2012
@@ -0,0 +1,139 @@
+package org.apache.utils
+{
+ import flash.display.DisplayObject;
+ import flash.display.Sprite;
+
+ import mx.core.UIComponent;
+
+ public class FXGImage extends UIComponent
+ {
+ public function FXGImage(source:Class = null)
+ {
+ if(source){
+ this.source = source;
+ }
+ super();
+ }
+
+ private var _source : Class;
+
+ /**
+ * @private
+ * This property is used to tell if the source has changed (or not).
+ */
+ protected var sourceChanged :Boolean = true;
+
+ /**
+ * This property will be used to reference the class we want to use for the display.
+ * Only tested with FXG files; but in theory any class name should work, such as an embedded library symbol from a Flash Pro SWF.
+ */
+ public function get source():Class
+ {
+ return _source;
+ }
+
+ public function set source(value:Class):void
+ {
+ _source = value;
+ sourceChanged = true;
+ this.commitProperties();
+ }
+
+
+ /**
+ * This will contain the instance created from the source.
+ */
+ protected var imageInstance : DisplayObject;
+
+ /**
+ * If we want to off set the X position of the asset; you can use this.
+ *
+ * @default 0
+ */
+ public var xOffset :int = 0;
+
+ /**
+ * If we want to off set the Y position of the asset; you can use this.
+ *
+ * @default 0
+ */
+ public var yOffset :int = 0;
+
+ /**
+ * If we want to add a value to the asset's default height; you can use this property. The default is zero, which means the asset
+ * will be sized based on the height and width of this component.
+ *
+ * @default 0
+ */
+ public var heightIncrement :int = 0;
+
+ /**
+ * If we want to add a value to the asset's default width; you can use this property. The default is zero, which means the asset
+ * will be sized based on the height and width of this component.
+ *
+ * @default 0
+ */
+ public var widthIncrement :int = 0;
+
+
+ /**
+ * @private
+ */
+ override protected function createChildren():void{
+ super.createChildren();
+
+ // if the source has changed we want to create, or recreate, the image instance
+ if(this.sourceChanged){
+ // if the instance has a value, then delete it
+ if(this.imageInstance){
+ this.removeChild(this.imageInstance);
+ this.imageInstance = null;
+ }
+
+ // if we have a source value; create the source
+ if(this.source){
+ this.imageInstance = new source();
+ this.imageInstance.x = 0 + xOffset;
+ this.imageInstance.y = 0 + yOffset;
+ this.addChild(this.imageInstance);
+ }
+ this.sourceChanged = false;
+
+ }
+ }
+
+ /**
+ * @private
+ */
+ override protected function commitProperties():void{
+ super.commitProperties();
+
+ if(this.sourceChanged){
+ // if the source changed re-created it; which is done in createChildren();
+ this.createChildren();
+ }
+ }
+
+ /**
+ * @private
+ */
+ override protected function updateDisplayList(unscaledWidth:Number, unscaledHeight:Number):void{
+ super.updateDisplayList(unscaledWidth, unscaledHeight);
+
+ // size the element.
+ // I don't remember why I Wrote the code to check for unscaledHeight and unscaledWidth being 0
+ if(unscaledHeight != 0){
+ this.imageInstance.height = unscaledHeight + this.heightIncrement;
+ }
+ if(unscaledWidth != 0){
+ this.imageInstance.width = unscaledWidth + this.widthIncrement;
+ }
+
+ // position the element
+ this.imageInstance.x = 0 + xOffset;
+ this.imageInstance.y = 0 + yOffset;
+
+ }
+
+ }
+}
\ No newline at end of file
Propchange: incubator/flex/whiteboard/jhouser/FXGImage/Workspace/.metadata/.plugins/org.eclipse.core.resources/.history/8b/007599ba00800011188aed2ccaf77e02
------------------------------------------------------------------------------
svn:eol-style = native