You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@flex.apache.org by ak...@apache.org on 2014/10/07 04:18:26 UTC
[1/3] Added FlatSpark project
Repository: flex-sdk
Updated Branches:
refs/heads/develop 105ae47b3 -> e72f72e3a
http://git-wip-us.apache.org/repos/asf/flex-sdk/blob/e72f72e3/frameworks/projects/flatspark/src/utils/AwesomeUtils.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/flatspark/src/utils/AwesomeUtils.as b/frameworks/projects/flatspark/src/utils/AwesomeUtils.as
new file mode 100644
index 0000000..717e5c1
--- /dev/null
+++ b/frameworks/projects/flatspark/src/utils/AwesomeUtils.as
@@ -0,0 +1,399 @@
+/**
+ Licensed to the Apache Software Foundation (ASF) under one or more
+ contributor license agreements. See the NOTICE file distributed with
+ this work for additional information regarding copyright ownership.
+ The ASF licenses this file to You under the Apache License, Version 2.0
+ (the "License"); you may not use this file except in compliance with
+ the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+ */
+
+package flatSpark.utils
+{
+ public class AwesomeUtils
+ {
+
+ public function AwesomeUtils()
+ {
+
+ }
+
+ public static const fa_glass:String = "\uf000";
+ public static const fa_music:String = "\uf001";
+ public static const fa_search:String = "\uf002";
+ public static const fa_envelope_o:String = "\uf003";
+ public static const fa_heart:String = "\uf004";
+ public static const fa_star:String = "\uf005";
+ public static const fa_star_o:String = "\uf006";
+ public static const fa_user:String = "\uf007";
+ public static const fa_film:String = "\uf008";
+ public static const fa_th_large:String = "\uf009";
+ public static const fa_th:String = "\uf00a";
+ public static const fa_th_list:String = "\uf00b";
+ public static const fa_check:String = "\uf00c";
+ public static const fa_times:String = "\uf00d";
+ public static const fa_search_plus:String = "\uf00e";
+ public static const fa_search_minus:String = "\uf010";
+ public static const fa_power_off:String = "\uf011";
+ public static const fa_signal:String = "\uf012";
+ public static const fa_cog:String = "\uf013";
+ public static const fa_trash_o:String = "\uf014";
+ public static const fa_home:String = "\uf015";
+ public static const fa_file_o:String = "\uf016";
+ public static const fa_clock_o:String = "\uf017";
+ public static const fa_road:String = "\uf018";
+ public static const fa_download:String = "\uf019";
+ public static const fa_arrow_circle_o_down:String = "\uf01a";
+ public static const fa_arrow_circle_o_up:String = "\uf01b";
+ public static const fa_inbox:String = "\uf01c";
+ public static const fa_play_circle_o:String = "\uf01d";
+ public static const fa_repeat:String = "\uf01e";
+ public static const fa_refresh:String = "\uf021";
+ public static const fa_list_alt:String = "\uf022";
+ public static const fa_lock:String = "\uf023";
+ public static const fa_flag:String = "\uf024";
+ public static const fa_headphones:String = "\uf025";
+ public static const fa_volume_off:String = "\uf026";
+ public static const fa_volume_down:String = "\uf027";
+ public static const fa_volume_up:String = "\uf028";
+ public static const fa_qrcode:String = "\uf029";
+ public static const fa_barcode:String = "\uf02a";
+ public static const fa_tag:String = "\uf02b";
+ public static const fa_tags:String = "\uf02c";
+ public static const fa_book:String = "\uf02d";
+ public static const fa_bookmark:String = "\uf02e";
+ public static const fa_print:String = "\uf02f";
+ public static const fa_camera:String = "\uf030";
+ public static const fa_font:String = "\uf031";
+ public static const fa_bold:String = "\uf032";
+ public static const fa_italic:String = "\uf033";
+ public static const fa_text_height:String = "\uf034";
+ public static const fa_text_width:String = "\uf035";
+ public static const fa_align_left:String = "\uf036";
+ public static const fa_align_center:String = "\uf037";
+ public static const fa_align_right:String = "\uf038";
+ public static const fa_align_justify:String = "\uf039";
+ public static const fa_list:String = "\uf03a";
+ public static const fa_outdent:String = "\uf03b";
+ public static const fa_indent:String = "\uf03c";
+ public static const fa_video_camera:String = "\uf03d";
+ public static const fa_picture_o:String = "\uf03e";
+ public static const fa_pencil:String = "\uf040";
+ public static const fa_map_marker:String = "\uf041";
+ public static const fa_adjust:String = "\uf042";
+ public static const fa_tint:String = "\uf043";
+ public static const fa_pencil_square_o:String = "\uf044";
+ public static const fa_share_square_o:String = "\uf045";
+ public static const fa_check_square_o:String = "\uf046";
+ public static const fa_arrows:String = "\uf047";
+ public static const fa_step_backward:String = "\uf048";
+ public static const fa_fast_backward:String = "\uf049";
+ public static const fa_backward:String = "\uf04a";
+ public static const fa_play:String = "\uf04b";
+ public static const fa_pause:String = "\uf04c";
+ public static const fa_stop:String = "\uf04d";
+ public static const fa_forward:String = "\uf04e";
+ public static const fa_fast_forward:String = "\uf050";
+ public static const fa_step_forward:String = "\uf051";
+ public static const fa_eject:String = "\uf052";
+ public static const fa_chevron_left:String = "\uf053";
+ public static const fa_chevron_right:String = "\uf054";
+ public static const fa_plus_circle:String = "\uf055";
+ public static const fa_minus_circle:String = "\uf056";
+ public static const fa_times_circle:String = "\uf057";
+ public static const fa_check_circle:String = "\uf058";
+ public static const fa_question_circle:String = "\uf059";
+ public static const fa_info_circle:String = "\uf05a";
+ public static const fa_crosshairs:String = "\uf05b";
+ public static const fa_times_circle_o:String = "\uf05c";
+ public static const fa_check_circle_o:String = "\uf05d";
+ public static const fa_ban:String = "\uf05e";
+ public static const fa_arrow_left:String = "\uf060";
+ public static const fa_arrow_right:String = "\uf061";
+ public static const fa_arrow_up:String = "\uf062";
+ public static const fa_arrow_down:String = "\uf063";
+ public static const fa_share:String = "\uf064";
+ public static const fa_expand:String = "\uf065";
+ public static const fa_compress:String = "\uf066";
+ public static const fa_plus:String = "\uf067";
+ public static const fa_minus:String = "\uf068";
+ public static const fa_asterisk:String = "\uf069";
+ public static const fa_exclamation_circle:String = "\uf06a";
+ public static const fa_gift:String = "\uf06b";
+ public static const fa_leaf:String = "\uf06c";
+ public static const fa_fire:String = "\uf06d";
+ public static const fa_eye:String = "\uf06e";
+ public static const fa_eye_slash:String = "\uf070";
+ public static const fa_exclamation_triangle:String = "\uf071";
+ public static const fa_plane:String = "\uf072";
+ public static const fa_calendar:String = "\uf073";
+ public static const fa_random:String = "\uf074";
+ public static const fa_comment:String = "\uf075";
+ public static const fa_magnet:String = "\uf076";
+ public static const fa_chevron_up:String = "\uf077";
+ public static const fa_chevron_down:String = "\uf078";
+ public static const fa_retweet:String = "\uf079";
+ public static const fa_shopping_cart:String = "\uf07a";
+ public static const fa_folder:String = "\uf07b";
+ public static const fa_folder_open:String = "\uf07c";
+ public static const fa_arrows_v:String = "\uf07d";
+ public static const fa_arrows_h:String = "\uf07e";
+ public static const fa_bar_chart_o:String = "\uf080";
+ public static const fa_twitter_square:String = "\uf081";
+ public static const fa_facebook_square:String = "\uf082";
+ public static const fa_camera_retro:String = "\uf083";
+ public static const fa_key:String = "\uf084";
+ public static const fa_cogs:String = "\uf085";
+ public static const fa_comments:String = "\uf086";
+ public static const fa_thumbs_o_up:String = "\uf087";
+ public static const fa_thumbs_o_down:String = "\uf088";
+ public static const fa_star_half:String = "\uf089";
+ public static const fa_heart_o:String = "\uf08a";
+ public static const fa_sign_out:String = "\uf08b";
+ public static const fa_linkedin_square:String = "\uf08c";
+ public static const fa_thumb_tack:String = "\uf08d";
+ public static const fa_external_link:String = "\uf08e";
+ public static const fa_sign_in:String = "\uf090";
+ public static const fa_trophy:String = "\uf091";
+ public static const fa_github_square:String = "\uf092";
+ public static const fa_upload:String = "\uf093";
+ public static const fa_lemon_o:String = "\uf094";
+ public static const fa_phone:String = "\uf095";
+ public static const fa_square_o:String = "\uf096";
+ public static const fa_bookmark_o:String = "\uf097";
+ public static const fa_phone_square:String = "\uf098";
+ public static const fa_twitter:String = "\uf099";
+ public static const fa_facebook:String = "\uf09a";
+ public static const fa_github:String = "\uf09b";
+ public static const fa_unlock:String = "\uf09c";
+ public static const fa_credit_card:String = "\uf09d";
+ public static const fa_rss:String = "\uf09e";
+ public static const fa_hdd_o:String = "\uf0a0";
+ public static const fa_bullhorn:String = "\uf0a1";
+ public static const fa_bell:String = "\uf0f3";
+ public static const fa_certificate:String = "\uf0a3";
+ public static const fa_hand_o_right:String = "\uf0a4";
+ public static const fa_hand_o_left:String = "\uf0a5";
+ public static const fa_hand_o_up:String = "\uf0a6";
+ public static const fa_hand_o_down:String = "\uf0a7";
+ public static const fa_arrow_circle_left:String = "\uf0a8";
+ public static const fa_arrow_circle_right:String = "\uf0a9";
+ public static const fa_arrow_circle_up:String = "\uf0aa";
+ public static const fa_arrow_circle_down:String = "\uf0ab";
+ public static const fa_globe:String = "\uf0ac";
+ public static const fa_wrench:String = "\uf0ad";
+ public static const fa_tasks:String = "\uf0ae";
+ public static const fa_filter:String = "\uf0b0";
+ public static const fa_briefcase:String = "\uf0b1";
+ public static const fa_arrows_alt:String = "\uf0b2";
+ public static const fa_users:String = "\uf0c0";
+ public static const fa_link:String = "\uf0c1";
+ public static const fa_cloud:String = "\uf0c2";
+ public static const fa_flask:String = "\uf0c3";
+ public static const fa_scissors:String = "\uf0c4";
+ public static const fa_files_o:String = "\uf0c5";
+ public static const fa_paperclip:String = "\uf0c6";
+ public static const fa_floppy_o:String = "\uf0c7";
+ public static const fa_square:String = "\uf0c8";
+ public static const fa_bars:String = "\uf0c9";
+ public static const fa_list_ul:String = "\uf0ca";
+ public static const fa_list_ol:String = "\uf0cb";
+ public static const fa_strikethrough:String = "\uf0cc";
+ public static const fa_underline:String = "\uf0cd";
+ public static const fa_table:String = "\uf0ce";
+ public static const fa_magic:String = "\uf0d0";
+ public static const fa_truck:String = "\uf0d1";
+ public static const fa_pinterest:String = "\uf0d2";
+ public static const fa_pinterest_square:String = "\uf0d3";
+ public static const fa_google_plus_square:String = "\uf0d4";
+ public static const fa_google_plus:String = "\uf0d5";
+ public static const fa_money:String = "\uf0d6";
+ public static const fa_caret_down:String = "\uf0d7";
+ public static const fa_caret_up:String = "\uf0d8";
+ public static const fa_caret_left:String = "\uf0d9";
+ public static const fa_caret_right:String = "\uf0da";
+ public static const fa_columns:String = "\uf0db";
+ public static const fa_sort:String = "\uf0dc";
+ public static const fa_sort_asc:String = "\uf0dd";
+ public static const fa_sort_desc:String = "\uf0de";
+ public static const fa_envelope:String = "\uf0e0";
+ public static const fa_linkedin:String = "\uf0e1";
+ public static const fa_undo:String = "\uf0e2";
+ public static const fa_gavel:String = "\uf0e3";
+ public static const fa_tachometer:String = "\uf0e4";
+ public static const fa_comment_o:String = "\uf0e5";
+ public static const fa_comments_o:String = "\uf0e6";
+ public static const fa_bolt:String = "\uf0e7";
+ public static const fa_sitemap:String = "\uf0e8";
+ public static const fa_umbrella:String = "\uf0e9";
+ public static const fa_clipboard:String = "\uf0ea";
+ public static const fa_lightbulb_o:String = "\uf0eb";
+ public static const fa_exchange:String = "\uf0ec";
+ public static const fa_cloud_download:String = "\uf0ed";
+ public static const fa_cloud_upload:String = "\uf0ee";
+ public static const fa_user_md:String = "\uf0f0";
+ public static const fa_stethoscope:String = "\uf0f1";
+ public static const fa_suitcase:String = "\uf0f2";
+ public static const fa_bell_o:String = "\uf0a2";
+ public static const fa_coffee:String = "\uf0f4";
+ public static const fa_cutlery:String = "\uf0f5";
+ public static const fa_file_text_o:String = "\uf0f6";
+ public static const fa_building_o:String = "\uf0f7";
+ public static const fa_hospital_o:String = "\uf0f8";
+ public static const fa_ambulance:String = "\uf0f9";
+ public static const fa_medkit:String = "\uf0fa";
+ public static const fa_fighter_jet:String = "\uf0fb";
+ public static const fa_beer:String = "\uf0fc";
+ public static const fa_h_square:String = "\uf0fd";
+ public static const fa_plus_square:String = "\uf0fe";
+ public static const fa_angle_double_left:String = "\uf100";
+ public static const fa_angle_double_right:String = "\uf101";
+ public static const fa_angle_double_up:String = "\uf102";
+ public static const fa_angle_double_down:String = "\uf103";
+ public static const fa_angle_left:String = "\uf104";
+ public static const fa_angle_right:String = "\uf105";
+ public static const fa_angle_up:String = "\uf106";
+ public static const fa_angle_down:String = "\uf107";
+ public static const fa_desktop:String = "\uf108";
+ public static const fa_laptop:String = "\uf109";
+ public static const fa_tablet:String = "\uf10a";
+ public static const fa_mobile:String = "\uf10b";
+ public static const fa_circle_o:String = "\uf10c";
+ public static const fa_quote_left:String = "\uf10d";
+ public static const fa_quote_right:String = "\uf10e";
+ public static const fa_spinner:String = "\uf110";
+ public static const fa_circle:String = "\uf111";
+ public static const fa_reply:String = "\uf112";
+ public static const fa_github_alt:String = "\uf113";
+ public static const fa_folder_o:String = "\uf114";
+ public static const fa_folder_open_o:String = "\uf115";
+ public static const fa_smile_o:String = "\uf118";
+ public static const fa_frown_o:String = "\uf119";
+ public static const fa_meh_o:String = "\uf11a";
+ public static const fa_gamepad:String = "\uf11b";
+ public static const fa_keyboard_o:String = "\uf11c";
+ public static const fa_flag_o:String = "\uf11d";
+ public static const fa_flag_checkered:String = "\uf11e";
+ public static const fa_terminal:String = "\uf120";
+ public static const fa_code:String = "\uf121";
+ public static const fa_reply_all:String = "\uf122";
+ public static const fa_mail_reply_all:String = "\uf122";
+ public static const fa_star_half_o:String = "\uf123";
+ public static const fa_location_arrow:String = "\uf124";
+ public static const fa_crop:String = "\uf125";
+ public static const fa_code_fork:String = "\uf126";
+ public static const fa_chain_broken:String = "\uf127";
+ public static const fa_question:String = "\uf128";
+ public static const fa_info:String = "\uf129";
+ public static const fa_exclamation:String = "\uf12a";
+ public static const fa_superscript:String = "\uf12b";
+ public static const fa_subscript:String = "\uf12c";
+ public static const fa_eraser:String = "\uf12d";
+ public static const fa_puzzle_piece:String = "\uf12e";
+ public static const fa_microphone:String = "\uf130";
+ public static const fa_microphone_slash:String = "\uf131";
+ public static const fa_shield:String = "\uf132";
+ public static const fa_calendar_o:String = "\uf133";
+ public static const fa_fire_extinguisher:String = "\uf134";
+ public static const fa_rocket:String = "\uf135";
+ public static const fa_maxcdn:String = "\uf136";
+ public static const fa_chevron_circle_left:String = "\uf137";
+ public static const fa_chevron_circle_right:String = "\uf138";
+ public static const fa_chevron_circle_up:String = "\uf139";
+ public static const fa_chevron_circle_down:String = "\uf13a";
+ public static const fa_html5:String = "\uf13b";
+ public static const fa_css3:String = "\uf13c";
+ public static const fa_anchor:String = "\uf13d";
+ public static const fa_unlock_alt:String = "\uf13e";
+ public static const fa_bullseye:String = "\uf140";
+ public static const fa_ellipsis_h:String = "\uf141";
+ public static const fa_ellipsis_v:String = "\uf142";
+ public static const fa_rss_square:String = "\uf143";
+ public static const fa_play_circle:String = "\uf144";
+ public static const fa_ticket:String = "\uf145";
+ public static const fa_minus_square:String = "\uf146";
+ public static const fa_minus_square_o:String = "\uf147";
+ public static const fa_level_up:String = "\uf148";
+ public static const fa_level_down:String = "\uf149";
+ public static const fa_check_square:String = "\uf14a";
+ public static const fa_pencil_square:String = "\uf14b";
+ public static const fa_external_link_square:String = "\uf14c";
+ public static const fa_share_square:String = "\uf14d";
+ public static const fa_compass:String = "\uf14e";
+ public static const fa_caret_square_o_down:String = "\uf150";
+ public static const fa_caret_square_o_up:String = "\uf151";
+ public static const fa_caret_square_o_right:String = "\uf152";
+ public static const fa_eur:String = "\uf153";
+ public static const fa_gbp:String = "\uf154";
+ public static const fa_usd:String = "\uf155";
+ public static const fa_inr:String = "\uf156";
+ public static const fa_jpy:String = "\uf157";
+ public static const fa_rub:String = "\uf158";
+ public static const fa_krw:String = "\uf159";
+ public static const fa_btc:String = "\uf15a";
+ public static const fa_file:String = "\uf15b";
+ public static const fa_file_text:String = "\uf15c";
+ public static const fa_sort_alpha_asc:String = "\uf15d";
+ public static const fa_sort_alpha_desc:String = "\uf15e";
+ public static const fa_sort_amount_asc:String = "\uf160";
+ public static const fa_sort_amount_desc:String = "\uf161";
+ public static const fa_sort_numeric_asc:String = "\uf162";
+ public static const fa_sort_numeric_desc:String = "\uf163";
+ public static const fa_thumbs_up:String = "\uf164";
+ public static const fa_thumbs_down:String = "\uf165";
+ public static const fa_youtube_square:String = "\uf166";
+ public static const fa_youtube:String = "\uf167";
+ public static const fa_xing:String = "\uf168";
+ public static const fa_xing_square:String = "\uf169";
+ public static const fa_youtube_play:String = "\uf16a";
+ public static const fa_dropbox:String = "\uf16b";
+ public static const fa_stack_overflow:String = "\uf16c";
+ public static const fa_instagram:String = "\uf16d";
+ public static const fa_flickr:String = "\uf16e";
+ public static const fa_adn:String = "\uf170";
+ public static const fa_bitbucket:String = "\uf171";
+ public static const fa_bitbucket_square:String = "\uf172";
+ public static const fa_tumblr:String = "\uf173";
+ public static const fa_tumblr_square:String = "\uf174";
+ public static const fa_long_arrow_down:String = "\uf175";
+ public static const fa_long_arrow_up:String = "\uf176";
+ public static const fa_long_arrow_left:String = "\uf177";
+ public static const fa_long_arrow_right:String = "\uf178";
+ public static const fa_apple:String = "\uf179";
+ public static const fa_windows:String = "\uf17a";
+ public static const fa_android:String = "\uf17b";
+ public static const fa_linux:String = "\uf17c";
+ public static const fa_dribbble:String = "\uf17d";
+ public static const fa_skype:String = "\uf17e";
+ public static const fa_foursquare:String = "\uf180";
+ public static const fa_trello:String = "\uf181";
+ public static const fa_female:String = "\uf182";
+ public static const fa_male:String = "\uf183";
+ public static const fa_gittip:String = "\uf184";
+ public static const fa_sun_o:String = "\uf185";
+ public static const fa_moon_o:String = "\uf186";
+ public static const fa_archive:String = "\uf187";
+ public static const fa_bug:String = "\uf188";
+ public static const fa_vk:String = "\uf189";
+ public static const fa_weibo:String = "\uf18a";
+ public static const fa_renren:String = "\uf18b";
+ public static const fa_pagelines:String = "\uf18c";
+ public static const fa_stack_exchange:String = "\uf18d";
+ public static const fa_arrow_circle_o_right:String = "\uf18e";
+ public static const fa_arrow_circle_o_left:String = "\uf190";
+ public static const fa_caret_square_o_left:String = "\uf191";
+ public static const fa_dot_circle_o:String = "\uf192";
+ public static const fa_wheelchair:String = "\uf193";
+ public static const fa_vimeo_square:String = "\uf194";
+ public static const fa_try:String = "\uf195";
+ public static const fa_plus_square_o:String = "\uf196";
+
+ }
+}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/flex-sdk/blob/e72f72e3/frameworks/projects/flatspark/src/utils/ColorUtils.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/flatspark/src/utils/ColorUtils.as b/frameworks/projects/flatspark/src/utils/ColorUtils.as
new file mode 100644
index 0000000..d8a3adb
--- /dev/null
+++ b/frameworks/projects/flatspark/src/utils/ColorUtils.as
@@ -0,0 +1,90 @@
+/**
+ Licensed to the Apache Software Foundation (ASF) under one or more
+ contributor license agreements. See the NOTICE file distributed with
+ this work for additional information regarding copyright ownership.
+ The ASF licenses this file to You under the Apache License, Version 2.0
+ (the "License"); you may not use this file except in compliance with
+ the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+ */
+
+package flatSpark.utils
+{
+ import mx.states.State;
+
+ import flatSpark.enums.BrandColorEnum;
+ import flatSpark.enums.ButtonColorEnum;
+
+ public class ColorUtils
+ {
+ public static const Turquoise:uint = 0x1ABC9C;
+ public static const GreenSea:uint = 0x16A085;
+ public static const Emerald:uint = 0x2ECC71;
+ public static const Nephritis:uint = 0x27AE60;
+ public static const PeterRiver:uint = 0x3498DB;
+ public static const BelizeHole:uint = 0x2980B9;
+ public static const Amethyst:uint = 0x9B59B6;
+ public static const Wisteria:uint = 0x8E44AD;
+ public static const WetAsphalt:uint = 0x34495E;
+ public static const MidnightBlue:uint = 0x2C3E50;
+ public static const SunFlower:uint = 0xF1C40F;
+ public static const Orange:uint = 0xF39C12;
+ public static const Carrot:uint = 0xE67E22;
+ public static const Pumpkin:uint = 0xD35400;
+ public static const Alizarin:uint = 0xE74C3C;
+ public static const Pomegranate:uint = 0xC0392B;
+ public static const Clouds:uint = 0xECF0F1;
+ public static const Silver:uint = 0xBDC3C7;
+ public static const Concrete:uint = 0x95A5A6;
+ public static const Asbestos:uint = 0x7F8C8D;
+
+ public function ColorUtils()
+ {
+
+ }
+
+ public static function ButtonColor(brand:int, estado:State):uint
+ {
+ // All the possible colors
+ var cores:Array = new Array(
+ ButtonColorEnum.PrimaryUp, ButtonColorEnum.PrimaryHover, ButtonColorEnum.PrimaryDown, ButtonColorEnum.PrimaryDisabled,
+ ButtonColorEnum.SuccessUp, ButtonColorEnum.SuccessHover, ButtonColorEnum.SuccessDown, ButtonColorEnum.SuccessDisabled,
+ ButtonColorEnum.WarningUp, ButtonColorEnum.WarningHover, ButtonColorEnum.WarningDown, ButtonColorEnum.WarningDisabled,
+ ButtonColorEnum.InverseUp, ButtonColorEnum.InverseHover, ButtonColorEnum.InverseDown, ButtonColorEnum.InverseDisabled,
+ ButtonColorEnum.DefaultUp, ButtonColorEnum.DefaultHover, ButtonColorEnum.DefaultDown, ButtonColorEnum.DefaultDisabled,
+ ButtonColorEnum.InfoUp, ButtonColorEnum.InfoHover, ButtonColorEnum.InfoDown, ButtonColorEnum.InfoDisabled,
+ ButtonColorEnum.DangerUp, ButtonColorEnum.DangerHover, ButtonColorEnum.DangerDown, ButtonColorEnum.DangerDisabled
+ );
+
+ // Map all the allowed states
+ var numeroEstado:int = 1;
+ switch (estado.name)
+ {
+ case "up":
+ numeroEstado = 1;
+ break;
+ case "over":
+ numeroEstado = 2;
+ break;
+ case "down":
+ numeroEstado = 3;
+ break;
+ case "disabled":
+ numeroEstado = 3;
+ break;
+ }
+
+ var posicao:int = 1;
+ posicao = 4 * (brand - 1) + (numeroEstado - 1);
+
+ return cores[posicao];
+ }
+ }
+}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/flex-sdk/blob/e72f72e3/frameworks/projects/flatspark/src/utils/ConfigSkin.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/flatspark/src/utils/ConfigSkin.as b/frameworks/projects/flatspark/src/utils/ConfigSkin.as
new file mode 100644
index 0000000..b4ba4f3
--- /dev/null
+++ b/frameworks/projects/flatspark/src/utils/ConfigSkin.as
@@ -0,0 +1,44 @@
+/**
+ Licensed to the Apache Software Foundation (ASF) under one or more
+ contributor license agreements. See the NOTICE file distributed with
+ this work for additional information regarding copyright ownership.
+ The ASF licenses this file to You under the Apache License, Version 2.0
+ (the "License"); you may not use this file except in compliance with
+ the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+ */
+
+package flatSpark.utils
+{
+
+ import flatSpark.enums.ColorSwatchEnum;
+ import flatSpark.enums.SizeEnum;
+
+ public final class ConfigSkin
+ {
+
+ /*
+ * Default size
+ */
+ public static var sizeEnum:SizeEnum=new SizeEnum();
+
+ /*
+ * Default color
+ */
+ public static var colorSwatch:ColorSwatchEnum=new ColorSwatchEnum();
+
+
+ public function ConfigSkin()
+ {
+
+ }
+
+ }
+}
[2/3] Added FlatSpark project
Posted by ak...@apache.org.
http://git-wip-us.apache.org/repos/asf/flex-sdk/blob/e72f72e3/frameworks/projects/flatspark/src/skins/PanelSkin.mxml
----------------------------------------------------------------------
diff --git a/frameworks/projects/flatspark/src/skins/PanelSkin.mxml b/frameworks/projects/flatspark/src/skins/PanelSkin.mxml
new file mode 100644
index 0000000..3304b48
--- /dev/null
+++ b/frameworks/projects/flatspark/src/skins/PanelSkin.mxml
@@ -0,0 +1,253 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+
+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.
+
+-->
+
+
+<!--- The default skin class for a Spark Panel container.
+
+ @see spark.components.Panel
+
+ @langversion 3.0
+ @playerversion Flash 10
+ @playerversion AIR 1.5
+ @productversion Flex 4
+-->
+<s:SparkSkin xmlns:fx="http://ns.adobe.com/mxml/2009" xmlns:s="library://ns.adobe.com/flex/spark"
+ xmlns:fb="http://ns.adobe.com/flashbuilder/2009" blendMode="normal" mouseEnabled="false"
+ minWidth="131" minHeight="127" alpha.disabled="0.5" alpha.disabledWithControlBar="0.5">
+
+ <fx:Metadata>
+ <![CDATA[
+ /**
+ * @copy spark.skins.spark.ApplicationSkin#hostComponent
+ */
+ [HostComponent("spark.components.Panel")]
+ ]]>
+ </fx:Metadata>
+
+ <fx:Script fb:purpose="styling">
+ <![CDATA[
+ import mx.core.FlexVersion;
+
+ import flatSpark.utils.ColorUtils;
+
+ /* Define the skin elements that should not be colorized.
+ For panel, border and title background are skinned, but the content area, background, border, and title text are not. */
+ static private const exclusions:Array = ["background", "titleDisplay", "contentGroup", "controlBarGroup", "border"];
+
+ /* exclusions before Flex 4.5 for backwards-compatibility purposes */
+ static private const exclusions_4_0:Array = ["background", "titleDisplay", "contentGroup", "controlBarGroup"];
+
+ /**
+ * @private
+ */
+ override public function get colorizeExclusions():Array
+ {
+ // Since border is styleable via borderColor, no need to allow chromeColor to affect
+ // the border. This is wrapped in a compatibility flag since this change was added
+ // in Flex 4.5
+ if (FlexVersion.compatibilityVersion < FlexVersion.VERSION_4_5)
+ {
+ return exclusions_4_0;
+ }
+
+ return exclusions;
+ }
+
+ /**
+ * @private
+ */
+ override protected function initializationComplete():void
+ {
+ useChromeColor = true;
+ super.initializationComplete();
+ }
+
+ /**
+ * @private
+ */
+ override protected function updateDisplayList(unscaledWidth:Number, unscaledHeight:Number):void
+ {
+ dropShadow.tlRadius = cornerRadius;
+ dropShadow.trRadius = cornerRadius;
+ dropShadow.blRadius = cornerRadius;
+ dropShadow.brRadius = cornerRadius;
+
+ setPartCornerRadii(topMaskRect);
+ setPartCornerRadii(background);
+
+ if (bottomMaskRect != null)
+ {
+ setPartCornerRadii(bottomMaskRect);
+ }
+
+ super.updateDisplayList(unscaledWidth, unscaledHeight);
+ }
+
+ /**
+ * @private
+ */
+ private function setPartCornerRadii(target:Rect):void
+ {
+ target.topLeftRadiusX = cornerRadius;
+ target.topRightRadiusX = cornerRadius;
+ target.bottomLeftRadiusX = cornerRadius;
+ target.bottomRightRadiusX = cornerRadius;
+ }
+
+ private var cornerRadius:Number=4;
+ ]]>
+ </fx:Script>
+
+ <s:states>
+ <s:State name="normal" />
+ <s:State name="disabled" />
+ <s:State name="normalWithControlBar" stateGroups="withControls" />
+ <s:State name="disabledWithControlBar" stateGroups="withControls" />
+ </s:states>
+
+ <!-- drop shadow can't be hittable so it stays sibling of other graphics -->
+ <!--- @private -->
+ <s:RectangularDropShadow id="dropShadow" blurX="4" distance="0" angle="90" alpha="1"
+ color="{ColorUtils.Silver}" left="0" top="0" right="0" bottom="0"/>
+
+ <!-- drop shadow can't be hittable so all other graphics go in this group -->
+ <s:Group left="0" right="0" top="0" bottom="0">
+
+ <!-- top group mask -->
+ <!--- @private -->
+ <s:Group left="0" top="0" right="0" bottom="0" id="topGroupMask" >
+ <!--- @private -->
+ <s:Rect id="topMaskRect" left="0" top="0" right="0" bottom="0">
+ <s:fill>
+ <s:SolidColor alpha="0"/>
+ </s:fill>
+ </s:Rect>
+ </s:Group>
+
+ <!-- bottom group mask -->
+ <!--- @private -->
+ <s:Group left="0" top="0" right="0" bottom="0" id="bottomGroupMask"
+ includeIn="normalWithControlBar, disabledWithControlBar">
+ <!--- @private -->
+ <s:Rect id="bottomMaskRect" left="0" top="0" right="0" bottom="0">
+ <s:fill>
+ <s:SolidColor alpha="0"/>
+ </s:fill>
+ </s:Rect>
+ </s:Group>
+
+ <!-- layer 2: background fill -->
+ <!--- Defines the appearance of the PanelSkin class's background. -->
+ <s:Rect id="background" left="0" top="0" right="0" bottom="0">
+ <s:fill>
+ <!--- @private
+ Defines the PanelSkin class's background fill. The default color is 0xFFFFFF. -->
+ <s:SolidColor id="backgroundFill" color="0xFFFFFF"/>
+ </s:fill>
+ </s:Rect>
+
+ <!-- layer 3: contents -->
+ <!--- Contains the vertical stack of titlebar content and controlbar. -->
+ <s:Group left="0" top="0" right="0" bottom="0" id="contents">
+ <s:layout>
+ <s:VerticalLayout gap="0" horizontalAlign="justify" />
+ </s:layout>
+
+ <!--- @private -->
+ <s:Group id="topGroup" mask="{topGroupMask}">
+
+ <!-- layer 0: title bar fill -->
+ <!--- @private -->
+ <s:Rect id="tbFill" left="0" right="0" top="0" bottom="0">
+ <s:fill>
+ <s:SolidColor color="{ColorUtils.PeterRiver}"/>
+ </s:fill>
+ </s:Rect>
+
+ <!-- layer 1: title bar highlight -->
+ <!--- @private -->
+ <s:Rect id="tbHilite" left="0" right="0" top="0" bottom="0">
+ <s:fill>
+ <s:SolidColor color="{ColorUtils.PeterRiver}"/>
+ </s:fill>
+ </s:Rect>
+
+ <!-- layer 2: title bar divider -->
+ <!--- @private -->
+ <s:Rect id="tbDiv" left="0" right="0" height="1" bottom="0">
+ <s:fill>
+ <s:SolidColor color="{ColorUtils.BelizeHole}"/>
+ </s:fill>
+ </s:Rect>
+
+ <!-- layer 3: text -->
+ <!--- @copy spark.components.Panel#titleDisplay -->
+ <s:Label id="titleDisplay" maxDisplayedLines="1" fontFamily="Lato" fontSize="15" fontStyle="normal" color="#FFFFFF"
+ left="15" right="5" top="2" bottom="0" minHeight="36" height="36"
+ verticalAlign="middle" fontWeight="bold" />
+ </s:Group>
+
+ <!--
+ Note: setting the minimum size to 0 here so that changes to the host component's
+ size will not be thwarted by this skin part's minimum size. This is a compromise,
+ more about it here: http://bugs.adobe.com/jira/browse/SDK-21143
+ -->
+ <!--- @copy spark.components.SkinnableContainer#contentGroup -->
+ <s:Group id="contentGroup" width="100%" height="100%" minWidth="0" minHeight="0">
+ </s:Group>
+
+ <!--- @private -->
+ <s:Group id="bottomGroup" minWidth="0" minHeight="0"
+ includeIn="normalWithControlBar, disabledWithControlBar" >
+
+ <s:Group left="0" right="0" top="0" bottom="0" mask="{bottomGroupMask}">
+
+ <!-- layer 0: control bar divider line -->
+ <s:Rect left="0" right="0" top="0" height="1" alpha="0.5">
+ <s:fill>
+ <s:SolidColor color="{ColorUtils.Silver}" />
+ </s:fill>
+ </s:Rect>
+
+ <!-- layer 1: control bar highlight -->
+ <s:Rect left="0" right="0" top="1" bottom="0">
+ <s:fill>
+ <s:SolidColor color="{ColorUtils.Clouds}" />
+ </s:fill>
+ </s:Rect>
+
+ <!-- layer 2: control bar fill -->
+ <s:Rect left="0" right="0" top="1" bottom="0">
+ <s:fill>
+ <s:SolidColor color="{ColorUtils.Clouds}" />
+ </s:fill>
+ </s:Rect>
+ </s:Group>
+ <!-- layer 3: control bar -->
+ <!--- @copy spark.components.Panel#controlBarGroup -->
+ <s:Group id="controlBarGroup" left="0" right="0" top="0" bottom="0" minWidth="0" minHeight="0">
+ <s:layout>
+ <s:HorizontalLayout paddingLeft="10" paddingRight="10" paddingTop="7" paddingBottom="7" gap="10" />
+ </s:layout>
+ </s:Group>
+ </s:Group>
+ </s:Group>
+ </s:Group>
+</s:SparkSkin>
http://git-wip-us.apache.org/repos/asf/flex-sdk/blob/e72f72e3/frameworks/projects/flatspark/src/skins/ProgressBarSkin.mxml
----------------------------------------------------------------------
diff --git a/frameworks/projects/flatspark/src/skins/ProgressBarSkin.mxml b/frameworks/projects/flatspark/src/skins/ProgressBarSkin.mxml
new file mode 100644
index 0000000..3a0ad79
--- /dev/null
+++ b/frameworks/projects/flatspark/src/skins/ProgressBarSkin.mxml
@@ -0,0 +1,54 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+
+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.
+
+-->
+<s:Skin xmlns:fx="http://ns.adobe.com/mxml/2009"
+ xmlns:s="library://ns.adobe.com/flex/spark">
+ <fx:Metadata>
+ [HostComponent("spark.components.ProgressBar")]
+ </fx:Metadata>
+
+ <fx:Script>
+ <![CDATA[
+ import flatSpark.utils.ColorUtils;
+ ]]>
+ </fx:Script>
+ <s:Rect left="0" minHeight="14" top="0" bottom="0" right="0" radiusX="4">
+ <s:fill>
+ <s:SolidColor color="{ColorUtils.Clouds}" />
+ </s:fill>
+ </s:Rect>
+ <s:Group id="progressGroup" top="0" bottom="0"
+ left="{hostComponent.direction=='left' ? 0 : NaN}"
+ right="{hostComponent.direction=='right' ? 0 : NaN}">
+ <s:Rect left="0" top="0" bottom="0" right="0" radiusX="4">
+ <s:fill>
+ <s:SolidColor color="{ColorUtils.Turquoise}" />
+ </s:fill>
+ </s:Rect>
+ <!--
+ Variant #2 (looks nicer) - uncomment this and remove last Label declaration
+ <s:Label id="percentDisplay"
+ right="2" verticalCenter="0" verticalAlign="middle"
+ visible="{progressBox.width > percentDisplay.width + 4}"
+ includeInLayout="{progressBox.width > percentDisplay.width + 4}"/>
+ -->
+ </s:Group>
+ <s:Label id="percentDisplay" left="2" right="2" verticalCenter="0" verticalAlign="middle" color="{ColorUtils.WetAsphalt}" fontFamily="Lato" fontWeight="bold" fontSize="13" textAlign="center" />
+
+</s:Skin>
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/flex-sdk/blob/e72f72e3/frameworks/projects/flatspark/src/skins/RadioButtonSkin.mxml
----------------------------------------------------------------------
diff --git a/frameworks/projects/flatspark/src/skins/RadioButtonSkin.mxml b/frameworks/projects/flatspark/src/skins/RadioButtonSkin.mxml
new file mode 100644
index 0000000..0f7a11f
--- /dev/null
+++ b/frameworks/projects/flatspark/src/skins/RadioButtonSkin.mxml
@@ -0,0 +1,129 @@
+<?xml version="1.0" encoding="utf-8"?>
+
+<!--
+
+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.
+
+-->
+
+<!--- The default skin class for a Spark RadioButton component.
+
+ @see spark.components.RadioButton
+ @see spark.components.RadioButtonGroup
+
+ @langversion 3.0
+ @playerversion Flash 10
+ @playerversion AIR 1.5
+ @productversion Flex 4
+-->
+<s:SparkSkin xmlns:fx="http://ns.adobe.com/mxml/2009" xmlns:s="library://ns.adobe.com/flex/spark"
+ xmlns:fb="http://ns.adobe.com/flashbuilder/2009" alpha.disabledStates="0.5">
+ <fx:Metadata>[HostComponent("spark.components.RadioButton")]</fx:Metadata>
+
+ <fx:Script fb:purpose="styling">
+ /* Define the skin elements that should not be colorized.
+ For button, the graphics are colorized but the label is not. */
+ static private const exclusions:Array = ["labelDisplay", "dot"];
+
+ /**
+ * @private
+ */
+ override public function get colorizeExclusions():Array {return exclusions;}
+
+ /* Define the symbol fill items that should be colored by the "symbolColor" style. */
+ static private const symbols:Array = [];
+
+ /**
+ * @private
+ */
+ override public function get symbolItems():Array {return symbols};
+
+ /**
+ * @private
+ */
+ override protected function initializationComplete():void
+ {
+ useChromeColor = true;
+ super.initializationComplete();
+ }
+ </fx:Script>
+
+ <fx:Script>
+ <![CDATA[
+ import flatSpark.utils.ColorUtils;
+ /**
+ * @private
+ */
+ private static const focusExclusions:Array = ["labelDisplay"];
+
+ /**
+ * @private
+ */
+ override public function get focusSkinExclusions():Array { return focusExclusions;};
+ ]]>
+ </fx:Script>
+
+ <s:states>
+ <s:State name="up" />
+ <s:State name="over" stateGroups="overStates" />
+ <s:State name="down" stateGroups="downStates" />
+ <s:State name="disabled" stateGroups="disabledStates" />
+ <s:State name="upAndSelected" stateGroups="selectedStates" />
+ <s:State name="overAndSelected" stateGroups="overStates, selectedStates" />
+ <s:State name="downAndSelected" stateGroups="downStates, selectedStates" />
+ <s:State name="disabledAndSelected" stateGroups="disabledStates, selectedStates" />
+ </s:states>
+
+ <s:Group verticalCenter="0" width="22" height="22">
+ <!-- fill -->
+ <s:Ellipse left="1" top="1" right="1" bottom="1">
+ <s:fill>
+ <s:SolidColor color="#FFFFFF" />
+ </s:fill>
+ <s:stroke>
+ <s:SolidColorStroke color="{ColorUtils.Silver}" weight="4"/>
+ </s:stroke>
+ </s:Ellipse>
+
+ <s:Ellipse left="1" top="1" right="1" bottom="1" includeIn="overStates">
+ <s:stroke>
+ <s:SolidColorStroke color="{ColorUtils.Asbestos}" weight="4"/>
+ </s:stroke>
+ </s:Ellipse>
+
+ <s:Ellipse left="1" top="1" right="1" bottom="1" includeIn="selectedStates">
+ <s:stroke>
+ <s:SolidColorStroke color="{ColorUtils.Turquoise}" weight="4"/>
+ </s:stroke>
+ </s:Ellipse>
+
+ <s:Ellipse left="8" top="8" right="8" bottom="8" includeIn="selectedStates">
+ <s:fill>
+ <s:SolidColor color="{ColorUtils.Turquoise}" />
+ </s:fill>
+ </s:Ellipse>
+
+
+ </s:Group>
+
+ <!-- Label -->
+ <!--- @copy spark.components.supportClasses.ButtonBase#labelDisplay -->
+ <s:Label id="labelDisplay"
+ textAlign="start" color="{ColorUtils.WetAsphalt}"
+ verticalAlign="middle" fontSize="14"
+ maxDisplayedLines="1" fontFamily="Lato" paddingLeft="30"
+ left="0" right="0" top="3" bottom="3"/>
+</s:SparkSkin>
http://git-wip-us.apache.org/repos/asf/flex-sdk/blob/e72f72e3/frameworks/projects/flatspark/src/skins/ScrollerSkin.mxml
----------------------------------------------------------------------
diff --git a/frameworks/projects/flatspark/src/skins/ScrollerSkin.mxml b/frameworks/projects/flatspark/src/skins/ScrollerSkin.mxml
new file mode 100644
index 0000000..4729d05
--- /dev/null
+++ b/frameworks/projects/flatspark/src/skins/ScrollerSkin.mxml
@@ -0,0 +1,106 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+
+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.
+
+-->
+
+
+<!--
+
+Scroller unconditionally sets its skin's layout to private layout
+implementation that handles the scroll policies. Scroller skins can
+only provide replacement scrollbars. The skin's layout and
+constraints or dimensions set on skin parts will not be honored. To
+gain more control over the layout of a viewport and its scrollbars,
+instead of using Scroller, add them to a Group and use the ScrollBar component's
+viewport property to link them together.
+
+-->
+
+<!--- The default skin class for the Spark Scroller component.
+
+ @see spark.components.Scroller
+
+ @langversion 3.0
+ @playerversion Flash 10
+ @playerversion AIR 1.5
+ @productversion Flex 4
+-->
+<s:SparkSkin xmlns:fx="http://ns.adobe.com/mxml/2009" xmlns:s="library://ns.adobe.com/flex/spark">
+
+ <fx:Metadata>
+ <![CDATA[
+ /**
+ * @copy spark.skins.spark.ApplicationSkin#hostComponent
+ */
+ [HostComponent("spark.components.Scroller")]
+ ]]>
+ </fx:Metadata>
+
+ <fx:Script>
+ <![CDATA[
+ /**
+ * @private
+ */
+ override public function beginHighlightBitmapCapture() : Boolean
+ {
+ var needUpdate:Boolean = super.beginHighlightBitmapCapture();
+
+ // Draw an opaque rect that fill our entire skin. Our background
+ // is transparent, but we don't want focus/error skins to
+ // poke through. This is safe to do since we don't have any
+ // graphic elements as direct children.
+ graphics.beginFill(0);
+ graphics.drawRect(0, 0, width, height);
+ graphics.endFill();
+
+ return needUpdate;
+ }
+
+ /**
+ * @private
+ */
+ override public function endHighlightBitmapCapture() : Boolean
+ {
+ var needUpdate:Boolean = super.endHighlightBitmapCapture();
+
+ // Clear the rect we drew in beginBitmapCapture();
+ graphics.clear();
+
+ return needUpdate;
+ }
+ ]]>
+ </fx:Script>
+
+ <fx:Declarations>
+ <!--- A vertical scrollbar that lets you control the portion of data that is displayed
+ when there is too much data to fit vertically in a display area.
+ The Scroller determines whether the vertical ScrollBar is visible. -->
+ <fx:Component id="verticalScrollBarFactory">
+ <s:VScrollBar visible="false" skinClass="flatSpark.skins.VScrollBarSkin" />
+ </fx:Component>
+
+ <!--- A horizontal scrollbar that lets you control the portion of data that is displayed
+ when there is too much data to fit horizontally in a display area.
+ The Scroller determines whether the horizontal ScrollBar is visible. -->
+ <fx:Component id="horizontalScrollBarFactory">
+ <s:HScrollBar visible="false" skinClass="flatSpark.skins.HScrollBarSkin" />
+ </fx:Component>
+
+ </fx:Declarations>
+
+</s:SparkSkin>
http://git-wip-us.apache.org/repos/asf/flex-sdk/blob/e72f72e3/frameworks/projects/flatspark/src/skins/TextInputIconSkin.mxml
----------------------------------------------------------------------
diff --git a/frameworks/projects/flatspark/src/skins/TextInputIconSkin.mxml b/frameworks/projects/flatspark/src/skins/TextInputIconSkin.mxml
new file mode 100644
index 0000000..8578223
--- /dev/null
+++ b/frameworks/projects/flatspark/src/skins/TextInputIconSkin.mxml
@@ -0,0 +1,338 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+
+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.
+
+-->
+<!--- The default skin class for Spark TextInput component.
+
+ @see spark.components.TextInput
+
+ @langversion 3.0
+ @playerversion Flash 10
+ @playerversion AIR 1.5
+ @productversion Flex 4
+-->
+<s:SparkSkin xmlns:fx="http://ns.adobe.com/mxml/2009" xmlns:s="library://ns.adobe.com/flex/spark"
+ xmlns:fb="http://ns.adobe.com/flashbuilder/2009" height="{TextInputSizeEnum.Normal}"
+ alpha.disabledStates="0.5" blendMode="normal">
+
+ <fx:Metadata>
+ <![CDATA[
+ /**
+ * @copy spark.skins.spark.ApplicationSkin#hostComponent
+ */
+ [HostComponent("flatSpark.components.TextInputIcon")]
+ ]]>
+ </fx:Metadata>
+
+ <fx:Style>
+ @namespace s "library://ns.adobe.com/flex/spark";
+ @namespace fb "http://ns.adobe.com/flashbuilder/2009";
+ @namespace spark "spark.skins.spark.*";
+
+ *
+ {
+ /*focusColor: #FFFFFF;
+ focusThickness: 1px;
+ focusAlpha: 1;*/
+ /*focusAlpha: 0;*/
+ errorColor: #E74C3C;
+ }
+ </fx:Style>
+
+ <fx:Script fb:purpose="styling">
+ <![CDATA[
+ import mx.core.FlexVersion;
+
+ import flatSpark.enums.ButtonSizeEnum;
+ import flatSpark.enums.TextInputSizeEnum;
+ import flatSpark.utils.AwesomeUtils;
+ import flatSpark.utils.ColorUtils;
+
+ private var paddingChanged:Boolean;
+
+ /* Define the skin elements that should not be colorized. */
+ static private const exclusions:Array = ["background", "background_disabled", "textDisplay", "promptDisplay", "border", "border_disabled"];
+
+ /* exclusions before Flex 4.5 for backwards-compatibility purposes */
+ static private const exclusions_4_0:Array = ["background", "background_disabled", "textDisplay", "promptDisplay"];
+
+ /**
+ * @private
+ */
+ override public function get colorizeExclusions():Array
+ {
+ // Since border is styleable via borderColor, no need to allow chromeColor to affect
+ // the border. This is wrapped in a compatibility flag since this change was added
+ // in Flex 4.5
+ if (FlexVersion.compatibilityVersion < FlexVersion.VERSION_4_5)
+ {
+ return exclusions_4_0;
+ }
+
+ return exclusions;
+ }
+
+ /* Define the content fill items that should be colored by the "contentBackgroundColor" style. */
+ static private const contentFill:Array = ["bgFill"];
+
+ /**
+ * @private
+ */
+ override public function get contentItems():Array {return contentFill};
+
+ /**
+ * @private
+ */
+ override protected function commitProperties():void
+ {
+ super.commitProperties();
+
+ if (paddingChanged)
+ {
+ updatePadding();
+ paddingChanged = false;
+ }
+ }
+
+ /**
+ * @private
+ */
+ override protected function initializationComplete():void
+ {
+ useChromeColor = true;
+ super.initializationComplete();
+ }
+
+ /**
+ * @private
+ */
+ override protected function updateDisplayList(unscaledWidth:Number, unscaledHeight:Number):void
+ {
+ if (getStyle("borderVisible") == true)
+ {
+ border.visible = true;
+ background.left = background.top = background.right = background.bottom = 2;
+ textDisplay.left = textDisplay.top = textDisplay.bottom = 8;
+ textDisplay.right = 30;
+ if (promptDisplay)
+ {
+ promptDisplay.setLayoutBoundsSize(unscaledWidth - 8, unscaledHeight - 8);
+ promptDisplay.setLayoutBoundsPosition(5, 5);
+ }
+ }
+ else
+ {
+ border.visible = false;
+ background.left = background.top = background.right = background.bottom = 0;
+ textDisplay.left = textDisplay.top = textDisplay.right = textDisplay.bottom = 0;
+ if (promptDisplay)
+ {
+ promptDisplay.setLayoutBoundsSize(unscaledWidth, unscaledHeight);
+ promptDisplay.setLayoutBoundsPosition(0, 0);
+ }
+ }
+
+ /*borderStroke.color = getStyle("borderColor");
+ borderStroke.alpha = getStyle("borderAlpha");*/
+
+ super.updateDisplayList(unscaledWidth, unscaledHeight);
+ }
+
+ /**
+ * @private
+ */
+ private function updatePadding():void
+ {
+ if (!textDisplay)
+ return;
+
+ // Push padding styles into the textDisplay
+ var padding:Number;
+
+ padding = getStyle("paddingLeft");
+ if (textDisplay.getStyle("paddingLeft") != padding)
+ textDisplay.setStyle("paddingLeft", padding);
+
+ padding = getStyle("paddingTop");
+ if (textDisplay.getStyle("paddingTop") != padding)
+ textDisplay.setStyle("paddingTop", padding);
+
+ padding = getStyle("paddingRight");
+ if (textDisplay.getStyle("paddingRight") != padding)
+ textDisplay.setStyle("paddingRight", padding);
+
+ padding = getStyle("paddingBottom");
+ if (textDisplay.getStyle("paddingBottom") != padding)
+ textDisplay.setStyle("paddingBottom", padding);
+
+ if (!promptDisplay)
+ return;
+
+ padding = getStyle("paddingLeft");
+ if (promptDisplay.getStyle("paddingLeft") != padding)
+ promptDisplay.setStyle("paddingLeft", padding);
+
+ padding = getStyle("paddingTop");
+ if (promptDisplay.getStyle("paddingTop") != padding)
+ promptDisplay.setStyle("paddingTop", padding);
+
+ padding = getStyle("paddingRight");
+ if (promptDisplay.getStyle("paddingRight") != padding)
+ promptDisplay.setStyle("paddingRight", padding);
+
+ padding = getStyle("paddingBottom");
+ if (promptDisplay.getStyle("paddingBottom") != padding)
+ promptDisplay.setStyle("paddingBottom", padding);
+ }
+
+ /**
+ * @private
+ */
+ override public function styleChanged(styleProp:String):void
+ {
+ var allStyles:Boolean = !styleProp || styleProp == "styleName";
+
+ super.styleChanged(styleProp);
+
+ if (allStyles || styleProp.indexOf("padding") == 0)
+ {
+ paddingChanged = true;
+ invalidateProperties();
+ }
+ }
+
+ protected function textDisplay_focusInHandler(event:FocusEvent):void
+ {
+ borderStroke.color = ColorUtils.Asbestos;
+ iconFont.setStyle("color", ColorUtils.Asbestos);
+ }
+
+ protected function textDisplay_focusOutHandler(event:FocusEvent):void
+ {
+ borderStroke.color = ColorUtils.Silver;
+ iconFont.setStyle("color", ColorUtils.Silver);
+ }
+
+ private static function getFontSize(height:int):int
+ {
+ var altura:int = 15;
+
+ switch (height)
+ {
+ case TextInputSizeEnum.Large:
+ altura = 17;
+ break;
+ case TextInputSizeEnum.Normal:
+ altura = 15;
+ break;
+ case TextInputSizeEnum.Small:
+ altura = 13;
+ break;
+ }
+
+ return altura;
+ }
+
+ private static function getIconSize(height:int):int
+ {
+ var altura:int = 17;
+
+ switch (height)
+ {
+ case TextInputSizeEnum.Large:
+ altura = 19;
+ break;
+ case TextInputSizeEnum.Normal:
+ altura = 17;
+ break;
+ case TextInputSizeEnum.Small:
+ altura = 15;
+ break;
+ }
+
+ return altura;
+ }
+
+ ]]>
+ </fx:Script>
+
+ <fx:Script>
+ <![CDATA[
+ /**
+ * @private
+ */
+ private static const focusExclusions:Array = ["textDisplay"];
+
+ /**
+ * @private
+ */
+ override public function get focusSkinExclusions():Array { return focusExclusions;};
+ ]]>
+ </fx:Script>
+
+ <s:states>
+ <s:State name="normal"/>
+ <s:State name="disabled" stateGroups="disabledStates"/>
+ <s:State name="normalWithPrompt"/>
+ <s:State name="disabledWithPrompt" stateGroups="disabledStates"/>
+ </s:states>
+
+ <!-- border -->
+ <!--- @private -->
+ <s:Rect left="0" right="0" top="0" bottom="0" id="border" radiusX="6">
+ <s:stroke>
+ <!--- @private -->
+ <s:SolidColorStroke id="borderStroke" weight="2" color="{ColorUtils.Silver}"/>
+ </s:stroke>
+ </s:Rect>
+
+ <!-- fill -->
+ <!--- Defines the appearance of the TextInput component's background. -->
+ <s:Rect id="background" left="2" right="2" top="2" bottom="2" radiusX="6">
+ <s:fill>
+ <!--- @private Defines the background fill color. -->
+ <s:SolidColor id="bgFill" color="0xFFFFFF" />
+ </s:fill>
+ </s:Rect>
+
+ <s:Rect id="background_disabled" left="2" right="2" top="2" bottom="2" radiusX="6" includeIn="disabledStates">
+ <s:fill>
+ <s:SolidColor color="0xf4f6f6"/>
+ </s:fill>
+ </s:Rect>
+
+ <!-- text -->
+ <!--- @copy spark.components.supportClasses.SkinnableTextBase#textDisplay -->
+ <s:RichEditableText id="textDisplay"
+ verticalAlign="middle" focusIn="textDisplay_focusInHandler(event)" focusOut="textDisplay_focusOutHandler(event)"
+ widthInChars="10" fontFamily="Lato" fontWeight="normal" color="{ColorUtils.WetAsphalt}"
+ left="8" right="30" top="8" bottom="8" fontSize="{getFontSize(hostComponent.height)}"/>
+ <!--- Defines the Label that is used for prompt text. The includeInLayout property is false so the prompt text does not affect measurement. -->
+ <s:Label id="promptDisplay" maxDisplayedLines="1" fontSize="{getFontSize(hostComponent.height)}"
+ verticalAlign="middle" fontFamily="Lato" fontWeight="normal" fontStyle="normal" color="{ColorUtils.Silver}"
+ mouseEnabled="false" mouseChildren="false"
+ includeIn="normalWithPrompt,disabledWithPrompt"
+ includeInLayout="false"
+ />
+ <s:Label id="iconFont" color="{ColorUtils.Silver}" color.disabledStates="{ColorUtils.Silver}" text="{hostComponent.iconFont}"
+ textAlign="right" fontSize="{getIconSize(hostComponent.height)}" fontFamily="FontAwesome" fontStyle="normal"
+ maxDisplayedLines="1" mouseChildren="false" mouseEnabled="false"
+ horizontalCenter="0" verticalCenter="0" verticalAlign="middle"
+ left="8" right="8" top="2" bottom="2" includeInLayout="{iconFont != null}">
+ </s:Label>
+</s:SparkSkin>
http://git-wip-us.apache.org/repos/asf/flex-sdk/blob/e72f72e3/frameworks/projects/flatspark/src/skins/TextInputSkin.mxml
----------------------------------------------------------------------
diff --git a/frameworks/projects/flatspark/src/skins/TextInputSkin.mxml b/frameworks/projects/flatspark/src/skins/TextInputSkin.mxml
new file mode 100644
index 0000000..9c1facb
--- /dev/null
+++ b/frameworks/projects/flatspark/src/skins/TextInputSkin.mxml
@@ -0,0 +1,330 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+
+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.
+
+-->
+<!--- The default skin class for Spark TextInput component.
+
+ @see spark.components.TextInput
+
+ @langversion 3.0
+ @playerversion Flash 10
+ @playerversion AIR 1.5
+ @productversion Flex 4
+-->
+<s:SparkSkin xmlns:fx="http://ns.adobe.com/mxml/2009" xmlns:s="library://ns.adobe.com/flex/spark"
+ xmlns:fb="http://ns.adobe.com/flashbuilder/2009" height="{TextInputSizeEnum.Normal}"
+ alpha.disabledStates="0.5" blendMode="normal">
+
+ <fx:Metadata>
+ <![CDATA[
+ /**
+ * @copy spark.skins.spark.ApplicationSkin#hostComponent
+ */
+ [HostComponent("spark.components.TextInput")]
+ ]]>
+ </fx:Metadata>
+
+ <fx:Style>
+ @namespace s "library://ns.adobe.com/flex/spark";
+ @namespace fb "http://ns.adobe.com/flashbuilder/2009";
+ @namespace spark "spark.skins.spark.*";
+
+ *
+ {
+ /*focusColor: #FFFFFF;
+ focusThickness: 1px;
+ focusAlpha: 1;*/
+ /*focusAlpha: 0;*/
+ errorColor: #E74C3C;
+ }
+ </fx:Style>
+
+ <fx:Script fb:purpose="styling">
+ <![CDATA[
+ import mx.core.FlexVersion;
+
+ import flatSpark.enums.ButtonSizeEnum;
+ import flatSpark.enums.TextInputSizeEnum;
+ import flatSpark.utils.AwesomeUtils;
+ import flatSpark.utils.ColorUtils;
+
+ private var paddingChanged:Boolean;
+
+ /* Define the skin elements that should not be colorized. */
+ static private const exclusions:Array = ["background", "background_disabled", "textDisplay", "promptDisplay", "border", "border_disabled"];
+
+ /* exclusions before Flex 4.5 for backwards-compatibility purposes */
+ static private const exclusions_4_0:Array = ["background", "background_disabled", "textDisplay", "promptDisplay"];
+
+ /**
+ * @private
+ */
+ override public function get colorizeExclusions():Array
+ {
+ // Since border is styleable via borderColor, no need to allow chromeColor to affect
+ // the border. This is wrapped in a compatibility flag since this change was added
+ // in Flex 4.5
+ if (FlexVersion.compatibilityVersion < FlexVersion.VERSION_4_5)
+ {
+ return exclusions_4_0;
+ }
+
+ return exclusions;
+ }
+
+ /* Define the content fill items that should be colored by the "contentBackgroundColor" style. */
+ static private const contentFill:Array = ["bgFill"];
+
+ /**
+ * @private
+ */
+ override public function get contentItems():Array {return contentFill};
+
+ /**
+ * @private
+ */
+ override protected function commitProperties():void
+ {
+ super.commitProperties();
+
+ if (paddingChanged)
+ {
+ updatePadding();
+ paddingChanged = false;
+ }
+ }
+
+ /**
+ * @private
+ */
+ override protected function initializationComplete():void
+ {
+ useChromeColor = true;
+ super.initializationComplete();
+ }
+
+ /**
+ * @private
+ */
+ override protected function updateDisplayList(unscaledWidth:Number, unscaledHeight:Number):void
+ {
+ if (getStyle("borderVisible") == true)
+ {
+ border.visible = true;
+ background.left = background.top = background.right = background.bottom = 2;
+ textDisplay.left = textDisplay.top = textDisplay.bottom = 8;
+ textDisplay.right = 30;
+ if (promptDisplay)
+ {
+ promptDisplay.setLayoutBoundsSize(unscaledWidth - 8, unscaledHeight - 8);
+ promptDisplay.setLayoutBoundsPosition(5, 5);
+ }
+ }
+ else
+ {
+ border.visible = false;
+ background.left = background.top = background.right = background.bottom = 0;
+ textDisplay.left = textDisplay.top = textDisplay.right = textDisplay.bottom = 0;
+ if (promptDisplay)
+ {
+ promptDisplay.setLayoutBoundsSize(unscaledWidth, unscaledHeight);
+ promptDisplay.setLayoutBoundsPosition(0, 0);
+ }
+ }
+
+ /*borderStroke.color = getStyle("borderColor");
+ borderStroke.alpha = getStyle("borderAlpha");*/
+
+ super.updateDisplayList(unscaledWidth, unscaledHeight);
+ }
+
+ /**
+ * @private
+ */
+ private function updatePadding():void
+ {
+ if (!textDisplay)
+ return;
+
+ // Push padding styles into the textDisplay
+ var padding:Number;
+
+ padding = getStyle("paddingLeft");
+ if (textDisplay.getStyle("paddingLeft") != padding)
+ textDisplay.setStyle("paddingLeft", padding);
+
+ padding = getStyle("paddingTop");
+ if (textDisplay.getStyle("paddingTop") != padding)
+ textDisplay.setStyle("paddingTop", padding);
+
+ padding = getStyle("paddingRight");
+ if (textDisplay.getStyle("paddingRight") != padding)
+ textDisplay.setStyle("paddingRight", padding);
+
+ padding = getStyle("paddingBottom");
+ if (textDisplay.getStyle("paddingBottom") != padding)
+ textDisplay.setStyle("paddingBottom", padding);
+
+ if (!promptDisplay)
+ return;
+
+ padding = getStyle("paddingLeft");
+ if (promptDisplay.getStyle("paddingLeft") != padding)
+ promptDisplay.setStyle("paddingLeft", padding);
+
+ padding = getStyle("paddingTop");
+ if (promptDisplay.getStyle("paddingTop") != padding)
+ promptDisplay.setStyle("paddingTop", padding);
+
+ padding = getStyle("paddingRight");
+ if (promptDisplay.getStyle("paddingRight") != padding)
+ promptDisplay.setStyle("paddingRight", padding);
+
+ padding = getStyle("paddingBottom");
+ if (promptDisplay.getStyle("paddingBottom") != padding)
+ promptDisplay.setStyle("paddingBottom", padding);
+ }
+
+ /**
+ * @private
+ */
+ override public function styleChanged(styleProp:String):void
+ {
+ var allStyles:Boolean = !styleProp || styleProp == "styleName";
+
+ super.styleChanged(styleProp);
+
+ if (allStyles || styleProp.indexOf("padding") == 0)
+ {
+ paddingChanged = true;
+ invalidateProperties();
+ }
+ }
+
+ protected function textDisplay_focusInHandler(event:FocusEvent):void
+ {
+ borderStroke.color = ColorUtils.Asbestos;
+ }
+
+ protected function textDisplay_focusOutHandler(event:FocusEvent):void
+ {
+ borderStroke.color = ColorUtils.Silver;
+ }
+
+ private static function getFontSize(height:int):int
+ {
+ var altura:int = 15;
+
+ switch (height)
+ {
+ case TextInputSizeEnum.Large:
+ altura = 17;
+ break;
+ case TextInputSizeEnum.Normal:
+ altura = 15;
+ break;
+ case TextInputSizeEnum.Small:
+ altura = 13;
+ break;
+ }
+
+ return altura;
+ }
+
+ private static function getIconSize(height:int):int
+ {
+ var altura:int = 17;
+
+ switch (height)
+ {
+ case TextInputSizeEnum.Large:
+ altura = 19;
+ break;
+ case TextInputSizeEnum.Normal:
+ altura = 17;
+ break;
+ case TextInputSizeEnum.Small:
+ altura = 15;
+ break;
+ }
+
+ return altura;
+ }
+
+ ]]>
+ </fx:Script>
+
+ <fx:Script>
+ <![CDATA[
+ /**
+ * @private
+ */
+ private static const focusExclusions:Array = ["textDisplay"];
+
+ /**
+ * @private
+ */
+ override public function get focusSkinExclusions():Array { return focusExclusions;};
+ ]]>
+ </fx:Script>
+
+ <s:states>
+ <s:State name="normal"/>
+ <s:State name="disabled" stateGroups="disabledStates"/>
+ <s:State name="normalWithPrompt"/>
+ <s:State name="disabledWithPrompt" stateGroups="disabledStates"/>
+ </s:states>
+
+ <!-- border -->
+ <!--- @private -->
+ <s:Rect left="0" right="0" top="0" bottom="0" id="border" radiusX="6">
+ <s:stroke>
+ <!--- @private -->
+ <s:SolidColorStroke id="borderStroke" weight="2" color="{ColorUtils.Silver}"/>
+ </s:stroke>
+ </s:Rect>
+
+ <!-- fill -->
+ <!--- Defines the appearance of the TextInput component's background. -->
+ <s:Rect id="background" left="2" right="2" top="2" bottom="2" radiusX="6">
+ <s:fill>
+ <!--- @private Defines the background fill color. -->
+ <s:SolidColor id="bgFill" color="0xFFFFFF" />
+ </s:fill>
+ </s:Rect>
+
+ <s:Rect id="background_disabled" left="2" right="2" top="2" bottom="2" radiusX="6" includeIn="disabledStates">
+ <s:fill>
+ <s:SolidColor color="0xf4f6f6"/>
+ </s:fill>
+ </s:Rect>
+
+ <!-- text -->
+ <!--- @copy spark.components.supportClasses.SkinnableTextBase#textDisplay -->
+ <s:RichEditableText id="textDisplay"
+ verticalAlign="middle" focusIn="textDisplay_focusInHandler(event)" focusOut="textDisplay_focusOutHandler(event)"
+ widthInChars="10" fontFamily="Lato" fontWeight="normal" color="{ColorUtils.WetAsphalt}"
+ left="8" right="30" top="8" bottom="8" fontSize="{getFontSize(hostComponent.height)}"/>
+ <!--- Defines the Label that is used for prompt text. The includeInLayout property is false so the prompt text does not affect measurement. -->
+ <s:Label id="promptDisplay" maxDisplayedLines="1" fontSize="{getFontSize(hostComponent.height)}"
+ verticalAlign="middle" fontFamily="Lato" fontWeight="normal" fontStyle="normal" color="{ColorUtils.Silver}"
+ mouseEnabled="false" mouseChildren="false"
+ includeIn="normalWithPrompt,disabledWithPrompt"
+ includeInLayout="false"
+ />
+</s:SparkSkin>
http://git-wip-us.apache.org/repos/asf/flex-sdk/blob/e72f72e3/frameworks/projects/flatspark/src/skins/TitleWindowCloseButtonSkin.mxml
----------------------------------------------------------------------
diff --git a/frameworks/projects/flatspark/src/skins/TitleWindowCloseButtonSkin.mxml b/frameworks/projects/flatspark/src/skins/TitleWindowCloseButtonSkin.mxml
new file mode 100644
index 0000000..635b924
--- /dev/null
+++ b/frameworks/projects/flatspark/src/skins/TitleWindowCloseButtonSkin.mxml
@@ -0,0 +1,118 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+
+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.
+
+-->
+
+
+<!--- The default skin class for the close button of the Spark TitleWindow component.
+
+@see spark.skins.spark.TitleWindowSkin
+@see spark.components.TitleWindow
+
+@langversion 3.0
+@playerversion Flash 10
+@playerversion AIR 1.5
+@productversion Flex 4
+-->
+<s:SparkSkin xmlns:fx="http://ns.adobe.com/mxml/2009" xmlns:s="library://ns.adobe.com/flex/spark"
+ xmlns:fb="http://ns.adobe.com/flashbuilder/2009" alpha.disabled="0.5" initialize="initializeHandler(event)">
+
+ <!-- host component -->
+ <fx:Metadata>
+ <![CDATA[
+ /**
+ * @copy spark.skins.spark.ApplicationSkin#hostComponent
+ */
+ [HostComponent("spark.components.Button")]
+ ]]>
+ </fx:Metadata>
+ <fx:Script>
+ <![CDATA[
+ import mx.events.FlexEvent;
+
+ import flatSpark.utils.AwesomeUtils;
+ import flatSpark.utils.ColorUtils;
+
+ protected function initializeHandler(event:FlexEvent):void
+ {
+ // TODO Auto-generated method stub
+ hostComponent.useHandCursor=true;
+ hostComponent.buttonMode=true;
+ }
+
+ ]]>
+ </fx:Script>
+
+ <!-- <fx:Script fb:purpose="styling">
+ <![CDATA[
+ import flatSpark.utils.AwesomeUtils;
+ ]]>
+ /* Define the skin elements that should not be colorized.
+ For closeButton, the graphics are colorized but the x is not. */
+ static private const exclusions:Array = ["xSymbol"];
+
+ /**
+ * @private
+ */
+ override public function get colorizeExclusions():Array {return exclusions;}
+
+ /* Define the symbol fill items that should be colored by the "symbolColor" style. */
+ static private const symbols:Array = ["xFill1", "xFill2"];
+
+ /**
+ * @private
+ */
+ override public function get symbolItems():Array {return symbols};
+ </fx:Script>-->
+
+ <s:states>
+ <s:State name="up" />
+ <s:State name="over"/>
+ <s:State name="down" />
+ <s:State name="disabled" />
+ </s:states>
+
+ <s:Rect left="0" top="0" right="0" bottom="0" radiusX="6" width="26" height="26" includeIn="up">
+ <s:fill>
+ <s:SolidColor alpha="0" />
+ </s:fill>
+ </s:Rect>
+
+ <s:Rect left="0" top="0" right="0" bottom="0" radiusX="6" width="26" height="26" includeIn="over">
+ <s:fill>
+ <s:SolidColor alpha="1" color="{ColorUtils.BelizeHole}" />
+ </s:fill>
+ </s:Rect>
+
+ <s:Rect left="0" top="0" right="0" bottom="0" radiusX="6" width="26" height="26" includeIn="down">
+ <s:fill>
+ <s:SolidColor alpha="1" color="{ColorUtils.BelizeHole}" />
+ </s:fill>
+ </s:Rect>
+
+ <s:Rect left="0" top="0" right="0" bottom="0" radiusX="6" width="26" height="26" includeIn="disabled">
+ <s:fill>
+ <s:SolidColor alpha="1" color="{ColorUtils.Clouds}" />
+ </s:fill>
+ </s:Rect>
+
+ <s:Label fontFamily="FontAwesome" fontSize="18" color="#FFFFFF" text="{AwesomeUtils.fa_times}" includeIn="up, down, over, disabled"
+ itemCreationPolicy="immediate" verticalAlign="middle" horizontalCenter="0" verticalCenter="0" />
+
+
+</s:SparkSkin>
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/flex-sdk/blob/e72f72e3/frameworks/projects/flatspark/src/skins/TitleWindowSkin.mxml
----------------------------------------------------------------------
diff --git a/frameworks/projects/flatspark/src/skins/TitleWindowSkin.mxml b/frameworks/projects/flatspark/src/skins/TitleWindowSkin.mxml
new file mode 100644
index 0000000..5180756
--- /dev/null
+++ b/frameworks/projects/flatspark/src/skins/TitleWindowSkin.mxml
@@ -0,0 +1,256 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+
+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.
+
+-->
+
+
+<!--- The default skin class for a Spark TitleWindow container.
+
+ @see spark.skins.spark.TitleWindowCloseButtonSkin
+ @see spark.components.TitleWindow
+
+ @langversion 3.0
+ @playerversion Flash 10
+ @playerversion AIR 1.5
+ @productversion Flex 4
+-->
+<s:SparkSkin xmlns:fx="http://ns.adobe.com/mxml/2009" xmlns:s="library://ns.adobe.com/flex/spark"
+ xmlns:fb="http://ns.adobe.com/flashbuilder/2009" blendMode="normal" mouseEnabled="false"
+ minWidth="76" minHeight="76" alpha.disabled="0.5" alpha.disabledWithControlBar="0.5">
+
+ <fx:Metadata>
+ <![CDATA[
+ /**
+ * @copy spark.skins.spark.ApplicationSkin#hostComponent
+ */
+ [HostComponent("spark.components.TitleWindow")]
+ ]]>
+ </fx:Metadata>
+
+ <fx:Script fb:purpose="styling">
+ <![CDATA[
+ import mx.core.FlexVersion;
+
+ import flatSpark.utils.ColorUtils;
+
+ /* Define the skin elements that should not be colorized.
+ For panel, border and title background are skinned, but the content area, background, border, and title text are not. */
+ static private const exclusions:Array = ["background", "titleDisplay", "contentGroup", "border"];
+
+ /* exclusions before Flex 4.5 for backwards-compatibility purposes */
+ static private const exclusions_4_0:Array = ["background", "titleDisplay", "contentGroup"];
+
+ /**
+ * @private
+ */
+ override public function get colorizeExclusions():Array
+ {
+ // Since border is styleable via borderColor, no need to allow chromeColor to affect
+ // the border. This is wrapped in a compatibility flag since this change was added
+ // in Flex 4.5
+ if (FlexVersion.compatibilityVersion < FlexVersion.VERSION_4_5)
+ {
+ return exclusions_4_0;
+ }
+
+ return exclusions;
+ }
+
+ /**
+ * @private
+ */
+ override protected function initializationComplete():void
+ {
+ useChromeColor = true;
+ super.initializationComplete();
+ }
+
+ /**
+ * @private
+ */
+ override protected function updateDisplayList(unscaledWidth:Number, unscaledHeight:Number):void
+ {
+ var withControls:Boolean =
+ (currentState == "disabledWithControlBar" ||
+ currentState == "normalWithControlBar" ||
+ currentState == "inactiveWithControlBar");
+
+ setPartCornerRadii(topMaskRect, withControls);
+ setPartCornerRadii(background, withControls);
+ if (bottomMaskRect != null)
+ {
+ setPartCornerRadii(bottomMaskRect, withControls);
+ }
+
+ super.updateDisplayList(unscaledWidth, unscaledHeight);
+ }
+
+ /**
+ * @private
+ */
+ private function setPartCornerRadii(target:Rect, includeBottom:Boolean):void
+ {
+ target.topLeftRadiusX = cornerRadius;
+ target.topRightRadiusX = cornerRadius;
+ target.bottomLeftRadiusX = includeBottom ? cornerRadius : 0;
+ target.bottomRightRadiusX = includeBottom ? cornerRadius : 0;
+ }
+
+ private var cornerRadius:Number=4;
+ ]]>
+ </fx:Script>
+
+ <s:states>
+ <s:State name="normal" />
+ <s:State name="inactive" stateGroups="inactiveGroup" />
+ <s:State name="disabled" />
+ <s:State name="normalWithControlBar" stateGroups="withControls" />
+ <s:State name="inactiveWithControlBar" stateGroups="withControls, inactiveGroup" />
+ <s:State name="disabledWithControlBar" stateGroups="withControls" />
+ </s:states>
+
+ <!--- drop shadow can't be hittable so all other graphics go in this group -->
+ <s:Group left="0" right="0" top="0" bottom="0">
+
+ <!--- top group mask @private-->
+ <s:Group left="1" top="1" right="1" bottom="1" id="topGroupMask">
+ <!--- @private-->
+ <s:Rect id="topMaskRect" left="0" top="0" right="0" bottom="0">
+ <s:fill>
+ <s:SolidColor alpha="0"/>
+ </s:fill>
+ </s:Rect>
+ </s:Group>
+
+ <!--- bottom group mask @private-->
+ <s:Group left="1" top="1" right="1" bottom="1" id="bottomGroupMask"
+ includeIn="withControls">
+ <!--- @private-->
+ <s:Rect id="bottomMaskRect" left="0" top="0" right="0" bottom="0">
+ <s:fill>
+ <s:SolidColor alpha="0"/>
+ </s:fill>
+ </s:Rect>
+ </s:Group>
+
+
+ <!-- layer 2: background fill -->
+ <!--- Defines the appearance of the TitleWindowSkin class's background. -->
+ <s:Rect id="background" left="1" top="1" right="1" bottom="1">
+ <s:fill>
+ <!--- Defines the TitleWindowSkin class's background fill. The default color is 0xFFFFFF. -->
+ <s:SolidColor id="backgroundFill" color="{ColorUtils.Clouds}"/>
+ </s:fill>
+ </s:Rect>
+
+ <!-- layer 3: contents -->
+ <!--- Contains the vertical stack of title bar content and control bar. -->
+ <s:Group left="1" right="1" top="1" bottom="1" id="contents">
+ <s:layout>
+ <s:VerticalLayout gap="0" horizontalAlign="justify" />
+ </s:layout>
+ <!--- @private -->
+ <s:Group id="topGroup" mask="{topGroupMask}" height="56">
+
+ <!--- layer 0: title bar fill @private -->
+ <s:Rect id="tbFill" left="0" right="0" top="0" bottom="1">
+ <s:fill>
+ <s:SolidColor color="{ColorUtils.PeterRiver}"/>
+ </s:fill>
+ </s:Rect>
+
+ <!--- layer 1: title bar highlight @private -->
+ <s:Rect id="tbHilite" left="0" right="0" top="0" bottom="0">
+ <s:fill>
+ <s:SolidColor color="{ColorUtils.PeterRiver}"/>
+ </s:fill>
+ </s:Rect>
+
+ <!--- layer 2: title bar divider @private -->
+ <s:Rect id="tbDiv" left="0" right="0" height="1" bottom="0">
+ <s:fill>
+ <s:SolidColor color="{ColorUtils.BelizeHole}"/>
+ </s:fill>
+
+ <s:filters>
+ <s:DropShadowFilter distance="1" angle="90" color="{ColorUtils.Silver}"/>
+ </s:filters>
+ </s:Rect>
+
+ <!-- layer 3: text -->
+ <!--- @copy spark.components.Panel#titleDisplay -->
+ <s:Label id="titleDisplay" maxDisplayedLines="1" fontFamily="Lato" fontSize="21" fontStyle="normal" color="#FFFFFF"
+ left="15" right="36" top="1" bottom="0" minHeight="56" height="56"
+ verticalAlign="middle" fontWeight="bold" />
+
+ <!-- layer 4: moveArea -->
+ <!--- @copy spark.components.TitleWindow#moveArea -->
+ <s:Group id="moveArea" left="0" right="0" top="0" bottom="0" />
+
+ <!--- @copy spark.components.TitleWindow#closeButton -->
+ <s:Button id="closeButton" skinClass="flatSpark.skins.TitleWindowCloseButtonSkin"
+ right="15" top="15" />
+ </s:Group>
+
+ <!--
+ Note: setting the minimum size to 0 here so that changes to the host component's
+ size will not be thwarted by this skin part's minimum size. This is a compromise,
+ more about it here: http://bugs.adobe.com/jira/browse/SDK-21143
+ -->
+ <!--- @copy spark.components.SkinnableContainer#contentGroup -->
+ <s:Group id="contentGroup" width="100%" height="100%" minWidth="0" minHeight="0">
+ </s:Group>
+
+ <!--- @private -->
+ <s:Group id="bottomGroup" minWidth="0" minHeight="0"
+ includeIn="withControls">
+
+ <s:Group left="0" right="0" top="0" bottom="0" mask="{bottomGroupMask}" height="65">
+
+ <!-- layer 0: control bar divider line -->
+ <s:Rect left="0" right="0" top="0" height="1">
+ <s:fill>
+ <s:SolidColor color="{ColorUtils.Silver}" />
+ </s:fill>
+ </s:Rect>
+
+ <!-- layer 1: control bar highlight -->
+ <s:Rect left="0" right="0" top="1" bottom="0">
+ <s:fill>
+ <s:SolidColor color="0xFFFFFF" />
+ </s:fill>
+ </s:Rect>
+
+ <!-- layer 2: control bar fill -->
+ <s:Rect left="1" right="1" top="2" bottom="1">
+ <s:fill>
+ <s:SolidColor color="0xFFFFFF" />
+ </s:fill>
+ </s:Rect>
+ </s:Group>
+
+ <!--- @copy spark.components.Panel#controlBarGroup -->
+ <s:Group id="controlBarGroup" left="0" right="0" top="1" bottom="1" minWidth="0" minHeight="0">
+ <s:layout>
+ <s:HorizontalLayout paddingLeft="10" paddingRight="10" paddingTop="7" paddingBottom="7" gap="10" />
+ </s:layout>
+ </s:Group>
+ </s:Group>
+ </s:Group>
+ </s:Group>
+</s:SparkSkin>
http://git-wip-us.apache.org/repos/asf/flex-sdk/blob/e72f72e3/frameworks/projects/flatspark/src/skins/VScrollBarSkin.mxml
----------------------------------------------------------------------
diff --git a/frameworks/projects/flatspark/src/skins/VScrollBarSkin.mxml b/frameworks/projects/flatspark/src/skins/VScrollBarSkin.mxml
new file mode 100644
index 0000000..82e8d14
--- /dev/null
+++ b/frameworks/projects/flatspark/src/skins/VScrollBarSkin.mxml
@@ -0,0 +1,87 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+
+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.
+
+-->
+
+
+<!--- The default skin class for the Spark VScrollBar component. The thumb and track skins are defined by the
+VScrollBarThumbSkin and VScrollBarTrackSkin classes, respectively.
+
+ @see spark.components.VScrollBar
+ @see spark.skins.spark.VScrollBarThumbSkin
+ @see spark.skins.spark.VScrollBarTrackSkin
+
+ @langversion 3.0
+ @playerversion Flash 10
+ @playerversion AIR 1.5
+ @productversion Flex 4
+-->
+<s:SparkSkin xmlns:fx="http://ns.adobe.com/mxml/2009" xmlns:s="library://ns.adobe.com/flex/spark"
+ xmlns:fb="http://ns.adobe.com/flashbuilder/2009" minWidth="8" minHeight="35"
+ alpha.disabled="0.5" alpha.inactive="0.5" >
+
+ <fx:Metadata>
+ <![CDATA[
+ /**
+ * @copy spark.skins.spark.ApplicationSkin#hostComponent
+ */
+ [HostComponent("spark.components.VScrollBar")]
+ ]]>
+ </fx:Metadata>
+
+ <fx:Script fb:purpose="styling">
+ /* Define the skin elements that should not be colorized.
+ For scroll bar, the skin itself is colorized but the individual parts are not. */
+ static private const exclusions:Array = ["track", "thumb"];
+
+ /**
+ * @private
+ */
+ override public function get colorizeExclusions():Array {return exclusions;}
+
+ /**
+ * @private
+ */
+ override protected function initializationComplete():void
+ {
+ useChromeColor = true;
+ super.initializationComplete();
+ }
+ </fx:Script>
+
+ <s:states>
+ <s:State name="normal" />
+ <s:State name="disabled" />
+ <s:State name="inactive" />
+ </s:states>
+
+ <!--- The default skin class is VScrollBarTrackSkin.
+ @copy spark.components.supportClasses.TrackBase#track
+ @see spark.skins.spark.VScrollBarTrackSkin -->
+ <s:Button id="track" top="0" bottom="0" height="54"
+ focusEnabled="false" tabEnabled="false"
+ skinClass="flatSpark.skins.VScrollBarTrackSkin" />
+
+ <!--- The default skin class is VScrollBarThumbSkin.
+ @copy spark.components.supportClasses.TrackBase#thumb
+ @see spark.skins.spark.VScrollBarThumbSkin -->
+ <s:Button id="thumb"
+ focusEnabled="false" visible.inactive="false" tabEnabled="false"
+ skinClass="flatSpark.skins.VScrollBarThumbSkin" />
+
+</s:SparkSkin>
http://git-wip-us.apache.org/repos/asf/flex-sdk/blob/e72f72e3/frameworks/projects/flatspark/src/skins/VScrollBarThumbSkin.mxml
----------------------------------------------------------------------
diff --git a/frameworks/projects/flatspark/src/skins/VScrollBarThumbSkin.mxml b/frameworks/projects/flatspark/src/skins/VScrollBarThumbSkin.mxml
new file mode 100644
index 0000000..24fc159
--- /dev/null
+++ b/frameworks/projects/flatspark/src/skins/VScrollBarThumbSkin.mxml
@@ -0,0 +1,74 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+
+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.
+
+-->
+
+
+<!--- The default skin class for the thumb of a Spark VScrollBar component.
+
+@see spark.components.VScrollBar
+
+@langversion 3.0
+@playerversion Flash 10
+@playerversion AIR 1.5
+@productversion Flex 4
+-->
+<s:SparkSkin xmlns:fx="http://ns.adobe.com/mxml/2009" xmlns:s="library://ns.adobe.com/flex/spark"
+ xmlns:fb="http://ns.adobe.com/flashbuilder/2009">
+
+ <fx:Metadata>
+ <![CDATA[
+ /**
+ * @copy spark.skins.spark.ApplicationSkin#hostComponent
+ */
+ [HostComponent("spark.components.Button")]
+ ]]>
+ </fx:Metadata>
+
+ <fx:Script fb:purpose="styling">
+ <![CDATA[
+ import flatSpark.utils.ColorUtils;
+
+ /**
+ * @private
+ */
+ override protected function initializationComplete():void
+ {
+ useChromeColor = true;
+ super.initializationComplete();
+ }
+ ]]>
+ </fx:Script>
+
+ <s:states>
+ <s:State name="up" />
+ <s:State name="over" />
+ <s:State name="down" />
+ <s:State name="disabled" />
+ </s:states>
+
+ <!-- background -->
+ <s:Rect left="0" top="0" right="0" bottom="0" minWidth="8" minHeight="8" radiusX="2" alpha="0.5">
+ <s:stroke>
+ <s:SolidColorStroke color="{ColorUtils.MidnightBlue}" weight="1"/>
+ </s:stroke>
+ <s:fill>
+ <s:SolidColor color="{ColorUtils.Silver}" />
+ </s:fill>
+ </s:Rect>
+</s:SparkSkin>
http://git-wip-us.apache.org/repos/asf/flex-sdk/blob/e72f72e3/frameworks/projects/flatspark/src/skins/VScrollBarTrackSkin.mxml
----------------------------------------------------------------------
diff --git a/frameworks/projects/flatspark/src/skins/VScrollBarTrackSkin.mxml b/frameworks/projects/flatspark/src/skins/VScrollBarTrackSkin.mxml
new file mode 100644
index 0000000..1f1fc08
--- /dev/null
+++ b/frameworks/projects/flatspark/src/skins/VScrollBarTrackSkin.mxml
@@ -0,0 +1,71 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+
+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.
+
+-->
+
+
+<!--- The default skin class for the track of a Spark VScrollBar component.
+
+@see spark.components.VScrollBar
+
+@langversion 3.0
+@playerversion Flash 10
+@playerversion AIR 1.5
+@productversion Flex 4
+-->
+<s:SparkSkin xmlns:fx="http://ns.adobe.com/mxml/2009" xmlns:s="library://ns.adobe.com/flex/spark"
+ xmlns:fb="http://ns.adobe.com/flashbuilder/2009">
+
+ <fx:Metadata>
+ <![CDATA[
+ /**
+ * @copy spark.skins.spark.ApplicationSkin#hostComponent
+ */
+ [HostComponent("spark.components.Button")]
+ ]]>
+ </fx:Metadata>
+
+ <fx:Script fb:purpose="styling">
+ <![CDATA[
+ import flatSpark.utils.ColorUtils;
+
+ /**
+ * @private
+ */
+ override protected function initializationComplete():void
+ {
+ useChromeColor = true;
+ super.initializationComplete();
+ }
+ ]]>
+ </fx:Script>
+
+ <s:states>
+ <s:State name="up" />
+ <s:State name="down" />
+ <s:State name="over" />
+ <s:State name="disabled" />
+ </s:states>
+
+ <!-- border/fill -->
+ <s:Rect top="0" bottom="0" left="0" right="0" minWidth="8" minHeight="8" radiusX="2">
+ <s:fill>
+ <s:SolidColor color="{ColorUtils.MidnightBlue}" />
+ </s:fill>
+ </s:Rect>
+</s:SparkSkin>
[3/3] git commit: [flex-sdk] [refs/heads/develop] - Added FlatSpark
project
Posted by ak...@apache.org.
Added FlatSpark project
Project: http://git-wip-us.apache.org/repos/asf/flex-sdk/repo
Commit: http://git-wip-us.apache.org/repos/asf/flex-sdk/commit/e72f72e3
Tree: http://git-wip-us.apache.org/repos/asf/flex-sdk/tree/e72f72e3
Diff: http://git-wip-us.apache.org/repos/asf/flex-sdk/diff/e72f72e3
Branch: refs/heads/develop
Commit: e72f72e3ab217d5b877884be13573bbf1e3bd051
Parents: 105ae47
Author: Mahmoud Ali <ak...@apache.org>
Authored: Mon Oct 6 22:17:36 2014 -0400
Committer: Mahmoud Ali <ak...@apache.org>
Committed: Mon Oct 6 22:17:36 2014 -0400
----------------------------------------------------------------------
frameworks/projects/flatspark/defaults.css | 97 +++++
.../src/assets/fonts/awesome/FontAwesome.otf | Bin 0 -> 62856 bytes
.../src/assets/fonts/lato/Lato_Black.otf | Bin 0 -> 47436 bytes
.../src/assets/fonts/lato/Lato_Black_Italic.otf | Bin 0 -> 46100 bytes
.../src/assets/fonts/lato/Lato_Bold.otf | Bin 0 -> 48800 bytes
.../src/assets/fonts/lato/Lato_Bold_Italic.otf | Bin 0 -> 47364 bytes
.../src/assets/fonts/lato/Lato_Hairline.otf | Bin 0 -> 46852 bytes
.../assets/fonts/lato/Lato_Hairline_Italic.otf | Bin 0 -> 46568 bytes
.../src/assets/fonts/lato/Lato_Light.otf | Bin 0 -> 47040 bytes
.../src/assets/fonts/lato/Lato_Light_Italic.otf | Bin 0 -> 47060 bytes
.../src/assets/fonts/lato/Lato_Regular.otf | Bin 0 -> 47088 bytes
.../assets/fonts/lato/Lato_Regular_Italic.otf | Bin 0 -> 47356 bytes
.../flatspark/src/components/ButtonIcon.as | 41 ++
.../flatspark/src/components/TextInputIcon.as | 35 ++
.../flatspark/src/enums/BrandColorEnum.as | 30 ++
.../flatspark/src/enums/ButtonColorEnum.as | 59 +++
.../flatspark/src/enums/ButtonSizeEnum.as | 31 ++
.../flatspark/src/enums/ColorSwatchEnum.as | 40 ++
.../projects/flatspark/src/enums/SizeEnum.as | 32 ++
.../flatspark/src/enums/TextInputSizeEnum.as | 30 ++
.../src/itemRenderers/DefaultItemRenderer.mxml | 51 +++
.../projects/flatspark/src/skins/AlertSkin.mxml | 230 +++++++++++
.../flatspark/src/skins/ButtonIconSkin.mxml | 191 +++++++++
.../flatspark/src/skins/ButtonSkin.mxml | 184 +++++++++
.../flatspark/src/skins/CheckBoxSkin.mxml | 136 +++++++
.../flatspark/src/skins/ComboBoxButtonSkin.mxml | 108 +++++
.../flatspark/src/skins/ComboBoxSkin.mxml | 127 ++++++
.../src/skins/ComboBoxTextInputSkin.mxml | 218 ++++++++++
.../src/skins/DropDownListButtonSkin.mxml | 109 +++++
.../flatspark/src/skins/DropDownListSkin.mxml | 143 +++++++
.../flatspark/src/skins/HScrollBarSkin.mxml | 87 ++++
.../src/skins/HScrollBarThumbSkin.mxml | 74 ++++
.../src/skins/HScrollBarTrackSkin.mxml | 71 ++++
.../projects/flatspark/src/skins/PanelSkin.mxml | 253 ++++++++++++
.../flatspark/src/skins/ProgressBarSkin.mxml | 54 +++
.../flatspark/src/skins/RadioButtonSkin.mxml | 129 ++++++
.../flatspark/src/skins/ScrollerSkin.mxml | 106 +++++
.../flatspark/src/skins/TextInputIconSkin.mxml | 338 ++++++++++++++++
.../flatspark/src/skins/TextInputSkin.mxml | 330 +++++++++++++++
.../src/skins/TitleWindowCloseButtonSkin.mxml | 118 ++++++
.../flatspark/src/skins/TitleWindowSkin.mxml | 256 ++++++++++++
.../flatspark/src/skins/VScrollBarSkin.mxml | 87 ++++
.../src/skins/VScrollBarThumbSkin.mxml | 74 ++++
.../src/skins/VScrollBarTrackSkin.mxml | 71 ++++
.../flatspark/src/utils/AwesomeUtils.as | 399 +++++++++++++++++++
.../projects/flatspark/src/utils/ColorUtils.as | 90 +++++
.../projects/flatspark/src/utils/ConfigSkin.as | 44 ++
47 files changed, 4473 insertions(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/flex-sdk/blob/e72f72e3/frameworks/projects/flatspark/defaults.css
----------------------------------------------------------------------
diff --git a/frameworks/projects/flatspark/defaults.css b/frameworks/projects/flatspark/defaults.css
new file mode 100644
index 0000000..5c4783b
--- /dev/null
+++ b/frameworks/projects/flatspark/defaults.css
@@ -0,0 +1,97 @@
+/* CSS file */
+@namespace s "library://ns.adobe.com/flex/spark";
+@namespace components "flatSpark.components.*";
+@namespace ns "http://flex.apache.org/experimental/ns";
+
+
+@font-face {
+ src: url("flatSpark/assets/fonts/awesome/FontAwesome.otf");
+ fontFamily: FontAwesome;
+ embedAsCFF: true;
+}
+
+@font-face {
+ src:url("flatSpark/assets/fonts/lato/Lato_Regular.otf");
+ fontFamily: Lato;
+ embedAsCFF: true;
+}
+
+@font-face {
+ src:url("flatSpark/assets/fonts/lato/Lato_Regular_Italic.otf");
+ fontFamily: Lato;
+ fontStyle: italic;
+ embedAsCFF: true;
+}
+
+@font-face {
+ src:url("flatSpark/assets/fonts/lato/Lato_Bold.otf");
+ fontFamily: Lato;
+ fontWeight: bold;
+ embedAsCFF: true;
+}
+
+@font-face {
+ src:url("flatSpark/assets/fonts/lato/Lato_Bold_Italic.otf");
+ fontFamily: Lato;
+ fontStyle: italic;
+ fontWeight: bold;
+ embedAsCFF: true;
+}
+
+@font-face {
+ src:url("flatSpark/assets/fonts/lato/Lato_Light.otf");
+ fontFamily: LatoLight;
+ embedAsCFF: true;
+}
+
+@font-face {
+ src:url("flatSpark/assets/fonts/lato/Lato_Light_Italic.otf");
+ fontFamily: LatoLight;
+ fontStyle: italic;
+ embedAsCFF: true;
+}
+
+@font-face {
+ src:url("flatSpark/assets/fonts/lato/Lato_Hairline.otf");
+ fontFamily: LatoHairline;
+ embedAsCFF: true;
+}
+
+@font-face {
+ src:url("flatSpark/assets/fonts/lato/Lato_Hairline_Italic.otf");
+ fontFamily: LatoHairline;
+ fontStyle: italic;
+ embedAsCFF: true;
+}
+
+@font-face {
+ src:url("flatSpark/assets/fonts/lato/Lato_Black.otf");
+ fontFamily: LatoBlack;
+ embedAsCFF: true;
+}
+
+@font-face {
+ src:url("flatSpark/assets/fonts/lato/Lato_Black_Italic.otf");
+ fontFamily: LatoBlack;
+ fontStyle: italic;
+ embedAsCFF: true;
+}
+
+global
+{
+ modal-transparency: 0.98;
+ modal-transparency-blur: 0;
+ modal-transparency-color: #2c3e50;
+}
+
+s|Application {
+ fontFamily: Lato, Helvetica, Arial, sans-serif;
+}
+
+components|ButtonIcon {
+ skinClass: ClassReference("flatSpark.skins.ButtonIconSkin");
+}
+
+components|TextInputIcon {
+ skinClass: ClassReference("flatSpark.skins.TextInputIconSkin");
+}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/flex-sdk/blob/e72f72e3/frameworks/projects/flatspark/src/assets/fonts/awesome/FontAwesome.otf
----------------------------------------------------------------------
diff --git a/frameworks/projects/flatspark/src/assets/fonts/awesome/FontAwesome.otf b/frameworks/projects/flatspark/src/assets/fonts/awesome/FontAwesome.otf
new file mode 100644
index 0000000..8b0f54e
Binary files /dev/null and b/frameworks/projects/flatspark/src/assets/fonts/awesome/FontAwesome.otf differ
http://git-wip-us.apache.org/repos/asf/flex-sdk/blob/e72f72e3/frameworks/projects/flatspark/src/assets/fonts/lato/Lato_Black.otf
----------------------------------------------------------------------
diff --git a/frameworks/projects/flatspark/src/assets/fonts/lato/Lato_Black.otf b/frameworks/projects/flatspark/src/assets/fonts/lato/Lato_Black.otf
new file mode 100644
index 0000000..237ffb7
Binary files /dev/null and b/frameworks/projects/flatspark/src/assets/fonts/lato/Lato_Black.otf differ
http://git-wip-us.apache.org/repos/asf/flex-sdk/blob/e72f72e3/frameworks/projects/flatspark/src/assets/fonts/lato/Lato_Black_Italic.otf
----------------------------------------------------------------------
diff --git a/frameworks/projects/flatspark/src/assets/fonts/lato/Lato_Black_Italic.otf b/frameworks/projects/flatspark/src/assets/fonts/lato/Lato_Black_Italic.otf
new file mode 100644
index 0000000..97f1b93
Binary files /dev/null and b/frameworks/projects/flatspark/src/assets/fonts/lato/Lato_Black_Italic.otf differ
http://git-wip-us.apache.org/repos/asf/flex-sdk/blob/e72f72e3/frameworks/projects/flatspark/src/assets/fonts/lato/Lato_Bold.otf
----------------------------------------------------------------------
diff --git a/frameworks/projects/flatspark/src/assets/fonts/lato/Lato_Bold.otf b/frameworks/projects/flatspark/src/assets/fonts/lato/Lato_Bold.otf
new file mode 100644
index 0000000..7f0a3d3
Binary files /dev/null and b/frameworks/projects/flatspark/src/assets/fonts/lato/Lato_Bold.otf differ
http://git-wip-us.apache.org/repos/asf/flex-sdk/blob/e72f72e3/frameworks/projects/flatspark/src/assets/fonts/lato/Lato_Bold_Italic.otf
----------------------------------------------------------------------
diff --git a/frameworks/projects/flatspark/src/assets/fonts/lato/Lato_Bold_Italic.otf b/frameworks/projects/flatspark/src/assets/fonts/lato/Lato_Bold_Italic.otf
new file mode 100644
index 0000000..4eb4518
Binary files /dev/null and b/frameworks/projects/flatspark/src/assets/fonts/lato/Lato_Bold_Italic.otf differ
http://git-wip-us.apache.org/repos/asf/flex-sdk/blob/e72f72e3/frameworks/projects/flatspark/src/assets/fonts/lato/Lato_Hairline.otf
----------------------------------------------------------------------
diff --git a/frameworks/projects/flatspark/src/assets/fonts/lato/Lato_Hairline.otf b/frameworks/projects/flatspark/src/assets/fonts/lato/Lato_Hairline.otf
new file mode 100644
index 0000000..4edb976
Binary files /dev/null and b/frameworks/projects/flatspark/src/assets/fonts/lato/Lato_Hairline.otf differ
http://git-wip-us.apache.org/repos/asf/flex-sdk/blob/e72f72e3/frameworks/projects/flatspark/src/assets/fonts/lato/Lato_Hairline_Italic.otf
----------------------------------------------------------------------
diff --git a/frameworks/projects/flatspark/src/assets/fonts/lato/Lato_Hairline_Italic.otf b/frameworks/projects/flatspark/src/assets/fonts/lato/Lato_Hairline_Italic.otf
new file mode 100644
index 0000000..50b82a2
Binary files /dev/null and b/frameworks/projects/flatspark/src/assets/fonts/lato/Lato_Hairline_Italic.otf differ
http://git-wip-us.apache.org/repos/asf/flex-sdk/blob/e72f72e3/frameworks/projects/flatspark/src/assets/fonts/lato/Lato_Light.otf
----------------------------------------------------------------------
diff --git a/frameworks/projects/flatspark/src/assets/fonts/lato/Lato_Light.otf b/frameworks/projects/flatspark/src/assets/fonts/lato/Lato_Light.otf
new file mode 100644
index 0000000..3226cb9
Binary files /dev/null and b/frameworks/projects/flatspark/src/assets/fonts/lato/Lato_Light.otf differ
http://git-wip-us.apache.org/repos/asf/flex-sdk/blob/e72f72e3/frameworks/projects/flatspark/src/assets/fonts/lato/Lato_Light_Italic.otf
----------------------------------------------------------------------
diff --git a/frameworks/projects/flatspark/src/assets/fonts/lato/Lato_Light_Italic.otf b/frameworks/projects/flatspark/src/assets/fonts/lato/Lato_Light_Italic.otf
new file mode 100644
index 0000000..d7557b0
Binary files /dev/null and b/frameworks/projects/flatspark/src/assets/fonts/lato/Lato_Light_Italic.otf differ
http://git-wip-us.apache.org/repos/asf/flex-sdk/blob/e72f72e3/frameworks/projects/flatspark/src/assets/fonts/lato/Lato_Regular.otf
----------------------------------------------------------------------
diff --git a/frameworks/projects/flatspark/src/assets/fonts/lato/Lato_Regular.otf b/frameworks/projects/flatspark/src/assets/fonts/lato/Lato_Regular.otf
new file mode 100644
index 0000000..1f94789
Binary files /dev/null and b/frameworks/projects/flatspark/src/assets/fonts/lato/Lato_Regular.otf differ
http://git-wip-us.apache.org/repos/asf/flex-sdk/blob/e72f72e3/frameworks/projects/flatspark/src/assets/fonts/lato/Lato_Regular_Italic.otf
----------------------------------------------------------------------
diff --git a/frameworks/projects/flatspark/src/assets/fonts/lato/Lato_Regular_Italic.otf b/frameworks/projects/flatspark/src/assets/fonts/lato/Lato_Regular_Italic.otf
new file mode 100644
index 0000000..6341374
Binary files /dev/null and b/frameworks/projects/flatspark/src/assets/fonts/lato/Lato_Regular_Italic.otf differ
http://git-wip-us.apache.org/repos/asf/flex-sdk/blob/e72f72e3/frameworks/projects/flatspark/src/components/ButtonIcon.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/flatspark/src/components/ButtonIcon.as b/frameworks/projects/flatspark/src/components/ButtonIcon.as
new file mode 100644
index 0000000..96e1221
--- /dev/null
+++ b/frameworks/projects/flatspark/src/components/ButtonIcon.as
@@ -0,0 +1,41 @@
+/**
+ Licensed to the Apache Software Foundation (ASF) under one or more
+ contributor license agreements. See the NOTICE file distributed with
+ this work for additional information regarding copyright ownership.
+ The ASF licenses this file to You under the Apache License, Version 2.0
+ (the "License"); you may not use this file except in compliance with
+ the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+*/
+
+package flatSpark.components
+{
+
+ import spark.components.Button;
+
+ import flatSpark.enums.BrandColorEnum;
+
+ public class ButtonIcon extends spark.components.Button
+ {
+
+ [Bindable]
+ public var iconFont:String;
+
+ [Bindable]
+ public var brand:int = BrandColorEnum.Default;
+
+
+ public function ButtonIcon()
+ {
+ super();
+ }
+
+ }
+}
http://git-wip-us.apache.org/repos/asf/flex-sdk/blob/e72f72e3/frameworks/projects/flatspark/src/components/TextInputIcon.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/flatspark/src/components/TextInputIcon.as b/frameworks/projects/flatspark/src/components/TextInputIcon.as
new file mode 100644
index 0000000..73caada
--- /dev/null
+++ b/frameworks/projects/flatspark/src/components/TextInputIcon.as
@@ -0,0 +1,35 @@
+/**
+ Licensed to the Apache Software Foundation (ASF) under one or more
+ contributor license agreements. See the NOTICE file distributed with
+ this work for additional information regarding copyright ownership.
+ The ASF licenses this file to You under the Apache License, Version 2.0
+ (the "License"); you may not use this file except in compliance with
+ the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+ */
+
+package flatSpark.components
+{
+ import flash.events.FocusEvent;
+
+ import spark.components.TextInput;
+
+ public class TextInputIcon extends spark.components.TextInput
+ {
+ [Bindable]
+ public var iconFont:String;
+
+ public function TextInputIcon()
+ {
+ super();
+ }
+
+ }
+}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/flex-sdk/blob/e72f72e3/frameworks/projects/flatspark/src/enums/BrandColorEnum.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/flatspark/src/enums/BrandColorEnum.as b/frameworks/projects/flatspark/src/enums/BrandColorEnum.as
new file mode 100644
index 0000000..9be14b2
--- /dev/null
+++ b/frameworks/projects/flatspark/src/enums/BrandColorEnum.as
@@ -0,0 +1,30 @@
+/**
+ Licensed to the Apache Software Foundation (ASF) under one or more
+ contributor license agreements. See the NOTICE file distributed with
+ this work for additional information regarding copyright ownership.
+ The ASF licenses this file to You under the Apache License, Version 2.0
+ (the "License"); you may not use this file except in compliance with
+ the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+ */
+
+package flatSpark.enums
+{
+ public class BrandColorEnum
+ {
+ public static const Primary:int = 1;
+ public static const Success:int = 2;
+ public static const Warning:int = 3;
+ public static const Inverse:int = 4;
+ public static const Default:int = 5;
+ public static const Info:int = 6;
+ public static const Danger:int = 7;
+ }
+}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/flex-sdk/blob/e72f72e3/frameworks/projects/flatspark/src/enums/ButtonColorEnum.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/flatspark/src/enums/ButtonColorEnum.as b/frameworks/projects/flatspark/src/enums/ButtonColorEnum.as
new file mode 100644
index 0000000..48d1a55
--- /dev/null
+++ b/frameworks/projects/flatspark/src/enums/ButtonColorEnum.as
@@ -0,0 +1,59 @@
+/**
+ Licensed to the Apache Software Foundation (ASF) under one or more
+ contributor license agreements. See the NOTICE file distributed with
+ this work for additional information regarding copyright ownership.
+ The ASF licenses this file to You under the Apache License, Version 2.0
+ (the "License"); you may not use this file except in compliance with
+ the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+ */
+
+package flatSpark.enums
+{
+ import flatSpark.utils.ColorUtils;
+
+ public class ButtonColorEnum
+ {
+ public static const PrimaryUp:uint = ColorUtils.Turquoise;
+ public static const PrimaryHover:uint = 0x48C9B0;
+ public static const PrimaryDown:uint = 0x16A085;
+ public static const PrimaryDisabled:uint = ColorUtils.Turquoise;
+
+ public static const SuccessUp:uint = ColorUtils.Emerald;
+ public static const SuccessHover:uint = 0x58D68D;
+ public static const SuccessDown:uint = 0x27AD60;
+ public static const SuccessDisabled:uint = ColorUtils.Emerald;
+
+ public static const WarningUp:uint = ColorUtils.SunFlower;
+ public static const WarningHover:uint = 0xF5D313;
+ public static const WarningDown:uint = 0xCDA70D;
+ public static const WarningDisabled:uint = ColorUtils.SunFlower;
+
+ public static const InverseUp:uint = ColorUtils.WetAsphalt;
+ public static const InverseHover:uint = 0x415B76;
+ public static const InverseDown:uint = 0x2C3E50;
+ public static const InverseDisabled:uint = ColorUtils.WetAsphalt;
+
+ public static const DefaultUp:uint = ColorUtils.Silver;
+ public static const DefaultHover:uint = 0xCACFD2;
+ public static const DefaultDown:uint = 0xA1A6A9;
+ public static const DefaultDisabled:uint = ColorUtils.Silver;
+
+ public static const InfoUp:uint = ColorUtils.PeterRiver;
+ public static const InfoHover:uint = 0x5DADE2;
+ public static const InfoDown:uint = 0x2C81BA;
+ public static const InfoDisabled:uint = ColorUtils.PeterRiver;
+
+ public static const DangerUp:uint = ColorUtils.Alizarin;
+ public static const DangerHover:uint = 0xEC7063;
+ public static const DangerDown:uint = 0xC44133;
+ public static const DangerDisabled:uint = ColorUtils.Alizarin;
+ }
+}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/flex-sdk/blob/e72f72e3/frameworks/projects/flatspark/src/enums/ButtonSizeEnum.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/flatspark/src/enums/ButtonSizeEnum.as b/frameworks/projects/flatspark/src/enums/ButtonSizeEnum.as
new file mode 100644
index 0000000..bb210fc
--- /dev/null
+++ b/frameworks/projects/flatspark/src/enums/ButtonSizeEnum.as
@@ -0,0 +1,31 @@
+/**
+ Licensed to the Apache Software Foundation (ASF) under one or more
+ contributor license agreements. See the NOTICE file distributed with
+ this work for additional information regarding copyright ownership.
+ The ASF licenses this file to You under the Apache License, Version 2.0
+ (the "License"); you may not use this file except in compliance with
+ the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+ */
+
+package flatSpark.enums
+{
+ public class ButtonSizeEnum
+ {
+ public static const Large:int = 43;
+ public static const Normal:int = 32;
+ public static const Small:int = 28;
+ public static const ExtraSmall:int = 20;
+
+ public function ButtonSizeEnum()
+ {
+ }
+ }
+}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/flex-sdk/blob/e72f72e3/frameworks/projects/flatspark/src/enums/ColorSwatchEnum.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/flatspark/src/enums/ColorSwatchEnum.as b/frameworks/projects/flatspark/src/enums/ColorSwatchEnum.as
new file mode 100644
index 0000000..a1a2769
--- /dev/null
+++ b/frameworks/projects/flatspark/src/enums/ColorSwatchEnum.as
@@ -0,0 +1,40 @@
+/**
+ Licensed to the Apache Software Foundation (ASF) under one or more
+ contributor license agreements. See the NOTICE file distributed with
+ this work for additional information regarding copyright ownership.
+ The ASF licenses this file to You under the Apache License, Version 2.0
+ (the "License"); you may not use this file except in compliance with
+ the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+ */
+
+package flatSpark.enums
+{
+ public class ColorSwatchEnum
+ {
+ public static const Turquoise_GreenSea:int = 1;
+ public static const Emerald_Nephritis:int = 2;
+ public static const PeterRiver_BelizeHole:int = 3;
+ public static const Amethyst_Wisteria:int = 4;
+ public static const WetAsphalt_MidnightBlue:int = 5;
+ public static const SunFlower_Orange:int = 6;
+ public static const Carrot_Pumpkin:int = 7;
+ public static const Alizarin_Pomegranate:int = 8;
+ public static const Clouds_Silver:int = 9;
+ public static const Concrete_Asbestos:int = 10;
+
+
+ private var _colorSwatch:int;
+
+ public function ColorSwatchEnum(colorSwatch:int = 3) {
+ _colorSwatch = colorSwatch;
+ }
+ }
+}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/flex-sdk/blob/e72f72e3/frameworks/projects/flatspark/src/enums/SizeEnum.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/flatspark/src/enums/SizeEnum.as b/frameworks/projects/flatspark/src/enums/SizeEnum.as
new file mode 100644
index 0000000..83600fa
--- /dev/null
+++ b/frameworks/projects/flatspark/src/enums/SizeEnum.as
@@ -0,0 +1,32 @@
+/**
+ Licensed to the Apache Software Foundation (ASF) under one or more
+ contributor license agreements. See the NOTICE file distributed with
+ this work for additional information regarding copyright ownership.
+ The ASF licenses this file to You under the Apache License, Version 2.0
+ (the "License"); you may not use this file except in compliance with
+ the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+ */
+
+package flatSpark.enums
+{
+ public class SizeEnum
+ {
+ public static const Small:int = 10;
+ public static const Medium:int = 12;
+ public static const Large:int = 14;
+
+ private var _size:int;
+
+ public function SizeEnum(size:int = 12) {
+ _size = size;
+ }
+ }
+}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/flex-sdk/blob/e72f72e3/frameworks/projects/flatspark/src/enums/TextInputSizeEnum.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/flatspark/src/enums/TextInputSizeEnum.as b/frameworks/projects/flatspark/src/enums/TextInputSizeEnum.as
new file mode 100644
index 0000000..e7c38be
--- /dev/null
+++ b/frameworks/projects/flatspark/src/enums/TextInputSizeEnum.as
@@ -0,0 +1,30 @@
+/**
+ Licensed to the Apache Software Foundation (ASF) under one or more
+ contributor license agreements. See the NOTICE file distributed with
+ this work for additional information regarding copyright ownership.
+ The ASF licenses this file to You under the Apache License, Version 2.0
+ (the "License"); you may not use this file except in compliance with
+ the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+ */
+
+package flatSpark.enums
+{
+ public class TextInputSizeEnum
+ {
+ public static const Large:int = 41;
+ public static const Normal:int = 38;
+ public static const Small:int = 31;
+
+ public function TextInputSizeEnum()
+ {
+ }
+ }
+}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/flex-sdk/blob/e72f72e3/frameworks/projects/flatspark/src/itemRenderers/DefaultItemRenderer.mxml
----------------------------------------------------------------------
diff --git a/frameworks/projects/flatspark/src/itemRenderers/DefaultItemRenderer.mxml b/frameworks/projects/flatspark/src/itemRenderers/DefaultItemRenderer.mxml
new file mode 100644
index 0000000..ddada4e
--- /dev/null
+++ b/frameworks/projects/flatspark/src/itemRenderers/DefaultItemRenderer.mxml
@@ -0,0 +1,51 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+
+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.
+
+-->
+
+<s:ItemRenderer xmlns:fx="http://ns.adobe.com/mxml/2009"
+ xmlns:s="library://ns.adobe.com/flex/spark"
+ autoDrawBackground="false" height="32">
+ <s:states>
+ <s:State name="normal" />
+ <s:State name="hovered" />
+ <s:State name="selected" />
+ </s:states>
+ <fx:Script>
+ <![CDATA[
+
+ import flatSpark.utils.ColorUtils;
+
+ ]]>
+ </fx:Script>
+
+ <s:Rect id="bgFill"
+ radiusX="4"
+ includeIn="hovered,selected"
+ left="0" right="0" top="0" bottom="0">
+ <s:fill>
+ <s:SolidColor color="{ColorUtils.MidnightBlue}"
+ color.selected="{ColorUtils.Turquoise}"/>
+ </s:fill>
+ </s:Rect>
+
+ <s:Label id="labelDisplay" paddingRight="4" paddingTop="1" paddingBottom="1" paddingLeft="4"
+ verticalAlign="middle" height="100%" fontFamily="Lato" fontSize="15" fontWeight="normal"
+ fontStyle="normal" color="{ColorUtils.Clouds}" color.hovered="{ColorUtils.Silver}"/>
+
+</s:ItemRenderer>
http://git-wip-us.apache.org/repos/asf/flex-sdk/blob/e72f72e3/frameworks/projects/flatspark/src/skins/AlertSkin.mxml
----------------------------------------------------------------------
diff --git a/frameworks/projects/flatspark/src/skins/AlertSkin.mxml b/frameworks/projects/flatspark/src/skins/AlertSkin.mxml
new file mode 100644
index 0000000..b42abdf
--- /dev/null
+++ b/frameworks/projects/flatspark/src/skins/AlertSkin.mxml
@@ -0,0 +1,230 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+
+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.
+
+-->
+<s:SparkSkin xmlns:fx="http://ns.adobe.com/mxml/2009" xmlns:s="library://ns.adobe.com/flex/spark"
+ xmlns:fb="http://ns.adobe.com/flashbuilder/2009" blendMode="normal" mouseEnabled="false"
+ minWidth="131" minHeight="30" alpha.disabled="0.5" alpha.disabledWithControlBar="0.5">
+ <fx:Metadata>
+ <![CDATA[
+ [HostComponent("spark.components.Alert")]
+ ]]>
+ </fx:Metadata>
+
+ <fx:Script fb:purpose="styling">
+ <![CDATA[
+ import flatSpark.utils.ColorUtils;
+
+ /* Define the skin elements that should not be colorized.
+ For panel, border and title background are skinned, but the content area and title text are not. */
+ static private const exclusions:Array = ["background", "titleDisplay", "contentGroup", "controlBarGroup"];
+
+ /**
+ * @private
+ */
+ override public function get colorizeExclusions():Array {return exclusions;}
+
+ /**
+ * @private
+ */
+ override protected function initializationComplete():void
+ {
+ useChromeColor = true;
+ super.initializationComplete();
+ }
+
+ /**
+ * @private
+ */
+ override protected function updateDisplayList(unscaledWidth:Number, unscaledHeight:Number):void
+ {
+ setPartCornerRadii(topMaskRect);
+ setPartCornerRadii(background);
+
+ if (bottomMaskRect) setPartCornerRadii(bottomMaskRect);
+
+ super.updateDisplayList(unscaledWidth, unscaledHeight);
+ }
+
+ /**
+ * @private
+ */
+ private function setPartCornerRadii(target:Rect):void
+ {
+ target.topLeftRadiusX = cornerRadius;
+ target.topRightRadiusX = cornerRadius;
+ target.bottomLeftRadiusX = cornerRadius;
+ target.bottomRightRadiusX = cornerRadius;
+ }
+
+ private var cornerRadius:Number=4;
+
+ ]]>
+ </fx:Script>
+
+ <fx:Declarations>
+ <s:Group id="contentGroup" />
+ </fx:Declarations>
+
+ <s:states>
+ <s:State name="normal" />
+ <s:State name="disabled" />
+ <s:State name="normalWithControlBar" stateGroups="withControls" />
+ <s:State name="disabledWithControlBar" stateGroups="withControls" />
+ </s:states>
+
+ <!-- drop shadow can't be hittable so all other graphics go in this group -->
+ <s:Group left="0" right="0" top="0" bottom="0">
+
+ <!-- top group mask -->
+ <!--- @private -->
+ <s:Group left="0" top="0" right="0" bottom="0" id="topGroupMask" >
+ <!--- @private -->
+ <s:Rect id="topMaskRect" left="0" top="0" right="0" bottom="0">
+ <s:fill>
+ <s:SolidColor alpha="0"/>
+ </s:fill>
+ </s:Rect>
+ </s:Group>
+
+ <!-- bottom group mask -->
+ <!--- @private -->
+ <s:Group left="0" top="0" right="0" bottom="0" id="bottomGroupMask"
+ includeIn="normalWithControlBar, disabledWithControlBar">
+ <!--- @private -->
+ <s:Rect id="bottomMaskRect" left="0" top="0" right="0" bottom="0">
+ <s:fill>
+ <s:SolidColor alpha="0"/>
+ </s:fill>
+ </s:Rect>
+ </s:Group>
+
+ <!-- layer 2: background fill -->
+ <!--- Defines the appearance of the PanelSkin class's background. -->
+ <s:Rect id="background" left="0" top="0" right="0" bottom="0">
+ <s:fill>
+ <s:SolidColor id="backgroundFill" color="#FFFFFF"/>
+ </s:fill>
+ </s:Rect>
+
+ <!-- layer 3: contents -->
+ <!--- Contains the vertical stack of titlebar content and controlbar. -->
+ <s:Group left="0" top="0" right="0" bottom="0" id="contents">
+ <s:layout>
+ <s:VerticalLayout gap="0" horizontalAlign="justify" />
+ </s:layout>
+
+ <!--- @private -->
+ <s:Group id="topGroup" mask="{topGroupMask}">
+
+ <!-- layer 0: title bar fill -->
+ <!--- @private -->
+ <s:Rect id="tbFill" left="0" right="0" top="0" bottom="1">
+ <s:fill>
+ <s:SolidColor color="{ColorUtils.Concrete}"/>
+ </s:fill>
+ </s:Rect>
+
+ <!-- layer 1: title bar highlight -->
+ <!--- @private -->
+ <s:Rect id="tbHilite" left="0" right="0" top="0" bottom="1">
+ <s:fill>
+ <s:SolidColor color="{ColorUtils.Concrete}"/>
+ </s:fill>
+ </s:Rect>
+
+ <!-- layer 2: title bar divider -->
+ <!--- @private -->
+ <s:Rect id="tbDiv" left="0" right="0" height="1" bottom="0">
+ <s:fill>
+ <s:SolidColor color="{ColorUtils.Asbestos}"/>
+ </s:fill>
+ </s:Rect>
+
+ <!-- layer 3: text -->
+ <!--- @copy spark.components.Panel#titleDisplay -->
+ <s:Label id="titleDisplay" maxDisplayedLines="1" fontFamily="Lato" fontSize="15" fontStyle="normal" color="#FFFFFF"
+ left="15" right="5" top="2" bottom="0" minHeight="36" height="36"
+ verticalAlign="middle" fontWeight="bold" />
+ </s:Group>
+
+ <!--
+ Note: setting the minimum size to 0 here so that changes to the host component's
+ size will not be thwarted by this skin part's minimum size. This is a compromise,
+ more about it here: http://bugs.adobe.com/jira/browse/SDK-21143
+ -->
+ <!--- @copy spark.components.SkinnableContainer#contentGroup -->
+ <!--<s:Group id="contentGroup" width="100%" height="100%" minWidth="0" minHeight="0">
+ </s:Group>-->
+ <s:HGroup width="100%" height="100%" verticalAlign="middle" horizontalAlign="center" paddingBottom="20" paddingLeft="20" paddingRight="20" paddingTop="20">
+ <s:Group id="iconGroup" height="100%">
+
+ </s:Group>
+ <s:VGroup width="100%" height="100%" paddingLeft="5" paddingRight="5" paddingBottom="5" gap="20"
+ verticalAlign="middle" horizontalAlign="center">
+ <s:RichText id="messageDisplay" fontFamily="Lato" fontSize="14" fontStyle="normal" color="0x000000" lineHeight="160%"
+ left="9" right="3" top="1" bottom="0" minHeight="30" maxWidth="400"
+ verticalAlign="middle"/>
+
+ <!--
+ To-do: Need to adjust the styles for buttons
+ -->
+ <s:HGroup id="buttonGroup" width="100%" minWidth="0" minHeight="0" gap="8"
+ horizontalAlign="center"/>
+ </s:VGroup>
+ </s:HGroup>
+
+
+ <!--- @private -->
+ <s:Group id="bottomGroup" minWidth="0" minHeight="0"
+ includeIn="normalWithControlBar, disabledWithControlBar" >
+
+ <s:Group left="0" right="0" top="0" bottom="0" mask="{bottomGroupMask}">
+
+ <!-- layer 0: control bar divider line -->
+ <s:Rect left="0" right="0" top="0" height="1" alpha="0.22">
+ <s:fill>
+ <s:SolidColor color="#FFFFFF"/>
+ </s:fill>
+ </s:Rect>
+
+ <!-- layer 1: control bar highlight -->
+ <s:Rect left="0" right="0" top="1" bottom="0">
+ <s:fill>
+ <s:SolidColor color="#FFFFFF"/>
+ </s:fill>
+ </s:Rect>
+
+ <!-- layer 2: control bar fill -->
+ <s:Rect left="1" right="1" top="2" bottom="1">
+ <s:fill>
+ <s:SolidColor color="#FFFFFF"/>
+ </s:fill>
+ </s:Rect>
+ </s:Group>
+ <!-- layer 3: control bar -->
+ <!--- @copy spark.components.Panel#controlBarGroup -->
+ <s:Group id="controlBarGroup" left="0" right="0" top="1" bottom="1" minWidth="0" minHeight="0">
+ <s:layout>
+ <s:HorizontalLayout paddingLeft="10" paddingRight="10" paddingTop="7" paddingBottom="7" gap="10" />
+ </s:layout>
+ </s:Group>
+ </s:Group>
+ </s:Group>
+ </s:Group>
+</s:SparkSkin>
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/flex-sdk/blob/e72f72e3/frameworks/projects/flatspark/src/skins/ButtonIconSkin.mxml
----------------------------------------------------------------------
diff --git a/frameworks/projects/flatspark/src/skins/ButtonIconSkin.mxml b/frameworks/projects/flatspark/src/skins/ButtonIconSkin.mxml
new file mode 100644
index 0000000..f009956
--- /dev/null
+++ b/frameworks/projects/flatspark/src/skins/ButtonIconSkin.mxml
@@ -0,0 +1,191 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+
+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.
+
+-->
+
+
+<!--- The default skin class for the Spark Button component.
+
+@see spark.components.Button
+
+@langversion 3.0
+@playerversion Flash 10
+@playerversion AIR 1.5
+@productversion Flex 4
+-->
+<s:SparkSkin xmlns:fx="http://ns.adobe.com/mxml/2009"
+ xmlns:s="library://ns.adobe.com/flex/spark"
+ xmlns:fb="http://ns.adobe.com/flashbuilder/2009"
+ minWidth="21" minHeight="21" height="{ButtonSizeEnum.Normal}"
+ alpha.disabled="0.5">
+ <fx:Metadata>[HostComponent("flatSpark.components.ButtonIcon")]</fx:Metadata>
+
+ <fx:Script fb:purpose="styling">
+ <![CDATA[
+ import flatSpark.enums.ButtonColorEnum;
+ import flatSpark.enums.ButtonSizeEnum;
+ import flatSpark.enums.TextInputSizeEnum;
+ import flatSpark.utils.ColorUtils;
+
+ /* Define the skin elements that should not be colorized.
+ For button, the graphics are colorized but the label is not. */
+ static private const exclusions:Array = ["iconDisplay", "labelDisplay"];
+
+ /**
+ * @private
+ */
+ override public function get colorizeExclusions():Array {return exclusions;}
+
+ /**
+ * @private
+ */
+ override protected function initializationComplete():void
+ {
+ useChromeColor = true;
+ hostComponent.useHandCursor=true;
+ hostComponent.buttonMode=true;
+ super.initializationComplete();
+ }
+
+ /**
+ * @private
+ */
+ override protected function updateDisplayList(unscaledWidth:Number, unscaledHeight:Number) : void
+ {
+ var cr:Number = getStyle("cornerRadius");
+
+ if (cornerRadius != cr)
+ {
+ cornerRadius = cr;
+ fill_up.radiusX = cornerRadius;
+ fill_over.radiusX = cornerRadius;
+ fill_down.radiusX = cornerRadius;
+ fill_disabled.radiusX = cornerRadius;
+ }
+
+ /*var larguraIcone:int = 0;
+ if (iconFont.text != null && iconFont.text != "")
+ {
+ larguraIcone = 60;
+ }*/
+ super.updateDisplayList(unscaledWidth, unscaledHeight);
+ }
+
+ private var cornerRadius:Number = 2;
+
+ private static function getFontSize(height:int):int
+ {
+ var altura:int = 15;
+
+ switch (height)
+ {
+ case ButtonSizeEnum.Large:
+ altura = 17;
+ break;
+ case ButtonSizeEnum.Normal:
+ altura = 14;
+ break;
+ case ButtonSizeEnum.Small:
+ altura = 13;
+ break;
+ case ButtonSizeEnum.ExtraSmall:
+ altura = 12;
+ break;
+ }
+
+ return altura;
+ }
+
+ private static function getIconSize(height:int):int
+ {
+ var altura:int = 17;
+
+ switch (height)
+ {
+ case ButtonSizeEnum.Large:
+ altura = 19;
+ break;
+ case ButtonSizeEnum.Normal:
+ altura = 17;
+ break;
+ case ButtonSizeEnum.Small:
+ altura = 15;
+ break;
+ case ButtonSizeEnum.ExtraSmall:
+ altura = 12;
+ break;
+ }
+
+ return altura;
+ }
+
+ ]]>
+ </fx:Script>
+
+ <!-- states -->
+ <s:states>
+ <s:State name="up" id="stateUp"/>
+ <s:State name="over" id="stateOver"/>
+ <s:State name="down" id="stateDown"/>
+ <s:State name="disabled" id="stateDisabled"/>
+ </s:states>
+
+
+ <!-- layer 2: fill -->
+ <!--- @private -->
+ <s:Rect id="fill_up" left="1" right="1" top="1" bottom="1" radiusX="6" includeIn="up">
+ <s:fill>
+ <s:SolidColor color="{ColorUtils.ButtonColor(hostComponent.brand,stateUp)}"/>
+ </s:fill>
+ </s:Rect>
+
+ <s:Rect id="fill_over" left="1" right="1" top="1" bottom="1" radiusX="6" includeIn="over">
+ <s:fill>
+ <s:SolidColor color="{ColorUtils.ButtonColor(hostComponent.brand,stateOver)}"/>
+ </s:fill>
+ </s:Rect>
+
+ <s:Rect id="fill_down" left="1" right="1" top="1" bottom="1" radiusX="6" includeIn="down">
+ <s:fill>
+ <s:SolidColor color="{ColorUtils.ButtonColor(hostComponent.brand,stateDown)}"/>
+ </s:fill>
+ </s:Rect>
+
+ <s:Rect id="fill_disabled" left="1" right="1" top="1" bottom="1" radiusX="6" includeIn="disabled">
+ <s:fill>
+ <s:SolidColor color="{ColorUtils.ButtonColor(hostComponent.brand,stateDisabled)}"/>
+ </s:fill>
+ </s:Rect>
+
+
+ <!-- layer 8: text -->
+ <!--- @copy spark.components.supportClasses.ButtonBase#labelDisplay -->
+ <s:HGroup verticalAlign="middle" verticalCenter="0" horizontalAlign="center" horizontalCenter="0" left="10" right="10" top="2" bottom="2">
+ <s:Label id="iconFont" color="0xFFFFFF" color.disabled="0xE3E3E3" text="{hostComponent.iconFont}"
+ textAlign="left" fontSize="{getIconSize(hostComponent.height)}" fontFamily="FontAwesome"
+ maxDisplayedLines="1" includeInLayout="{hostComponent.iconFont != null}"
+ horizontalCenter="0" verticalCenter="0" verticalAlign="middle">
+ </s:Label>
+
+ <s:Label id="labelDisplay" color="0xFFFFFF" color.disabled="0xE3E3E3"
+ textAlign="center" fontSize="{getFontSize(hostComponent.height)}" fontFamily="Lato"
+ maxDisplayedLines="1"
+ horizontalCenter="0" verticalCenter="1" verticalAlign="middle">
+ </s:Label>
+ </s:HGroup>
+</s:SparkSkin>
http://git-wip-us.apache.org/repos/asf/flex-sdk/blob/e72f72e3/frameworks/projects/flatspark/src/skins/ButtonSkin.mxml
----------------------------------------------------------------------
diff --git a/frameworks/projects/flatspark/src/skins/ButtonSkin.mxml b/frameworks/projects/flatspark/src/skins/ButtonSkin.mxml
new file mode 100644
index 0000000..aa0f9c5
--- /dev/null
+++ b/frameworks/projects/flatspark/src/skins/ButtonSkin.mxml
@@ -0,0 +1,184 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+
+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.
+
+-->
+
+
+<!--- The default skin class for the Spark Button component.
+
+@see spark.components.Button
+
+@langversion 3.0
+@playerversion Flash 10
+@playerversion AIR 1.5
+@productversion Flex 4
+-->
+<s:SparkSkin xmlns:fx="http://ns.adobe.com/mxml/2009"
+ xmlns:s="library://ns.adobe.com/flex/spark"
+ xmlns:fb="http://ns.adobe.com/flashbuilder/2009"
+ minWidth="21" minHeight="21" height="{ButtonSizeEnum.Normal}"
+ alpha.disabled="0.5">
+ <fx:Metadata>[HostComponent("spark.components.Button")]</fx:Metadata>
+
+ <fx:Script fb:purpose="styling">
+ <![CDATA[
+ import flatSpark.enums.BrandColorEnum;
+ import flatSpark.enums.ButtonColorEnum;
+ import flatSpark.enums.ButtonSizeEnum;
+ import flatSpark.enums.TextInputSizeEnum;
+ import flatSpark.utils.ColorUtils;
+
+ /* Define the skin elements that should not be colorized.
+ For button, the graphics are colorized but the label is not. */
+ static private const exclusions:Array = ["iconDisplay", "labelDisplay"];
+
+ /**
+ * @private
+ */
+ override public function get colorizeExclusions():Array {return exclusions;}
+
+ /**
+ * @private
+ */
+ override protected function initializationComplete():void
+ {
+ useChromeColor = true;
+ hostComponent.useHandCursor=true;
+ hostComponent.buttonMode=true;
+ super.initializationComplete();
+ }
+
+ /**
+ * @private
+ */
+ override protected function updateDisplayList(unscaledWidth:Number, unscaledHeight:Number) : void
+ {
+ var cr:Number = getStyle("cornerRadius");
+
+ if (cornerRadius != cr)
+ {
+ cornerRadius = cr;
+ fill_up.radiusX = cornerRadius;
+ fill_over.radiusX = cornerRadius;
+ fill_down.radiusX = cornerRadius;
+ fill_disabled.radiusX = cornerRadius;
+ }
+
+ /*var larguraIcone:int = 0;
+ if (iconFont.text != null && iconFont.text != "")
+ {
+ larguraIcone = 60;
+ }*/
+ super.updateDisplayList(unscaledWidth, unscaledHeight);
+ }
+
+ private var cornerRadius:Number = 2;
+
+ private static function getFontSize(height:int):int
+ {
+ var altura:int = 15;
+
+ switch (height)
+ {
+ case ButtonSizeEnum.Large:
+ altura = 17;
+ break;
+ case ButtonSizeEnum.Normal:
+ altura = 14;
+ break;
+ case ButtonSizeEnum.Small:
+ altura = 13;
+ break;
+ case ButtonSizeEnum.ExtraSmall:
+ altura = 12;
+ break;
+ }
+
+ return altura;
+ }
+
+ private static function getIconSize(height:int):int
+ {
+ var altura:int = 17;
+
+ switch (height)
+ {
+ case ButtonSizeEnum.Large:
+ altura = 19;
+ break;
+ case ButtonSizeEnum.Normal:
+ altura = 17;
+ break;
+ case ButtonSizeEnum.Small:
+ altura = 15;
+ break;
+ case ButtonSizeEnum.ExtraSmall:
+ altura = 12;
+ break;
+ }
+
+ return altura;
+ }
+
+ ]]>
+ </fx:Script>
+
+ <!-- states -->
+ <s:states>
+ <s:State name="up" id="stateUp"/>
+ <s:State name="over" id="stateOver"/>
+ <s:State name="down" id="stateDown"/>
+ <s:State name="disabled" id="stateDisabled"/>
+ </s:states>
+
+
+ <!-- layer 2: fill -->
+ <!--- @private -->
+ <s:Rect id="fill_up" left="1" right="1" top="1" bottom="1" radiusX="6" includeIn="up">
+ <s:fill>
+ <s:SolidColor color="{ColorUtils.ButtonColor(BrandColorEnum.Default,stateUp)}"/>
+ </s:fill>
+ </s:Rect>
+
+ <s:Rect id="fill_over" left="1" right="1" top="1" bottom="1" radiusX="6" includeIn="over">
+ <s:fill>
+ <s:SolidColor color="{ColorUtils.ButtonColor(BrandColorEnum.Default,stateOver)}"/>
+ </s:fill>
+ </s:Rect>
+
+ <s:Rect id="fill_down" left="1" right="1" top="1" bottom="1" radiusX="6" includeIn="down">
+ <s:fill>
+ <s:SolidColor color="{ColorUtils.ButtonColor(BrandColorEnum.Default,stateDown)}"/>
+ </s:fill>
+ </s:Rect>
+
+ <s:Rect id="fill_disabled" left="1" right="1" top="1" bottom="1" radiusX="6" includeIn="disabled">
+ <s:fill>
+ <s:SolidColor color="{ColorUtils.ButtonColor(BrandColorEnum.Default,stateDisabled)}"/>
+ </s:fill>
+ </s:Rect>
+
+
+ <!-- layer 8: text -->
+ <!--- @copy spark.components.supportClasses.ButtonBase#labelDisplay -->
+ <s:Label id="labelDisplay" color="0xFFFFFF" color.disabled="0xE3E3E3" right="10" left="10"
+ textAlign="center" fontSize="{getFontSize(hostComponent.height)}" fontFamily="Lato"
+ maxDisplayedLines="1"
+ horizontalCenter="0" verticalCenter="1" verticalAlign="middle">
+ </s:Label>
+</s:SparkSkin>
http://git-wip-us.apache.org/repos/asf/flex-sdk/blob/e72f72e3/frameworks/projects/flatspark/src/skins/CheckBoxSkin.mxml
----------------------------------------------------------------------
diff --git a/frameworks/projects/flatspark/src/skins/CheckBoxSkin.mxml b/frameworks/projects/flatspark/src/skins/CheckBoxSkin.mxml
new file mode 100644
index 0000000..6b8f68c
--- /dev/null
+++ b/frameworks/projects/flatspark/src/skins/CheckBoxSkin.mxml
@@ -0,0 +1,136 @@
+<?xml version="1.0" encoding="utf-8"?>
+
+<!--
+
+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.
+
+-->
+
+<!--- The default skin class for the Spark CheckBox component.
+
+ @see spark.components.CheckBox
+
+ @langversion 3.0
+ @playerversion Flash 10
+ @playerversion AIR 1.5
+ @productversion Flex 4
+-->
+<s:SparkSkin xmlns:fx="http://ns.adobe.com/mxml/2009" xmlns:s="library://ns.adobe.com/flex/spark"
+ xmlns:fb="http://ns.adobe.com/flashbuilder/2009" alpha.disabledStates="0.5" useHandCursor="true">
+
+ <fx:Metadata>
+ <![CDATA[
+ /**
+ * @copy spark.skins.spark.ApplicationSkin#hostComponent
+ */
+ [HostComponent("spark.components.CheckBox")]
+ ]]>
+ </fx:Metadata>
+
+ <fx:Script fb:purpose="styling">
+ /* Define the skin elements that should not be colorized.
+ For button, the graphics are colorized but the label is not. */
+ static private const exclusions:Array = ["labelDisplay", "check"];
+
+ /**
+ * @private
+ */
+ override public function get colorizeExclusions():Array {return exclusions;}
+
+ /* Define the symbol fill items that should be colored by the "symbolColor" style. */
+ static private const symbols:Array = [];
+
+ /**
+ * @private
+ */
+ override public function get symbolItems():Array {return symbols};
+
+ /**
+ * @private
+ */
+ override protected function initializationComplete():void
+ {
+ useChromeColor = true;
+ super.initializationComplete();
+ }
+ </fx:Script>
+
+ <fx:Script>
+ <![CDATA[
+ import flatSpark.utils.AwesomeUtils;
+ import flatSpark.utils.ColorUtils;
+
+ /**
+ * @private
+ */
+ private static const focusExclusions:Array = ["labelDisplay"];
+
+ /**
+ * @private
+ */
+ override public function get focusSkinExclusions():Array { return focusExclusions;};
+ ]]>
+ </fx:Script>
+
+ <s:states>
+ <s:State name="up" />
+ <s:State name="over" stateGroups="overStates" />
+ <s:State name="down" stateGroups="downStates" />
+ <s:State name="disabled" stateGroups="disabledStates" />
+ <s:State name="upAndSelected" stateGroups="selectedStates" />
+ <s:State name="overAndSelected" stateGroups="overStates, selectedStates" />
+ <s:State name="downAndSelected" stateGroups="downStates, selectedStates" />
+ <s:State name="disabledAndSelected" stateGroups="disabledStates, selectedStates" />
+ </s:states>
+
+ <s:Group verticalCenter="0" width="22" height="22" layoutDirection="ltr">
+ <!-- fill -->
+ <s:Rect left="1" top="1" right="1" bottom="1" radiusX="6">
+ <s:fill>
+ <s:SolidColor color="{ColorUtils.Silver}"/>
+ </s:fill>
+ </s:Rect>
+
+ <s:Rect left="1" top="1" right="1" bottom="1" radiusX="6" includeIn="overStates">
+ <s:fill>
+ <s:SolidColor color="{ColorUtils.Asbestos}"/>
+ </s:fill>
+ </s:Rect>
+
+ <s:Rect left="1" top="1" right="1" bottom="1" radiusX="6" includeIn="selectedStates">
+ <s:fill>
+ <s:SolidColor color="{ColorUtils.Turquoise}"/>
+ </s:fill>
+ </s:Rect>
+
+ <!--<s:Label fontFamily="FontAwesome" fontSize="12" color="#FFFFFF" text="{AwesomeUtils.fa_check}" includeIn="overStates"
+ itemCreationPolicy="immediate" verticalAlign="middle" horizontalCenter="0" verticalCenter="0" alpha="0.75"
+ />-->
+
+ <s:Label fontFamily="FontAwesome" fontSize="12" color="#FFFFFF" text="{AwesomeUtils.fa_check}" includeIn="selectedStates"
+ itemCreationPolicy="immediate" verticalAlign="middle" horizontalCenter="0" verticalCenter="0"
+ />
+ </s:Group>
+
+ <!-- Label -->
+ <!--- @copy spark.components.supportClasses.ButtonBase#labelDisplay -->
+ <s:Label id="labelDisplay"
+ textAlign="start" color="{ColorUtils.WetAsphalt}"
+ verticalAlign="middle" fontSize="14"
+ maxDisplayedLines="1" fontFamily="Lato" paddingLeft="30"
+ left="0" right="0" top="3" bottom="3" verticalCenter="2" />
+
+</s:SparkSkin>
http://git-wip-us.apache.org/repos/asf/flex-sdk/blob/e72f72e3/frameworks/projects/flatspark/src/skins/ComboBoxButtonSkin.mxml
----------------------------------------------------------------------
diff --git a/frameworks/projects/flatspark/src/skins/ComboBoxButtonSkin.mxml b/frameworks/projects/flatspark/src/skins/ComboBoxButtonSkin.mxml
new file mode 100644
index 0000000..3d15498
--- /dev/null
+++ b/frameworks/projects/flatspark/src/skins/ComboBoxButtonSkin.mxml
@@ -0,0 +1,108 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+
+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.
+
+-->
+
+
+<!--- The default skin class for the anchor button on a Spark ComboBox component.
+
+@see spark.components.ComboBox
+@see spark.skins.spark.ComboBoxSkin
+
+@langversion 3.0
+@playerversion Flash 10
+@playerversion AIR 1.5
+@productversion Flex 4
+-->
+<s:SparkSkin xmlns:fx="http://ns.adobe.com/mxml/2009" xmlns:s="library://ns.adobe.com/flex/spark"
+ xmlns:fb="http://ns.adobe.com/flashbuilder/2009" minWidth="19" minHeight="23">
+
+ <fx:Metadata>
+ <![CDATA[
+ /**
+ * @copy spark.skins.spark.ApplicationSkin#hostComponent
+ */
+ [HostComponent("spark.components.Button")]
+ ]]>
+ </fx:Metadata>
+
+ <fx:Script fb:purpose="styling">
+ <![CDATA[
+ import flatSpark.utils.AwesomeUtils;
+ import flatSpark.utils.ColorUtils;
+
+ /* Define the skin elements that should not be colorized.
+ For dropDownList buttons, the graphics are colorized but the arrow is not. */
+ static private const exclusions:Array = [];
+
+ private var cornerRadius:Number = 4;
+
+ /**
+ * @private
+ */
+ override public function get colorizeExclusions():Array {return exclusions;}
+
+ /* Define the symbol fill items that should be colored by the "symbolColor" style. */
+ static private const symbols:Array = [];
+
+ /**
+ * @private
+ */
+ override public function get symbolItems():Array {return symbols};
+
+ /**
+ * @private
+ */
+ override protected function initializationComplete():void
+ {
+ useChromeColor = true;
+ super.initializationComplete();
+ }
+
+ /**
+ * @private
+ */
+ override protected function updateDisplayList(unscaledWidth:Number, unscaledHeight:Number) : void
+ {
+ fill.bottomRightRadiusX = fill.topRightRadiusX = cornerRadius;
+
+ super.updateDisplayList(unscaledWidth, unscaledHeight);
+ }
+ ]]>
+ </fx:Script>
+
+ <!-- states -->
+ <s:states>
+ <s:State name="up" />
+ <s:State name="over" />
+ <s:State name="down" />
+ <s:State name="disabled" />
+ </s:states>
+
+ <!-- layer 1: fill -->
+ <!--- @private -->
+ <s:Rect id="fill" left="0" right="0" top="0" bottom="0">
+ <s:fill>
+ <s:SolidColor color="{ColorUtils.Turquoise}" />
+ </s:fill>
+ </s:Rect>
+
+ <!--- The arrow graphic displayed in the anchor button. -->
+ <s:Label right="17" top="6" fontFamily="FontAwesome" fontSize="19" color="#FFFFFF" text="{AwesomeUtils.fa_caret_down}" includeIn="up, down, over, disabled"
+ itemCreationPolicy="immediate" verticalAlign="middle" verticalCenter="0" />
+</s:SparkSkin>
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/flex-sdk/blob/e72f72e3/frameworks/projects/flatspark/src/skins/ComboBoxSkin.mxml
----------------------------------------------------------------------
diff --git a/frameworks/projects/flatspark/src/skins/ComboBoxSkin.mxml b/frameworks/projects/flatspark/src/skins/ComboBoxSkin.mxml
new file mode 100644
index 0000000..f98f46e
--- /dev/null
+++ b/frameworks/projects/flatspark/src/skins/ComboBoxSkin.mxml
@@ -0,0 +1,127 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+
+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.
+
+-->
+<!--- The default skin class for the Spark ComboBox component.
+The skin for the anchor button for a ComboBox component
+is defined by the ComboBoxButtonSkin class. The skin for the text input
+is defined by the ComboBoxTextInputSkin class.
+
+@see spark.components.ComboBox
+@see spark.skins.spark.ComboBoxButtonSkin
+
+@langversion 3.0
+@playerversion Flash 10
+@playerversion AIR 1.5
+@productversion Flex 4
+-->
+<s:SparkSkin xmlns:fx="http://ns.adobe.com/mxml/2009" xmlns:s="library://ns.adobe.com/flex/spark" height="41"
+ xmlns:fb="http://ns.adobe.com/flashbuilder/2009" alpha.disabled=".5" initialize="initializeHandler(event)">
+
+ <!-- host component -->
+ <fx:Metadata>
+ <![CDATA[
+ /**
+ * @copy spark.skins.spark.ApplicationSkin#hostComponent
+ */
+ [HostComponent("spark.components.ComboBox")]
+ ]]>
+ </fx:Metadata>
+
+ <fx:Script fb:purpose="styling">
+ <![CDATA[
+ import mx.events.FlexEvent;
+
+ import flatSpark.utils.ColorUtils;
+ private var paddingChanged:Boolean;
+ private var cornerRadiusChanged:Boolean;
+ private var cornerRadius:Number = 4;
+
+ /* Define the content fill items that should be colored by the "contentBackgroundColor" style. */
+ static private const contentFill:Array = [];
+
+ override public function get contentItems():Array {return contentFill; }
+
+ protected function initializeHandler(event:FlexEvent):void
+ {
+ // TODO Auto-generated method stub
+ hostComponent.useHandCursor=true;
+ hostComponent.buttonMode=true;
+ }
+
+ ]]>
+ </fx:Script>
+
+ <s:states>
+ <s:State name="normal" />
+ <s:State name="open" />
+ <s:State name="disabled" />
+ </s:states>
+
+ <!---
+ The PopUpAnchor control that opens the drop-down list.
+
+ <p>In a custom skin class that uses transitions, set the
+ <code>itemDestructionPolicy</code> property to <code>never</code>.</p>
+ -->
+ <s:PopUpAnchor id="popUp" displayPopUp.normal="false" displayPopUp.open="true" includeIn="open"
+ left="0" right="0" top="{hostComponent.height+4}" bottom="0" itemDestructionPolicy="auto"
+ popUpPosition="below" popUpWidthMatchesAnchorWidth="true">
+
+ <!---
+ This includes borders, background colors, scrollers, and filters.
+ @copy spark.components.supportClasses.DropDownListBase#dropDown
+ -->
+ <s:Group id="dropDown">
+
+ <s:Path top="2" right="20" data="M 0 10 L 10 0 L 20 10 Z">
+ <s:fill>
+ <s:SolidColor color="{ColorUtils.WetAsphalt}" alpha="1"/>
+ </s:fill>
+ </s:Path>
+
+ <!-- fill -->
+ <!--- Defines the appearance of drop-down list's background fill. -->
+ <s:Rect id="background" left="0" right="0" top="10" bottom="0" radiusX="4" >
+ <s:fill>
+ <s:SolidColor id="bgFill" color="{ColorUtils.WetAsphalt}" />
+ </s:fill>
+ </s:Rect>
+ <!--- @private -->
+ <s:Scroller id="scroller" left="4" top="14" right="4" bottom="4" hasFocusableChildren="false" minViewportInset="1" skinClass="flatSpark.skins.ScrollerSkin">
+ <!--- @copy spark.components.SkinnableDataContainer#dataGroup-->
+ <s:DataGroup id="dataGroup" itemRenderer="flatSpark.itemRenderers.DefaultItemRenderer">
+ <s:layout>
+ <s:VerticalLayout gap="0" horizontalAlign="contentJustify" requestedMinRowCount="1" requestedMaxRowCount="6"/>
+ </s:layout>
+ </s:DataGroup>
+ </s:Scroller>
+ </s:Group>
+ </s:PopUpAnchor>
+
+ <!--- The default skin is ComboBoxButtonSkin.
+ @copy spark.components.supportClasses.DropDownListBase#openButton
+ @see spark.skins.spark.ComboBoxButtonSkin -->
+ <s:Button id="openButton" width="29" right="0" top="0" bottom="0" focusEnabled="false"
+ skinClass="flatSpark.skins.ComboBoxButtonSkin" tabEnabled="false" />
+ <!--- @copy spark.components.ComboBox#textInput -->
+ <s:TextInput id="textInput" enabled.disabled="false"
+ left="0" right="29" top="0" bottom="0"
+ skinClass="flatSpark.skins.ComboBoxTextInputSkin"/>
+
+</s:SparkSkin>
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/flex-sdk/blob/e72f72e3/frameworks/projects/flatspark/src/skins/ComboBoxTextInputSkin.mxml
----------------------------------------------------------------------
diff --git a/frameworks/projects/flatspark/src/skins/ComboBoxTextInputSkin.mxml b/frameworks/projects/flatspark/src/skins/ComboBoxTextInputSkin.mxml
new file mode 100644
index 0000000..d4b1ce9
--- /dev/null
+++ b/frameworks/projects/flatspark/src/skins/ComboBoxTextInputSkin.mxml
@@ -0,0 +1,218 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+
+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.
+
+-->
+<!--- The default skin class for the textInput of a Spark ComboBox component.
+
+@see spark.components.ComboBox
+
+@langversion 3.0
+@playerversion Flash 10
+@playerversion AIR 1.5
+@productversion Flex 4
+-->
+<s:SparkSkin xmlns:fx="http://ns.adobe.com/mxml/2009" xmlns:s="library://ns.adobe.com/flex/spark"
+ xmlns:fb="http://ns.adobe.com/flashbuilder/2009"
+ blendMode="normal">
+
+ <fx:Metadata>
+ <![CDATA[
+ /**
+ * @copy spark.skins.spark.ApplicationSkin#hostComponent
+ */
+ [HostComponent("spark.components.TextInput")]
+ ]]>
+ </fx:Metadata>
+
+ <fx:Script fb:purpose="styling">
+ <![CDATA[
+ import flatSpark.utils.ColorUtils;
+
+ private var paddingChanged:Boolean;
+ private var cornerRadius:Number = 4;
+
+ /* Define the skin elements that should not be colorized. */
+ static private const exclusions:Array = ["background", "textDisplay", "promptDisplay"];
+
+ /**
+ * @private
+ */
+ override public function get colorizeExclusions():Array {return exclusions;}
+
+ /* Define the content fill items that should be colored by the "contentBackgroundColor" style. */
+ static private const contentFill:Array = [];
+
+ /**
+ * @private
+ */
+ override public function get contentItems():Array {return contentFill; }
+
+ /**
+ * @private
+ */
+ override protected function commitProperties():void
+ {
+ super.commitProperties();
+
+ if (paddingChanged)
+ {
+ updatePadding();
+ paddingChanged = false;
+ }
+ }
+
+ /**
+ * @private
+ */
+ override protected function initializationComplete():void
+ {
+ useChromeColor = true;
+ super.initializationComplete();
+ }
+
+ /**
+ * @private
+ */
+ override protected function updateDisplayList(unscaledWidth:Number, unscaledHeight:Number) : void
+ {
+ if (promptDisplay)
+ {
+ promptDisplay.setLayoutBoundsSize(unscaledWidth, unscaledHeight);
+ promptDisplay.setLayoutBoundsPosition(8, 0);
+ }
+
+ background.bottomLeftRadiusX = background.topLeftRadiusX = cornerRadius;
+
+ super.updateDisplayList(unscaledWidth, unscaledHeight);
+ }
+
+ /**
+ * @private
+ */
+ private function updatePadding():void
+ {
+ if (!textDisplay)
+ return;
+
+ // Push padding styles into the textDisplay
+ var padding:Number;
+
+ padding = getStyle("paddingLeft");
+ if (textDisplay.getStyle("paddingLeft") != padding)
+ textDisplay.setStyle("paddingLeft", padding);
+
+ padding = getStyle("paddingTop");
+ if (textDisplay.getStyle("paddingTop") != padding)
+ textDisplay.setStyle("paddingTop", padding);
+
+ padding = getStyle("paddingRight");
+ if (textDisplay.getStyle("paddingRight") != padding)
+ textDisplay.setStyle("paddingRight", padding);
+
+ padding = getStyle("paddingBottom");
+ if (textDisplay.getStyle("paddingBottom") != padding)
+ textDisplay.setStyle("paddingBottom", padding);
+
+ if (!promptDisplay)
+ return;
+
+ padding = getStyle("paddingLeft");
+ if (promptDisplay.getStyle("paddingLeft") != padding)
+ promptDisplay.setStyle("paddingLeft", padding);
+
+ padding = getStyle("paddingTop");
+ if (promptDisplay.getStyle("paddingTop") != padding)
+ promptDisplay.setStyle("paddingTop", padding);
+
+ padding = getStyle("paddingRight");
+ if (promptDisplay.getStyle("paddingRight") != padding)
+ promptDisplay.setStyle("paddingRight", padding);
+
+ padding = getStyle("paddingBottom");
+ if (promptDisplay.getStyle("paddingBottom") != padding)
+ promptDisplay.setStyle("paddingBottom", padding);
+ }
+
+ /**
+ * @private
+ */
+ override public function styleChanged(styleProp:String):void
+ {
+ var allStyles:Boolean = !styleProp || styleProp == "styleName";
+
+ super.styleChanged(styleProp);
+
+ if (allStyles || styleProp.indexOf("padding") == 0)
+ {
+ paddingChanged = true;
+ invalidateProperties();
+ }
+ }
+ ]]>
+ </fx:Script>
+
+ <fx:Script>
+ <![CDATA[
+ /**
+ * @private
+ */
+ private static const focusExclusions:Array = ["textDisplay"];
+
+ /**
+ * @private
+ */
+ override public function get focusSkinExclusions():Array { return focusExclusions;};
+ ]]>
+ </fx:Script>
+
+ <s:states>
+ <s:State name="normal"/>
+ <s:State name="disabled" stateGroups="disabledStates"/>
+ <s:State name="normalWithPrompt"/>
+ <s:State name="disabledWithPrompt" stateGroups="disabledStates"/>
+ </s:states>
+
+ <!-- fill -->
+ <!--- Defines the appearance of the TextInput component's background. -->
+ <s:Rect id="background" left="0" right="0" top="0" bottom="0">
+ <s:fill>
+ <s:SolidColor id="bgFill" color="{ColorUtils.Turquoise}" />
+ </s:fill>
+ </s:Rect>
+
+ <!-- text -->
+ <!--- @copy spark.components.supportClasses.SkinnableTextBase#textDisplay -->
+ <!-- <s:RichEditableText id="textDisplay"
+ lineBreak="explicit"
+ widthInChars="10" verticalCenter="0"/>-->
+ <s:RichEditableText id="textDisplay" verticalAlign="middle" lineBreak="explicit" backgroundColor="{ColorUtils.Turquoise}"
+ widthInChars="10" fontFamily="Lato" fontWeight="normal" color="0xFFFFFF"
+ left="8" right="8" top="8" bottom="8" fontSize="15" verticalCenter="0"/>
+ <!--- Defines the Label that is used for prompt text. The includeInLayout property is false so the prompt text does not affect measurement. -->
+ <!-- <s:Label id="promptDisplay" maxDisplayedLines="1"
+ verticalAlign="middle"
+ mouseEnabled="false" mouseChildren="false"
+ includeIn="normalWithPrompt,disabledWithPrompt"
+ includeInLayout="false"/>-->
+ <s:Label id="promptDisplay" maxDisplayedLines="1"
+ verticalAlign="middle" fontFamily="Lato" fontSize="15" fontWeight="normal" fontStyle="italic" color="{ColorUtils.Clouds}"
+ mouseEnabled="false" mouseChildren="false" left="8" right="8" top="8" bottom="8" verticalCenter="0"
+ includeIn="normalWithPrompt,disabledWithPrompt"
+ includeInLayout="false"/>
+
+</s:SparkSkin>
http://git-wip-us.apache.org/repos/asf/flex-sdk/blob/e72f72e3/frameworks/projects/flatspark/src/skins/DropDownListButtonSkin.mxml
----------------------------------------------------------------------
diff --git a/frameworks/projects/flatspark/src/skins/DropDownListButtonSkin.mxml b/frameworks/projects/flatspark/src/skins/DropDownListButtonSkin.mxml
new file mode 100644
index 0000000..3215dfb
--- /dev/null
+++ b/frameworks/projects/flatspark/src/skins/DropDownListButtonSkin.mxml
@@ -0,0 +1,109 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+
+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.
+
+-->
+
+
+<!--- The default skin class for the anchor button on a Spark DropDownList component.
+
+@see spark.components.DropDownList
+@see spark.skins.spark.DropDownListSkin
+
+@langversion 3.0
+@playerversion Flash 10
+@playerversion AIR 1.5
+@productversion Flex 4
+-->
+<s:SparkSkin xmlns:fx="http://ns.adobe.com/mxml/2009" xmlns:s="library://ns.adobe.com/flex/spark"
+ xmlns:fb="http://ns.adobe.com/flashbuilder/2009" minWidth="19" minHeight="23">
+
+ <fx:Metadata>
+ <![CDATA[
+ /**
+ * @copy spark.skins.spark.ApplicationSkin#hostComponent
+ */
+ [HostComponent("spark.components.Button")]
+ ]]>
+ </fx:Metadata>
+
+ <fx:Script fb:purpose="styling">
+ <![CDATA[
+ import flatSpark.utils.AwesomeUtils;
+ import flatSpark.utils.ColorUtils;
+
+ /* Define the skin elements that should not be colorized.
+ For dropDownList buttons, the graphics are colorized but the arrow is not. */
+ static private const exclusions:Array = [];
+
+ /**
+ * @private
+ */
+ override public function get colorizeExclusions():Array {return exclusions;}
+
+ /* Define the symbol fill items that should be colored by the "symbolColor" style. */
+ static private const symbols:Array = [];
+
+ /**
+ * @private
+ */
+ override public function get symbolItems():Array {return symbols};
+
+ /**
+ * @private
+ */
+ override protected function initializationComplete():void
+ {
+ useChromeColor = true;
+ super.initializationComplete();
+ }
+
+ /**
+ * @private
+ */
+ override protected function updateDisplayList(unscaledWidth:Number, unscaledHeight:Number) : void
+ {
+ fill.radiusX = cornerRadius;
+
+ super.updateDisplayList(unscaledWidth, unscaledHeight);
+ }
+
+ private var cornerRadius:Number = 4;
+
+ ]]>
+ </fx:Script>
+
+ <!-- states -->
+ <s:states>
+ <s:State name="up" />
+ <s:State name="over" />
+ <s:State name="down" />
+ <s:State name="disabled" />
+ </s:states>
+
+ <!-- layer 1: fill -->
+ <!--- @private -->
+ <s:Rect id="fill" left="0" right="0" top="0" bottom="0">
+ <s:fill>
+ <s:SolidColor color="{ColorUtils.Turquoise}" />
+ </s:fill>
+ </s:Rect>
+
+ <!--- The arrow graphic displayed in the anchor button. -->
+ <s:Label right="17" top="6" fontFamily="FontAwesome" fontSize="19" color="#FFFFFF" text="{AwesomeUtils.fa_caret_down}" includeIn="up, down, over, disabled"
+ itemCreationPolicy="immediate" verticalAlign="middle" verticalCenter="0" />
+</s:SparkSkin>
http://git-wip-us.apache.org/repos/asf/flex-sdk/blob/e72f72e3/frameworks/projects/flatspark/src/skins/DropDownListSkin.mxml
----------------------------------------------------------------------
diff --git a/frameworks/projects/flatspark/src/skins/DropDownListSkin.mxml b/frameworks/projects/flatspark/src/skins/DropDownListSkin.mxml
new file mode 100644
index 0000000..ced72c7
--- /dev/null
+++ b/frameworks/projects/flatspark/src/skins/DropDownListSkin.mxml
@@ -0,0 +1,143 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+
+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.
+
+-->
+<!--- The default skin class for the Spark DropDownList component.
+The skin for the anchor button for a DropDownList component
+is defined by the DropDownListButtonSkin class.
+
+<p>In a custom skin class that uses transitions, set the
+<code>itemDestructionPolicy</code> property to <code>never</code>
+for the PopUpAnchor defined by the popUp property.</p>
+
+@see spark.components.DropDownList
+@see spark.skins.spark.DropDownListButtonSkin
+
+@langversion 3.0
+@playerversion Flash 10
+@playerversion AIR 1.5
+@productversion Flex 4
+-->
+<s:SparkSkin xmlns:fx="http://ns.adobe.com/mxml/2009" xmlns:s="library://ns.adobe.com/flex/spark" height="41"
+ xmlns:fb="http://ns.adobe.com/flashbuilder/2009" alpha.disabled=".5" initialize="initializeHandler(event)">
+
+ <!-- host component -->
+ <fx:Metadata>
+ <![CDATA[
+ /**
+ * @copy spark.skins.spark.ApplicationSkin#hostComponent
+ */
+ [HostComponent("spark.components.DropDownList")]
+ ]]>
+ </fx:Metadata>
+
+ <fx:Script fb:purpose="styling">
+ <![CDATA[
+ import mx.events.FlexEvent;
+
+ import flatSpark.itemRenderers.DefaultItemRenderer;
+ import flatSpark.utils.ColorUtils;
+
+ /* Define the content fill items that should be colored by the "contentBackgroundColor" style. */
+ static private const contentFill:Array = [];
+
+ /**
+ * @private
+ */
+ override public function get contentItems():Array { return contentFill; }
+
+ override protected function updateDisplayList(unscaledWidth:Number, unscaledHeight:Number) : void
+ {
+ //background.bottomRightRadiusX = background.topRightRadiusX = cornerRadius;
+
+
+ super.updateDisplayList(unscaledWidth, unscaledHeight);
+ }
+
+ private var cornerRadius:Number = 4;
+
+ protected function initializeHandler(event:FlexEvent):void
+ {
+ // TODO Auto-generated method stub
+ hostComponent.useHandCursor=true;
+ hostComponent.buttonMode=true;
+ }
+
+ ]]>
+ </fx:Script>
+
+ <s:states>
+ <s:State name="normal" />
+ <s:State name="open" />
+ <s:State name="disabled" />
+ </s:states>
+
+ <!---
+ The PopUpAnchor control that opens the drop-down list.
+
+ <p>In a custom skin class that uses transitions, set the
+ <code>itemDestructionPolicy</code> property to <code>never</code>.</p>
+ -->
+ <s:PopUpAnchor id="popUp" displayPopUp.normal="false" displayPopUp.open="true" includeIn="open"
+ left="0" right="0" top="{hostComponent.height+4}" bottom="0" itemDestructionPolicy="auto"
+ popUpPosition="below" popUpWidthMatchesAnchorWidth="true">
+
+ <!---
+ This includes borders, background colors, scrollers, and filters.
+ @copy spark.components.supportClasses.DropDownListBase#dropDown
+ -->
+ <s:Group id="dropDown">
+
+ <s:Path top="2" right="20" data="M 0 10 L 10 0 L 20 10 Z">
+ <s:fill>
+ <s:SolidColor color="{ColorUtils.WetAsphalt}" alpha="1"/>
+ </s:fill>
+ </s:Path>
+
+ <!-- fill -->
+ <!--- Defines the appearance of drop-down list's background fill. -->
+ <s:Rect id="background" left="0" right="0" top="10" bottom="0" radiusX="4" >
+ <s:fill>
+ <s:SolidColor id="bgFill" color="{ColorUtils.WetAsphalt}" />
+ </s:fill>
+ </s:Rect>
+
+ <!--- @private -->
+ <s:Scroller id="scroller" left="4" top="14" right="4" bottom="4" hasFocusableChildren="false" minViewportInset="1" skinClass="flatSpark.skins.ScrollerSkin">
+ <!--- @copy spark.components.SkinnableDataContainer#dataGroup-->
+ <s:DataGroup id="dataGroup" itemRenderer="flatSpark.itemRenderers.DefaultItemRenderer">
+ <s:layout>
+ <s:VerticalLayout gap="0" horizontalAlign="contentJustify" requestedMinRowCount="1" requestedMaxRowCount="6"/>
+ </s:layout>
+ </s:DataGroup>
+ </s:Scroller>
+ </s:Group>
+ </s:PopUpAnchor>
+
+ <!--- The default skin is DropDownListButtonSkin.
+ @copy spark.components.supportClasses.DropDownListBase#openButton
+ @see spark.skins.spark.DropDownListButtonSkin -->
+ <s:Button id="openButton" width="29" left="0" right="0" top="0" bottom="0" focusEnabled="false" tabEnabled="false"
+ skinClass="flatSpark.skins.DropDownListButtonSkin" />
+
+ <!--- @copy spark.components.DropDownList#labelDisplay -->
+
+ <s:Label id="labelDisplay" verticalAlign="middle" maxDisplayedLines="1" backgroundColor="{ColorUtils.Turquoise}"
+ mouseEnabled="false" mouseChildren="false" fontFamily="Lato" fontWeight="normal" color="0xFFFFFF"
+ left="10" right="37" top="8" bottom="8" fontSize="15" verticalCenter="0"></s:Label>
+</s:SparkSkin>
http://git-wip-us.apache.org/repos/asf/flex-sdk/blob/e72f72e3/frameworks/projects/flatspark/src/skins/HScrollBarSkin.mxml
----------------------------------------------------------------------
diff --git a/frameworks/projects/flatspark/src/skins/HScrollBarSkin.mxml b/frameworks/projects/flatspark/src/skins/HScrollBarSkin.mxml
new file mode 100644
index 0000000..82099b7
--- /dev/null
+++ b/frameworks/projects/flatspark/src/skins/HScrollBarSkin.mxml
@@ -0,0 +1,87 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+
+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.
+
+-->
+
+
+<!--- The default skin class for the Spark HScrollBar component. The thumb and track skins are defined by the
+HScrollBarThumbSkin and HScrollBarTrackSkin classes, respectively.
+
+ @see spark.components.HScrollBar
+ @see spark.skins.spark.HScrollBarThumbSkin
+ @see spark.skins.spark.HScrollBarTrackSkin
+
+ @langversion 3.0
+ @playerversion Flash 10
+ @playerversion AIR 1.5
+ @productversion Flex 4
+-->
+<s:SparkSkin xmlns:fx="http://ns.adobe.com/mxml/2009" xmlns:s="library://ns.adobe.com/flex/spark"
+ xmlns:fb="http://ns.adobe.com/flashbuilder/2009" minWidth="35" minHeight="15"
+ alpha.disabled="0.5" alpha.inactive="0.5">
+
+ <fx:Metadata>
+ <![CDATA[
+ /**
+ * @copy spark.skins.spark.ApplicationSkin#hostComponent
+ */
+ [HostComponent("spark.components.HScrollBar")]
+ ]]>
+ </fx:Metadata>
+
+ <fx:Script fb:purpose="styling">
+ /* Define the skin elements that should not be colorized.
+ For scroll bar, the skin itself is colorized but the individual parts are not. */
+ static private const exclusions:Array = ["track", "thumb"];
+
+ /**
+ * @private
+ */
+ override public function get colorizeExclusions():Array {return exclusions;}
+
+ /**
+ * @private
+ */
+ override protected function initializationComplete():void
+ {
+ useChromeColor = true;
+ super.initializationComplete();
+ }
+ </fx:Script>
+
+ <s:states>
+ <s:State name="normal" />
+ <s:State name="disabled" />
+ <s:State name="inactive" />
+ </s:states>
+
+ <!--- The default skin class is HScrollBarTrackSkin.
+ @copy spark.components.supportClasses.TrackBase#track
+ @see spark.skins.spark.HScrollBarTrackSkin -->
+ <s:Button id="track" left="0" right="0" width="54"
+ focusEnabled="false" tabEnabled="false"
+ skinClass="flatSpark.skins.HScrollBarTrackSkin" />
+
+ <!--- The default skin class is HScrollBarThumbSkin.
+ @copy spark.components.supportClasses.TrackBase#thumb
+ @see spark.skins.spark.HScrollBarThumbSkin -->
+ <s:Button id="thumb"
+ focusEnabled="false" visible.inactive="false" tabEnabled="false"
+ skinClass="flatSpark.skins.HScrollBarThumbSkin" />
+
+</s:SparkSkin>
http://git-wip-us.apache.org/repos/asf/flex-sdk/blob/e72f72e3/frameworks/projects/flatspark/src/skins/HScrollBarThumbSkin.mxml
----------------------------------------------------------------------
diff --git a/frameworks/projects/flatspark/src/skins/HScrollBarThumbSkin.mxml b/frameworks/projects/flatspark/src/skins/HScrollBarThumbSkin.mxml
new file mode 100644
index 0000000..df5adf4
--- /dev/null
+++ b/frameworks/projects/flatspark/src/skins/HScrollBarThumbSkin.mxml
@@ -0,0 +1,74 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+
+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.
+
+-->
+
+
+<!--- The default skin class for the thumb of a Spark HScrollBar component.
+
+@see spark.components.HScrollBar
+
+@langversion 3.0
+@playerversion Flash 10
+@playerversion AIR 1.5
+@productversion Flex 4
+-->
+<s:SparkSkin xmlns:fx="http://ns.adobe.com/mxml/2009" xmlns:s="library://ns.adobe.com/flex/spark"
+ xmlns:fb="http://ns.adobe.com/flashbuilder/2009">
+
+ <fx:Metadata>
+ <![CDATA[
+ /**
+ * @copy spark.skins.spark.ApplicationSkin#hostComponent
+ */
+ [HostComponent("spark.components.Button")]
+ ]]>
+ </fx:Metadata>
+
+ <fx:Script fb:purpose="styling">
+ <![CDATA[
+ import flatSpark.utils.ColorUtils;
+
+ /**
+ * @private
+ */
+ override protected function initializationComplete():void
+ {
+ useChromeColor = true;
+ super.initializationComplete();
+ }
+ ]]>
+ </fx:Script>
+
+ <s:states>
+ <s:State name="up" />
+ <s:State name="over" />
+ <s:State name="down" />
+ <s:State name="disabled" />
+ </s:states>
+
+ <!-- background -->
+ <s:Rect left="0" top="0" right="0" bottom="0" minWidth="8" minHeight="8" radiusX="2" alpha="0.5">
+ <s:stroke>
+ <s:SolidColorStroke color="{ColorUtils.MidnightBlue}" weight="1"/>
+ </s:stroke>
+ <s:fill>
+ <s:SolidColor color="{ColorUtils.Silver}" />
+ </s:fill>
+ </s:Rect>
+</s:SparkSkin>
http://git-wip-us.apache.org/repos/asf/flex-sdk/blob/e72f72e3/frameworks/projects/flatspark/src/skins/HScrollBarTrackSkin.mxml
----------------------------------------------------------------------
diff --git a/frameworks/projects/flatspark/src/skins/HScrollBarTrackSkin.mxml b/frameworks/projects/flatspark/src/skins/HScrollBarTrackSkin.mxml
new file mode 100644
index 0000000..a9b8340
--- /dev/null
+++ b/frameworks/projects/flatspark/src/skins/HScrollBarTrackSkin.mxml
@@ -0,0 +1,71 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+
+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.
+
+-->
+
+
+<!--- The default skin class for the track on a Spark HScrollBar component.
+
+@see spark.components.HScrollBar
+
+@langversion 3.0
+@playerversion Flash 10
+@playerversion AIR 1.5
+@productversion Flex 4
+-->
+<s:SparkSkin xmlns:fx="http://ns.adobe.com/mxml/2009" xmlns:s="library://ns.adobe.com/flex/spark"
+ xmlns:fb="http://ns.adobe.com/flashbuilder/2009">
+
+ <fx:Metadata>
+ <![CDATA[
+ /**
+ * @copy spark.skins.spark.ApplicationSkin#hostComponent
+ */
+ [HostComponent("spark.components.Button")]
+ ]]>
+ </fx:Metadata>
+
+ <fx:Script fb:purpose="styling">
+ <![CDATA[
+ import flatSpark.utils.ColorUtils;
+
+ /**
+ * @private
+ */
+ override protected function initializationComplete():void
+ {
+ useChromeColor = true;
+ super.initializationComplete();
+ }
+ ]]>
+ </fx:Script>
+
+ <s:states>
+ <s:State name="up" />
+ <s:State name="down" />
+ <s:State name="over" />
+ <s:State name="disabled" />
+ </s:states>
+
+ <!-- border/fill -->
+ <s:Rect top="0" bottom="0" left="0" right="0" minWidth="8" minHeight="8" radiusX="2">
+ <s:fill>
+ <s:SolidColor color="{ColorUtils.MidnightBlue}" />
+ </s:fill>
+ </s:Rect>
+</s:SparkSkin>