From 2bdd9f3a5e4fa2d5acaee658a765faa1446bdc63 Mon Sep 17 00:00:00 2001 From: Paulo Veiga Date: Sun, 27 Nov 2011 22:00:46 -0300 Subject: [PATCH] Add new icons for weather. It could be useful. --- mindplot/src/main/javascript/ImageIcon.js | 26 +----------------- .../src/main/javascript/widget/IconPanel.js | 2 +- .../com/wisemapping/model/IconFamily.java | 3 +- .../com/wisemapping/model/MindmapIcons.java | 13 ++++++++- ...lear-night.png => weather_clear-night.png} | Bin .../{weather-clear.png => weather_clear.png} | Bin ...night.png => weather_few-clouds-night.png} | Bin ...-few-clouds.png => weather_few-clouds.png} | Bin ...ther-overcast.png => weather_overcast.png} | Bin ...ere-alert.png => weather_severe-alert.png} | Bin ...ered.png => weather_showers-scattered.png} | Bin ...eather-showers.png => weather_showers.png} | Bin .../{weather-snow.png => weather_snow.png} | Bin .../{weather-storm.png => weather_storm.png} | Bin .../com/wisemapping/test/model/IconsTest.java | 2 +- 15 files changed, 17 insertions(+), 29 deletions(-) rename wise-webapp/src/main/webapp/icons/{weather-clear-night.png => weather_clear-night.png} (100%) rename wise-webapp/src/main/webapp/icons/{weather-clear.png => weather_clear.png} (100%) rename wise-webapp/src/main/webapp/icons/{weather-few-clouds-night.png => weather_few-clouds-night.png} (100%) rename wise-webapp/src/main/webapp/icons/{weather-few-clouds.png => weather_few-clouds.png} (100%) rename wise-webapp/src/main/webapp/icons/{weather-overcast.png => weather_overcast.png} (100%) rename wise-webapp/src/main/webapp/icons/{weather-severe-alert.png => weather_severe-alert.png} (100%) rename wise-webapp/src/main/webapp/icons/{weather-showers-scattered.png => weather_showers-scattered.png} (100%) rename wise-webapp/src/main/webapp/icons/{weather-showers.png => weather_showers.png} (100%) rename wise-webapp/src/main/webapp/icons/{weather-snow.png => weather_snow.png} (100%) rename wise-webapp/src/main/webapp/icons/{weather-storm.png => weather_storm.png} (100%) diff --git a/mindplot/src/main/javascript/ImageIcon.js b/mindplot/src/main/javascript/ImageIcon.js index b856cf77..61ab5d15 100644 --- a/mindplot/src/main/javascript/ImageIcon.js +++ b/mindplot/src/main/javascript/ImageIcon.js @@ -113,30 +113,6 @@ mindplot.ImageIcon = new Class({ }); -mindplot.ImageIcon.prototype.ICON_FAMILIES = [ - {"id": "face", "icons" : ["face_plain","face_sad","face_crying","face_smile","face_surprise","face_wink"]}, - {"id": "funy", "icons" : ["funy_angel","funy_devilish","funy_glasses","funy_grin","funy_kiss","funy_monkey"]}, - {"id": "conn", "icons" : ["conn_connect","conn_disconnect"]}, - {"id": "sport", "icons" : ["sport_basketball","sport_football","sport_golf","sport_raquet","sport_shuttlecock","sport_soccer","sport_tennis"]}, - {"id": "bulb", "icons" : ["bulb_light_on","bulb_light_off"]}, - {"id": "thumb", "icons" : ["thumb_thumb_up","thumb_thumb_down"]}, - {"id": "tick", "icons" : ["tick_tick","tick_cross"]}, - {"id": "onoff", "icons" : ["onoff_clock","onoff_clock_red","onoff_add","onoff_delete","onoff_status_offline","onoff_status_online"]}, - {"id": "money", "icons" : ["money_money","money_dollar","money_euro","money_pound","money_yen","money_coins","money_ruby"]}, - {"id": "time", "icons" : ["time_calendar","time_clock","time_hourglass"]}, - {"id": "chart", "icons" : ["chart_bar","chart_line","chart_curve","chart_pie","chart_organisation"]}, - {"id": "sign", "icons" : ["sign_warning","sign_info","sign_stop","sign_help","sign_cancel"]}, - {"id": "hard", "icons" : ["hard_cd","hard_computer","hard_controller","hard_driver_disk","hard_ipod","hard_keyboard","hard_mouse","hard_printer"]}, - {"id": "soft", "icons" : ["soft_bug","soft_cursor","soft_database_table","soft_database","soft_feed","soft_folder_explore","soft_rss","soft_penguin"]}, - {"id": "arrow", "icons" : ["arrow_up","arrow_down","arrow_left","arrow_right"]}, - {"id": "arrowc", "icons" : ["arrowc_rotate_anticlockwise","arrowc_rotate_clockwise","arrowc_turn_left","arrowc_turn_right"]}, - {"id": "people", "icons" : ["people_group","people_male1","people_male2","people_female1","people_female2"]}, - {"id": "mail", "icons" : ["mail_envelop","mail_mailbox","mail_edit","mail_list"]}, - {"id": "flag", "icons" : ["flag_blue","flag_green","flag_orange","flag_pink","flag_purple","flag_yellow"]}, - {"id": "bullet", "icons" : ["bullet_black","bullet_blue","bullet_green","bullet_orange","bullet_red","bullet_pink","bullet_purple"]}, - {"id": "tag", "icons" : ["tag_blue","tag_green","tag_orange","tag_red","tag_pink","tag_yellow"]}, - {"id": "object", "icons" : ["object_bell","object_clanbomber","object_key","object_pencil","object_phone","object_magnifier","object_clip","object_music","object_star","object_wizard","object_house","object_cake","object_camera","object_palette","object_rainbow"]} -]; - +mindplot.ImageIcon.prototype.ICON_FAMILIES = [{"id": "face", "icons" : ["face_plain","face_sad","face_crying","face_smile","face_surprise","face_wink"]},{"id": "funy", "icons" : ["funy_angel","funy_devilish","funy_glasses","funy_grin","funy_kiss","funy_monkey"]},{"id": "conn", "icons" : ["conn_connect","conn_disconnect"]},{"id": "sport", "icons" : ["sport_basketball","sport_football","sport_golf","sport_raquet","sport_shuttlecock","sport_soccer","sport_tennis"]},{"id": "bulb", "icons" : ["bulb_light_on","bulb_light_off"]},{"id": "thumb", "icons" : ["thumb_thumb_up","thumb_thumb_down"]},{"id": "tick", "icons" : ["tick_tick","tick_cross"]},{"id": "onoff", "icons" : ["onoff_clock","onoff_clock_red","onoff_add","onoff_delete","onoff_status_offline","onoff_status_online"]},{"id": "money", "icons" : ["money_money","money_dollar","money_euro","money_pound","money_yen","money_coins","money_ruby"]},{"id": "time", "icons" : ["time_calendar","time_clock","time_hourglass"]},{"id": "chart", "icons" : ["chart_bar","chart_line","chart_curve","chart_pie","chart_organisation"]},{"id": "sign", "icons" : ["sign_warning","sign_info","sign_stop","sign_help","sign_cancel"]},{"id": "hard", "icons" : ["hard_cd","hard_computer","hard_controller","hard_driver_disk","hard_ipod","hard_keyboard","hard_mouse","hard_printer"]},{"id": "soft", "icons" : ["soft_bug","soft_cursor","soft_database_table","soft_database","soft_feed","soft_folder_explore","soft_rss","soft_penguin"]},{"id": "arrow", "icons" : ["arrow_up","arrow_down","arrow_left","arrow_right"]},{"id": "arrowc", "icons" : ["arrowc_rotate_anticlockwise","arrowc_rotate_clockwise","arrowc_turn_left","arrowc_turn_right"]},{"id": "people", "icons" : ["people_group","people_male1","people_male2","people_female1","people_female2"]},{"id": "mail", "icons" : ["mail_envelop","mail_mailbox","mail_edit","mail_list"]},{"id": "flag", "icons" : ["flag_blue","flag_green","flag_orange","flag_pink","flag_purple","flag_yellow"]},{"id": "bullet", "icons" : ["bullet_black","bullet_blue","bullet_green","bullet_orange","bullet_red","bullet_pink","bullet_purple"]},{"id": "tag", "icons" : ["tag_blue","tag_green","tag_orange","tag_red","tag_pink","tag_yellow"]},{"id": "object", "icons" : ["object_bell","object_clanbomber","object_key","object_pencil","object_phone","object_magnifier","object_clip","object_music","object_star","object_wizard","object_house","object_cake","object_camera","object_palette","object_rainbow"]},{"id": "weather", "icons" : ["weather_clear-night","weather_clear","weather_few-clouds-night","weather_few-clouds","weather_overcast","weather_severe-alert","weather_showers-scattered","weather_showers","weather_snow","weather_storm"]}]; diff --git a/mindplot/src/main/javascript/widget/IconPanel.js b/mindplot/src/main/javascript/widget/IconPanel.js index 128f72c7..4b4bc5dd 100644 --- a/mindplot/src/main/javascript/widget/IconPanel.js +++ b/mindplot/src/main/javascript/widget/IconPanel.js @@ -29,7 +29,7 @@ mindplot.widget.IconPanel = new Class({ buildPanel: function() { var content = new Element('div', {'class':'toolbarPanel','id':'IconsPanel'}); - content.setStyles({width:253,height:200,padding:5}); + content.setStyles({width:253,height:210,padding:5}); content.addEvent("click", function(event) { event.stopPropagation() }); diff --git a/wise-webapp/src/main/java/com/wisemapping/model/IconFamily.java b/wise-webapp/src/main/java/com/wisemapping/model/IconFamily.java index b4b5d5bd..990dde63 100755 --- a/wise-webapp/src/main/java/com/wisemapping/model/IconFamily.java +++ b/wise-webapp/src/main/java/com/wisemapping/model/IconFamily.java @@ -43,5 +43,6 @@ public enum IconFamily { FLAG, BULLET, TAG, - OBJECT; + OBJECT, + WEATHER; } diff --git a/wise-webapp/src/main/java/com/wisemapping/model/MindmapIcons.java b/wise-webapp/src/main/java/com/wisemapping/model/MindmapIcons.java index de96a3cd..d0f0ec08 100755 --- a/wise-webapp/src/main/java/com/wisemapping/model/MindmapIcons.java +++ b/wise-webapp/src/main/java/com/wisemapping/model/MindmapIcons.java @@ -152,11 +152,22 @@ public class MindmapIcons { public static final MindmapIcon OBJECT_WIZARD = new MindmapIcon(IconFamily.OBJECT, "wizard"); public static final MindmapIcon OBJECT_HOUSE = new MindmapIcon(IconFamily.OBJECT, "house"); public static final MindmapIcon OBJECT_CAKE = new MindmapIcon(IconFamily.OBJECT, "cake"); - public static final MindmapIcon OBJECT_CAMERA= new MindmapIcon(IconFamily.OBJECT, "camera"); + public static final MindmapIcon OBJECT_CAMERA = new MindmapIcon(IconFamily.OBJECT, "camera"); public static final MindmapIcon OBJECT_PALETTE = new MindmapIcon(IconFamily.OBJECT, "palette"); public static final MindmapIcon OBJECT_RAINBOW = new MindmapIcon(IconFamily.OBJECT, "rainbow"); + public static final MindmapIcon WEATHER_CLEAR_NIGHT = new MindmapIcon(IconFamily.WEATHER, "clear-night"); + public static final MindmapIcon WEATHER_CLEAR = new MindmapIcon(IconFamily.WEATHER, "clear"); + public static final MindmapIcon WEATHER_FEW_CLOUDS_NIGHT = new MindmapIcon(IconFamily.WEATHER, "few-clouds-night"); + public static final MindmapIcon WEATHER_FEW_CLOUDS = new MindmapIcon(IconFamily.WEATHER, "few-clouds"); + public static final MindmapIcon WEATHER_OVERCAST = new MindmapIcon(IconFamily.WEATHER, "overcast"); + public static final MindmapIcon WEATHER_SEVERE_ALERT = new MindmapIcon(IconFamily.WEATHER, "severe-alert"); + public static final MindmapIcon WEATHER_SHOWERS_SCATTERED = new MindmapIcon(IconFamily.WEATHER, "showers-scattered"); + public static final MindmapIcon WEATHER_SHOWERS = new MindmapIcon(IconFamily.WEATHER, "showers"); + public static final MindmapIcon WEATHER_SNOW = new MindmapIcon(IconFamily.WEATHER, "snow"); + public static final MindmapIcon WEATHER_STORM = new MindmapIcon(IconFamily.WEATHER, "storm"); + public static final MindmapIcon MAIL_ENVELOP = new MindmapIcon(IconFamily.MAIL, "envelop"); public static final MindmapIcon MAIL_MAILBOX = new MindmapIcon(IconFamily.MAIL, "mailbox"); public static final MindmapIcon MAIL_EDIT = new MindmapIcon(IconFamily.MAIL, "edit"); diff --git a/wise-webapp/src/main/webapp/icons/weather-clear-night.png b/wise-webapp/src/main/webapp/icons/weather_clear-night.png similarity index 100% rename from wise-webapp/src/main/webapp/icons/weather-clear-night.png rename to wise-webapp/src/main/webapp/icons/weather_clear-night.png diff --git a/wise-webapp/src/main/webapp/icons/weather-clear.png b/wise-webapp/src/main/webapp/icons/weather_clear.png similarity index 100% rename from wise-webapp/src/main/webapp/icons/weather-clear.png rename to wise-webapp/src/main/webapp/icons/weather_clear.png diff --git a/wise-webapp/src/main/webapp/icons/weather-few-clouds-night.png b/wise-webapp/src/main/webapp/icons/weather_few-clouds-night.png similarity index 100% rename from wise-webapp/src/main/webapp/icons/weather-few-clouds-night.png rename to wise-webapp/src/main/webapp/icons/weather_few-clouds-night.png diff --git a/wise-webapp/src/main/webapp/icons/weather-few-clouds.png b/wise-webapp/src/main/webapp/icons/weather_few-clouds.png similarity index 100% rename from wise-webapp/src/main/webapp/icons/weather-few-clouds.png rename to wise-webapp/src/main/webapp/icons/weather_few-clouds.png diff --git a/wise-webapp/src/main/webapp/icons/weather-overcast.png b/wise-webapp/src/main/webapp/icons/weather_overcast.png similarity index 100% rename from wise-webapp/src/main/webapp/icons/weather-overcast.png rename to wise-webapp/src/main/webapp/icons/weather_overcast.png diff --git a/wise-webapp/src/main/webapp/icons/weather-severe-alert.png b/wise-webapp/src/main/webapp/icons/weather_severe-alert.png similarity index 100% rename from wise-webapp/src/main/webapp/icons/weather-severe-alert.png rename to wise-webapp/src/main/webapp/icons/weather_severe-alert.png diff --git a/wise-webapp/src/main/webapp/icons/weather-showers-scattered.png b/wise-webapp/src/main/webapp/icons/weather_showers-scattered.png similarity index 100% rename from wise-webapp/src/main/webapp/icons/weather-showers-scattered.png rename to wise-webapp/src/main/webapp/icons/weather_showers-scattered.png diff --git a/wise-webapp/src/main/webapp/icons/weather-showers.png b/wise-webapp/src/main/webapp/icons/weather_showers.png similarity index 100% rename from wise-webapp/src/main/webapp/icons/weather-showers.png rename to wise-webapp/src/main/webapp/icons/weather_showers.png diff --git a/wise-webapp/src/main/webapp/icons/weather-snow.png b/wise-webapp/src/main/webapp/icons/weather_snow.png similarity index 100% rename from wise-webapp/src/main/webapp/icons/weather-snow.png rename to wise-webapp/src/main/webapp/icons/weather_snow.png diff --git a/wise-webapp/src/main/webapp/icons/weather-storm.png b/wise-webapp/src/main/webapp/icons/weather_storm.png similarity index 100% rename from wise-webapp/src/main/webapp/icons/weather-storm.png rename to wise-webapp/src/main/webapp/icons/weather_storm.png diff --git a/wise-webapp/src/test/java/com/wisemapping/test/model/IconsTest.java b/wise-webapp/src/test/java/com/wisemapping/test/model/IconsTest.java index a039aad1..6a44f355 100644 --- a/wise-webapp/src/test/java/com/wisemapping/test/model/IconsTest.java +++ b/wise-webapp/src/test/java/com/wisemapping/test/model/IconsTest.java @@ -12,7 +12,7 @@ import java.util.List; @Test public class IconsTest { - final private static String CURRENT_JSON_ICONS = "[{\"id\": \"face\", \"icons\" : [\"face_plain\",\"face_sad\",\"face_crying\",\"face_smile\",\"face_surprise\",\"face_wink\"]},{\"id\": \"funy\", \"icons\" : [\"funy_angel\",\"funy_devilish\",\"funy_glasses\",\"funy_grin\",\"funy_kiss\",\"funy_monkey\"]},{\"id\": \"conn\", \"icons\" : [\"conn_connect\",\"conn_disconnect\"]},{\"id\": \"sport\", \"icons\" : [\"sport_basketball\",\"sport_football\",\"sport_golf\",\"sport_raquet\",\"sport_shuttlecock\",\"sport_soccer\",\"sport_tennis\"]},{\"id\": \"bulb\", \"icons\" : [\"bulb_light_on\",\"bulb_light_off\"]},{\"id\": \"thumb\", \"icons\" : [\"thumb_thumb_up\",\"thumb_thumb_down\"]},{\"id\": \"tick\", \"icons\" : [\"tick_tick\",\"tick_cross\"]},{\"id\": \"onoff\", \"icons\" : [\"onoff_clock\",\"onoff_clock_red\",\"onoff_add\",\"onoff_delete\",\"onoff_status_offline\",\"onoff_status_online\"]},{\"id\": \"money\", \"icons\" : [\"money_money\",\"money_dollar\",\"money_euro\",\"money_pound\",\"money_yen\",\"money_coins\",\"money_ruby\"]},{\"id\": \"time\", \"icons\" : [\"time_calendar\",\"time_clock\",\"time_hourglass\"]},{\"id\": \"chart\", \"icons\" : [\"chart_bar\",\"chart_line\",\"chart_curve\",\"chart_pie\",\"chart_organisation\"]},{\"id\": \"sign\", \"icons\" : [\"sign_warning\",\"sign_info\",\"sign_stop\",\"sign_help\",\"sign_cancel\"]},{\"id\": \"hard\", \"icons\" : [\"hard_cd\",\"hard_computer\",\"hard_controller\",\"hard_driver_disk\",\"hard_ipod\",\"hard_keyboard\",\"hard_mouse\",\"hard_printer\"]},{\"id\": \"soft\", \"icons\" : [\"soft_bug\",\"soft_cursor\",\"soft_database_table\",\"soft_database\",\"soft_feed\",\"soft_folder_explore\",\"soft_rss\",\"soft_penguin\"]},{\"id\": \"arrow\", \"icons\" : [\"arrow_up\",\"arrow_down\",\"arrow_left\",\"arrow_right\"]},{\"id\": \"arrowc\", \"icons\" : [\"arrowc_rotate_anticlockwise\",\"arrowc_rotate_clockwise\",\"arrowc_turn_left\",\"arrowc_turn_right\"]},{\"id\": \"people\", \"icons\" : [\"people_group\",\"people_male1\",\"people_male2\",\"people_female1\",\"people_female2\"]},{\"id\": \"mail\", \"icons\" : [\"mail_envelop\",\"mail_mailbox\",\"mail_edit\",\"mail_list\"]},{\"id\": \"flag\", \"icons\" : [\"flag_blue\",\"flag_green\",\"flag_orange\",\"flag_pink\",\"flag_purple\",\"flag_yellow\"]},{\"id\": \"bullet\", \"icons\" : [\"bullet_black\",\"bullet_blue\",\"bullet_green\",\"bullet_orange\",\"bullet_red\",\"bullet_pink\",\"bullet_purple\"]},{\"id\": \"tag\", \"icons\" : [\"tag_blue\",\"tag_green\",\"tag_orange\",\"tag_red\",\"tag_pink\",\"tag_yellow\"]},{\"id\": \"object\", \"icons\" : [\"object_bell\",\"object_clanbomber\",\"object_key\",\"object_pencil\",\"object_phone\",\"object_magnifier\",\"object_clip\",\"object_music\",\"object_star\",\"object_wizard\",\"object_house\",\"object_cake\",\"object_camera\",\"object_palette\",\"object_rainbow\"]},]"; + final private static String CURRENT_JSON_ICONS = "[{\"id\": \"face\", \"icons\" : [\"face_plain\",\"face_sad\",\"face_crying\",\"face_smile\",\"face_surprise\",\"face_wink\"]},{\"id\": \"funy\", \"icons\" : [\"funy_angel\",\"funy_devilish\",\"funy_glasses\",\"funy_grin\",\"funy_kiss\",\"funy_monkey\"]},{\"id\": \"conn\", \"icons\" : [\"conn_connect\",\"conn_disconnect\"]},{\"id\": \"sport\", \"icons\" : [\"sport_basketball\",\"sport_football\",\"sport_golf\",\"sport_raquet\",\"sport_shuttlecock\",\"sport_soccer\",\"sport_tennis\"]},{\"id\": \"bulb\", \"icons\" : [\"bulb_light_on\",\"bulb_light_off\"]},{\"id\": \"thumb\", \"icons\" : [\"thumb_thumb_up\",\"thumb_thumb_down\"]},{\"id\": \"tick\", \"icons\" : [\"tick_tick\",\"tick_cross\"]},{\"id\": \"onoff\", \"icons\" : [\"onoff_clock\",\"onoff_clock_red\",\"onoff_add\",\"onoff_delete\",\"onoff_status_offline\",\"onoff_status_online\"]},{\"id\": \"money\", \"icons\" : [\"money_money\",\"money_dollar\",\"money_euro\",\"money_pound\",\"money_yen\",\"money_coins\",\"money_ruby\"]},{\"id\": \"time\", \"icons\" : [\"time_calendar\",\"time_clock\",\"time_hourglass\"]},{\"id\": \"chart\", \"icons\" : [\"chart_bar\",\"chart_line\",\"chart_curve\",\"chart_pie\",\"chart_organisation\"]},{\"id\": \"sign\", \"icons\" : [\"sign_warning\",\"sign_info\",\"sign_stop\",\"sign_help\",\"sign_cancel\"]},{\"id\": \"hard\", \"icons\" : [\"hard_cd\",\"hard_computer\",\"hard_controller\",\"hard_driver_disk\",\"hard_ipod\",\"hard_keyboard\",\"hard_mouse\",\"hard_printer\"]},{\"id\": \"soft\", \"icons\" : [\"soft_bug\",\"soft_cursor\",\"soft_database_table\",\"soft_database\",\"soft_feed\",\"soft_folder_explore\",\"soft_rss\",\"soft_penguin\"]},{\"id\": \"arrow\", \"icons\" : [\"arrow_up\",\"arrow_down\",\"arrow_left\",\"arrow_right\"]},{\"id\": \"arrowc\", \"icons\" : [\"arrowc_rotate_anticlockwise\",\"arrowc_rotate_clockwise\",\"arrowc_turn_left\",\"arrowc_turn_right\"]},{\"id\": \"people\", \"icons\" : [\"people_group\",\"people_male1\",\"people_male2\",\"people_female1\",\"people_female2\"]},{\"id\": \"mail\", \"icons\" : [\"mail_envelop\",\"mail_mailbox\",\"mail_edit\",\"mail_list\"]},{\"id\": \"flag\", \"icons\" : [\"flag_blue\",\"flag_green\",\"flag_orange\",\"flag_pink\",\"flag_purple\",\"flag_yellow\"]},{\"id\": \"bullet\", \"icons\" : [\"bullet_black\",\"bullet_blue\",\"bullet_green\",\"bullet_orange\",\"bullet_red\",\"bullet_pink\",\"bullet_purple\"]},{\"id\": \"tag\", \"icons\" : [\"tag_blue\",\"tag_green\",\"tag_orange\",\"tag_red\",\"tag_pink\",\"tag_yellow\"]},{\"id\": \"object\", \"icons\" : [\"object_bell\",\"object_clanbomber\",\"object_key\",\"object_pencil\",\"object_phone\",\"object_magnifier\",\"object_clip\",\"object_music\",\"object_star\",\"object_wizard\",\"object_house\",\"object_cake\",\"object_camera\",\"object_palette\",\"object_rainbow\"]},{\"id\": \"weather\", \"icons\" : [\"weather_clear-night\",\"weather_clear\",\"weather_few-clouds-night\",\"weather_few-clouds\",\"weather_overcast\",\"weather_severe-alert\",\"weather_showers-scattered\",\"weather_showers\",\"weather_snow\",\"weather_storm\"]},]"; @Test void checkImagesByFamily() throws IllegalAccessException {