Skip to content

Commit

Permalink
UI update, mockup, treemap logo
Browse files Browse the repository at this point in the history
  • Loading branch information
gka committed Aug 5, 2011
1 parent 925c871 commit 0773943
Show file tree
Hide file tree
Showing 24 changed files with 448 additions and 2 deletions.
3 changes: 3 additions & 0 deletions .gitmodules
Expand Up @@ -7,3 +7,6 @@
[submodule "as3project/lib/minimalcomps"]
path = as3project/lib/minimalcomps
url = git@github.com:gka/minimalcomps.git
[submodule "as3project/lib/vis4.as"]
path = as3project/lib/vis4.as
url = git@github.com:gka/vis4.as.git
4 changes: 3 additions & 1 deletion as3project/Treemapr.as3proj
Expand Up @@ -9,14 +9,16 @@
<movie width="800" />
<movie height="600" />
<movie version="10" />
<movie background="#FFFFFF" />
<movie background="#000000" />
</output>
<!-- Other classes to be compiled into your SWF -->
<classpaths>
<class path="src" />
<class path="lib\as3corelib\src" />
<class path="lib\minimalcomps\src" />
<class path="lib\as3treemap\src" />
<class path="lib\vis4.as\src" />
<class path="lib\others" />
</classpaths>
<!-- Build options -->
<build>
Expand Down
Binary file added as3project/bin/Treemapr.swf
Binary file not shown.
52 changes: 52 additions & 0 deletions as3project/bin/ui/ui.xml
@@ -0,0 +1,52 @@
<?xml version="1.0" encoding="utf-8" ?>
<comps>
<Panel x="10" y="60" width="200" height="800">
<VBox spacing="30">

<VBox spacing="10">
<PushButton label="(1) Import data" width="170" height="35" />
<HBox x="0" y="10">
<RadioButton width="40" label="CSV" />
<RadioButton width="40" label="XML" />
<RadioButton label="JSON" />
</HBox>
<HBox x="0" y="10">
<RadioButton width="40" label="Flat" />
<RadioButton width="40" label="Nested" />
</HBox>
<HBox>
<VBox spacing="7">
<Label width="60" text="Label"/>
<Label width="60" text="Weight"/>
<Label width="60" text="Id"/>
<Label width="60" text="Parent-Id"/>
</VBox>
<VBox spacing="6">
<ComboBox />
<ComboBox />
<ComboBox />
<ComboBox />
</VBox>
</HBox>
<HBox x="40">
<PushButton width="50" label="Test" />
<PushButton width="50" label="Finish" />
</HBox>
</VBox>

<VBox spacing="10">
<HBox x="0" y="10">
<RadioButton width="40" label="PNG" />
<RadioButton width="40" label="JPG" />
<RadioButton width="40" label="PDF" />
<RadioButton width="40" label="SVG" />
</HBox>

<PushButton label="EXPORT" width="170" height="35" />


</VBox>

</VBox>
</Panel>
</comps>
2 changes: 1 addition & 1 deletion as3project/lib/minimalcomps
94 changes: 94 additions & 0 deletions as3project/lib/others/math/Random.as
@@ -0,0 +1,94 @@

/**
*
* Random
*
* @version 1.00 | Feb 7, 2010
* @author Justin Windle
*
**/

package math
{

/**
* Random
*/
public class Random
{

// ----------------------------------------------------------------
// CONSTANTS
// ----------------------------------------------------------------

private static var _num : Number = 1.0;
private static var _seed : Number = 1.0;

// ----------------------------------------------------------------
// METHODS
// ----------------------------------------------------------------

public static function randomSeed() : void
{
seed = Math.random() * 2147483647;
trace("seed: " + _seed);
}

public static function next() : Number
{
_num = ( _num * 16807 ) % 2147483647;
return _num * 4.656612875245797e-10;
}

public static function float( min : Number, max : Number = NaN ) : Number
{
if ( isNaN(max) )
{
max = min;
min = 0;
}

return next() * ( max - min ) + min;
}

public static function integer( min : Number, max : Number = NaN ) : int
{
if ( isNaN(max) )
{
max = min;
min = 0;
}

return int( (next() * ( max - min ) + min) + 0.5 );
}

public static function bool(chance : Number = 0.5) : Boolean
{
return Random.next() < chance;
}

public static function sign(change : Number = 0.5) : int
{
return next() < change ? 1 : -1;
}

public static function obj(list : Array) : *
{
return list[ int(next() * list.length) ];
}

// ----------------------------------------------------------------
// ACCESSORS
// ----------------------------------------------------------------

public static function get seed() : Number
{
return _seed;
}

public static function set seed(value : Number) : void
{
_seed = _num = value;
}
}
}
1 change: 1 addition & 0 deletions as3project/lib/vis4.as
Submodule vis4.as added at 78072d
39 changes: 39 additions & 0 deletions as3project/obj/TreemaprConfig.old
@@ -0,0 +1,39 @@
<?xml version="1.0" encoding="utf-8"?>
<!--This Adobe Flex compiler configuration file was generated by a tool.-->
<!--Any modifications you make may be lost.-->
<flex-config>
<target-player>10.0.0</target-player>
<compiler>
<define append="true">
<name>CONFIG::debug</name>
<value>true</value>
</define>
<define append="true">
<name>CONFIG::release</name>
<value>false</value>
</define>
<define append="true">
<name>CONFIG::timeStamp</name>
<value>'8/5/2011'</value>
</define>
<source-path append="true">
<path-element>Z:\Incubator\treemapr\as3project\src</path-element>
<path-element>Z:\Incubator\treemapr\as3project\lib\as3corelib\src</path-element>
<path-element>Z:\Incubator\treemapr\as3project\lib\minimalcomps\src</path-element>
<path-element>Z:\Incubator\treemapr\as3project\lib\as3treemap\src</path-element>
<path-element>Z:\Incubator\treemapr\as3project\lib\vis4.as\src</path-element>
<path-element>Z:\Incubator\treemapr\as3project\lib\others</path-element>
<path-element>\\psf\Home\Documents\www\moritz\sl\relbrowser</path-element>
<path-element>C:\Program Files\FlashDevelop\Library\AS3\classes</path-element>
</source-path>
</compiler>
<file-specs>
<path-element>Z:\Incubator\treemapr\as3project\src\Main.as</path-element>
</file-specs>
<default-background-color>#000000</default-background-color>
<default-frame-rate>30</default-frame-rate>
<default-size>
<width>800</width>
<height>600</height>
</default-size>
</flex-config>
39 changes: 39 additions & 0 deletions as3project/obj/TreemaprConfig.xml
@@ -0,0 +1,39 @@
<?xml version="1.0" encoding="utf-8"?>
<!--This Adobe Flex compiler configuration file was generated by a tool.-->
<!--Any modifications you make may be lost.-->
<flex-config>
<target-player>10.0.0</target-player>
<compiler>
<define append="true">
<name>CONFIG::debug</name>
<value>true</value>
</define>
<define append="true">
<name>CONFIG::release</name>
<value>false</value>
</define>
<define append="true">
<name>CONFIG::timeStamp</name>
<value>'8/5/2011'</value>
</define>
<source-path append="true">
<path-element>Z:\Incubator\treemapr\as3project\src</path-element>
<path-element>Z:\Incubator\treemapr\as3project\lib\as3corelib\src</path-element>
<path-element>Z:\Incubator\treemapr\as3project\lib\minimalcomps\src</path-element>
<path-element>Z:\Incubator\treemapr\as3project\lib\as3treemap\src</path-element>
<path-element>Z:\Incubator\treemapr\as3project\lib\vis4.as\src</path-element>
<path-element>Z:\Incubator\treemapr\as3project\lib\others</path-element>
<path-element>\\psf\Home\Documents\www\moritz\sl\relbrowser</path-element>
<path-element>C:\Program Files\FlashDevelop\Library\AS3\classes</path-element>
</source-path>
</compiler>
<file-specs>
<path-element>Z:\Incubator\treemapr\as3project\src\Main.as</path-element>
</file-specs>
<default-background-color>#000000</default-background-color>
<default-frame-rate>30</default-frame-rate>
<default-size>
<width>800</width>
<height>600</height>
</default-size>
</flex-config>
20 changes: 20 additions & 0 deletions as3project/src/Main.as
@@ -1,7 +1,14 @@
package
{
import assets.font.Lato;
import assets.font.RondaSeven;
import com.bit101.components.Style;
import com.bit101.utils.MinimalConfigurator;
import flash.display.Graphics;
import flash.display.Sprite;
import flash.events.Event;
import net.vis4.text.Label;
import ui.TreemaprLogo;

/**
* ...
Expand All @@ -20,6 +27,19 @@ package
{
removeEventListener(Event.ADDED_TO_STAGE, init);
// entry point

stage.scaleMode = 'noScale';
stage.align = 'TL';

new TreemaprLogo(this);

Style.setStyle(Style.BLACK);
//Style.fontName = 'Lato Normal';
//Style.fontSize = 11;

var minimalConf:MinimalConfigurator = new MinimalConfigurator(this);
minimalConf.loadXML('ui/ui.xml');

}

}
Expand Down
Binary file added as3project/src/assets/font/Lato-Black.ttf
Binary file not shown.
Binary file added as3project/src/assets/font/Lato-BlackItalic.ttf
Binary file not shown.
Binary file added as3project/src/assets/font/Lato-Bold.ttf
Binary file not shown.
Binary file added as3project/src/assets/font/Lato-BoldItalic.ttf
Binary file not shown.
Binary file added as3project/src/assets/font/Lato-Hairline.ttf
Binary file not shown.
Binary file not shown.
Binary file added as3project/src/assets/font/Lato-Italic.ttf
Binary file not shown.
Binary file added as3project/src/assets/font/Lato-Light.ttf
Binary file not shown.
Binary file added as3project/src/assets/font/Lato-LightItalic.ttf
Binary file not shown.
Binary file added as3project/src/assets/font/Lato-Regular.ttf
Binary file not shown.
75 changes: 75 additions & 0 deletions as3project/src/assets/font/Lato.as
@@ -0,0 +1,75 @@
package assets.font
{
import net.vis4.text.fonts.EmbeddedFont;
import net.vis4.text.fonts.SystemFont;


/**
* ...
* @author gka
*/
public class Lato extends EmbeddedFont
{

[Embed(
source = "Lato-Hairline.ttf",
fontName = "Lato Hairline",
unicodeRange = "U+0020-U+00FF,U+2000-U+206F,U+20A0-U+20CF,U+2100-U+2183",
mimeType = "application/x-font-truetype"
)]
private var _lato100:Class;

[Embed(
source = "Lato-Light.ttf",
fontName = "Lato Book",
unicodeRange = "U+0020-U+00FF,U+2000-U+206F,U+20A0-U+20CF,U+2100-U+2183",
mimeType = "application/x-font-truetype"
)]
private var _lato300:Class;

[Embed(
source = "Lato-Regular.ttf",
fontName = "Lato Normal",
unicodeRange = "U+0020-U+00FF,U+2000-U+206F,U+20A0-U+20CF,U+2100-U+2183",
mimeType = "application/x-font-truetype"
)]
private var _lato400:Class;

[Embed(
source = "Lato-Bold.ttf",
fontName = "Lato Bold",
fontWeight = "bold",
unicodeRange = "U+0020-U+00FF,U+2000-U+206F,U+20A0-U+20CF,U+2100-U+2183",
mimeType = "application/x-font-truetype"
)]
private var _lato700:Class;

[Embed(
source = "Lato-Black.ttf",
fontName = "Lato Black",
unicodeRange = "U+0020-U+00FF,U+2000-U+206F,U+20A0-U+20CF,U+2100-U+2183",
mimeType = "application/x-font-truetype"
)]
private var _lato900:Class;

public function Lato(props:Object)
{
var weight:Object = {
'100': 'Hairline',
'300': 'Book',
'400': 'Normal',
'700': 'Bold',
'900': 'Black'
}

if (props.bold) props.weight = '700';
props.name = 'Lato ' + (props.weight ? weight[props.weight] : 'Normal');
if (props.weight == 700) props.bold = true;

props.antiAliasType = 'advanced';
super(props);
}

}

}

0 comments on commit 0773943

Please sign in to comment.