Add more icons.

This commit is contained in:
Paulo Gustavo Veiga 2011-03-23 00:26:27 -03:00
parent 483b781981
commit cbc31c56ef
35 changed files with 46 additions and 12 deletions

View File

@ -149,5 +149,6 @@ mindplot.ImageIcon.prototype.getUiId = function()
mindplot.ImageIcon.prototype.ICON_FAMILIES = [{"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": "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": "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": "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"]},{"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": "mail", "icons" : ["mail_envelop","mail_mailbox","mail_edit"]},{"id": "object", "icons" : ["object_penguin","object_bell","object_clanbomber","object_key","object_pencil","object_phone","object_magnifier","object_clip","object_music","object_cd","object_star","object_wizard","object_house"]}]
mindplot.ImageIcon.prototype.ICON_FAMILIES = [{"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": "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": "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": "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"]},{"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": "object", "icons" : ["object_penguin","object_bell","object_clanbomber","object_key","object_pencil","object_phone","object_magnifier","object_clip","object_music","object_star","object_wizard","object_house"]}]

View File

@ -46,7 +46,8 @@ final public class FreemindIconConverter {
@Nullable
public static String toFreemindId(@NotNull String iconId) {
return iconToFreeId.get(MindmapIcons.findById(iconId));
String result = iconToFreeId.get(MindmapIcons.findById(iconId));
return result != null ? result : iconId;
}
@ -76,6 +77,7 @@ final public class FreemindIconConverter {
// Map arrow icons ...
iconToFreeId.put(MindmapIcons.ARROW_RIGHT, "back");
iconToFreeId.put(MindmapIcons.ARROW_LEFT, "forward");
iconToFreeId.put(MindmapIcons.ONOFF_DELETE, "closed");
// Map smile icons ...
iconToFreeId.put(MindmapIcons.FACE_PLAIN, "smiley-neutral");
@ -91,12 +93,13 @@ final public class FreemindIconConverter {
iconToFreeId.put(MindmapIcons.OBJECT_CLIP, "attach");
iconToFreeId.put(MindmapIcons.OBJECT_MUSIC, "knotify");
iconToFreeId.put(MindmapIcons.OBJECT_HOUSE, "gohome");
iconToFreeId.put(MindmapIcons.ONOFF_STATUS_ONLINE, "licq");
// Sign mapping ...
iconToFreeId.put(MindmapIcons.SIGN_WARNING, "messagebox_warning");
iconToFreeId.put(MindmapIcons.SIGN_STOP, "stop-sign");
// Mail mappings
iconToFreeId.put(MindmapIcons.MAIL_ENVELOP, "Mail");
iconToFreeId.put(MindmapIcons.MAIL_MAILBOX, "korn");

View File

@ -37,6 +37,9 @@ public enum IconFamily {
TIME,
CHART,
SIGN,
HARD,
SOFT,
PEOPLE,
MAIL,
OBJECT;
}

View File

@ -24,7 +24,7 @@ import java.lang.IllegalStateException;
import java.lang.reflect.Field;
import java.util.*;
@SuppressWarnings("all")
@SuppressWarnings({"UnusedDeclaration"})
public class MindmapIcons {
private static Map<IconFamily, List<MindmapIcon>> iconsByFamily;
@ -39,6 +39,7 @@ public class MindmapIcons {
public static final MindmapIcon THUMB__UP = new MindmapIcon(IconFamily.THUMB, "thumb_up");
public static final MindmapIcon THUMB_DOWN = new MindmapIcon(IconFamily.THUMB, "thumb_down");
public static final MindmapIcon ARROW_UP = new MindmapIcon(IconFamily.ARROW, "up");
public static final MindmapIcon ARROW_DOWN = new MindmapIcon(IconFamily.ARROW, "down");
public static final MindmapIcon ARROW_LEFT = new MindmapIcon(IconFamily.ARROW, "left");
@ -72,6 +73,9 @@ public class MindmapIcons {
public static final MindmapIcon ONOFF_CLOCK__RED = new MindmapIcon(IconFamily.ONOFF, "clock_red");
public static final MindmapIcon ONOFF_ADD = new MindmapIcon(IconFamily.ONOFF, "add");
public static final MindmapIcon ONOFF_DELETE = new MindmapIcon(IconFamily.ONOFF, "delete");
public static final MindmapIcon ONOFF_STATUS_OFFLINE = new MindmapIcon(IconFamily.ONOFF, "status_offline");
public static final MindmapIcon ONOFF_STATUS_ONLINE = new MindmapIcon(IconFamily.ONOFF, "status_online");
public static final MindmapIcon TAG_BLUE = new MindmapIcon(IconFamily.TAG, "blue");
public static final MindmapIcon TAG_GREEN = new MindmapIcon(IconFamily.TAG, "green");
@ -145,7 +149,6 @@ public class MindmapIcons {
public static final MindmapIcon OBJECT_MAGNIFIER = new MindmapIcon(IconFamily.OBJECT, "magnifier");
public static final MindmapIcon OBJECT_CLIP = new MindmapIcon(IconFamily.OBJECT, "clip");
public static final MindmapIcon OBJECT_MUSIC = new MindmapIcon(IconFamily.OBJECT, "music");
public static final MindmapIcon OBJECT_CD = new MindmapIcon(IconFamily.OBJECT, "cd");
public static final MindmapIcon OBJECT_STAR = new MindmapIcon(IconFamily.OBJECT, "star");
public static final MindmapIcon OBJECT_WIZARD = new MindmapIcon(IconFamily.OBJECT, "wizard");
public static final MindmapIcon OBJECT_HOUSE = new MindmapIcon(IconFamily.OBJECT, "house");
@ -153,6 +156,8 @@ public class MindmapIcons {
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");
public static final MindmapIcon MAIL_LIST = new MindmapIcon(IconFamily.MAIL, "list");
public static final MindmapIcon SIGN_WARNING = new MindmapIcon(IconFamily.SIGN, "warning");
public static final MindmapIcon SIGN_INFO = new MindmapIcon(IconFamily.SIGN, "info");
@ -160,6 +165,29 @@ public class MindmapIcons {
public static final MindmapIcon SIGN_HELP = new MindmapIcon(IconFamily.SIGN, "help");
public static final MindmapIcon SIGN_CANCEL = new MindmapIcon(IconFamily.SIGN, "cancel");
public static final MindmapIcon HARD_CD = new MindmapIcon(IconFamily.HARD, "cd");
public static final MindmapIcon HARD_COMPUTER = new MindmapIcon(IconFamily.HARD, "computer");
public static final MindmapIcon HARD_CONTROLLER = new MindmapIcon(IconFamily.HARD, "controller");
public static final MindmapIcon HARD_DRIVER_DISK = new MindmapIcon(IconFamily.HARD, "driver_disk");
public static final MindmapIcon HARD_IPOD = new MindmapIcon(IconFamily.HARD, "ipod");
public static final MindmapIcon HARD_KEYBOARD = new MindmapIcon(IconFamily.HARD, "keyboard");
public static final MindmapIcon HARD_MOUSE = new MindmapIcon(IconFamily.HARD, "mouse");
public static final MindmapIcon HARD_PRINTER = new MindmapIcon(IconFamily.HARD, "printer");
public static final MindmapIcon SOFT_BUG = new MindmapIcon(IconFamily.SOFT, "bug");
public static final MindmapIcon SOFT_CURSOR = new MindmapIcon(IconFamily.SOFT, "cursor");
public static final MindmapIcon SOFT_DATABASE_TABLE = new MindmapIcon(IconFamily.SOFT, "database_table");
public static final MindmapIcon SOFT_DATABASE = new MindmapIcon(IconFamily.SOFT, "database");
public static final MindmapIcon SOFT_FEED = new MindmapIcon(IconFamily.SOFT, "feed");
public static final MindmapIcon SOFT_FOLDER_EXPORE = new MindmapIcon(IconFamily.SOFT, "folder_explore");
public static final MindmapIcon SOFT_RSS = new MindmapIcon(IconFamily.SOFT, "rss");
public static final MindmapIcon PEOPLE_GROUP = new MindmapIcon(IconFamily.PEOPLE, "group");
public static final MindmapIcon PEOPLE_MALE = new MindmapIcon(IconFamily.PEOPLE, "male1");
public static final MindmapIcon PEOPLE_MALE2 = new MindmapIcon(IconFamily.PEOPLE, "male2");
public static final MindmapIcon PEOPLE_FEMALE = new MindmapIcon(IconFamily.PEOPLE, "female1");
public static final MindmapIcon PEOPLE_FEMALE2 = new MindmapIcon(IconFamily.PEOPLE, "female2");
@NotNull
public static List<MindmapIcon> getIconByFamily(@NotNull IconFamily family) {

Binary file not shown.

Before

Width:  |  Height:  |  Size: 728 B

View File

Before

Width:  |  Height:  |  Size: 673 B

After

Width:  |  Height:  |  Size: 673 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 667 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 666 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 734 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 620 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 463 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 570 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 634 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 731 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 566 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 422 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 722 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 663 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 722 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 753 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 748 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 741 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 715 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 774 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 354 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 390 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 726 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 691 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 679 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 530 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 537 B

View File

@ -18,9 +18,9 @@
var IconPanel = new Class({
options:{
width:190,
width:250,
initialWidth:0,
height:145,
height:250,
content:null,
panel:null,
button:null,

View File

@ -457,7 +457,7 @@ function afterMindpotLibraryLoading()
}
function buildIconChooser() {
var content = new Element('div').setStyles({width:330,height:340,padding:5});
var content = new Element('div').setStyles({width:250,height:250,padding:5});
var count = 0;
for (var i = 0; i < mindplot.ImageIcon.prototype.ICON_FAMILIES.length; i = i + 1)
{

File diff suppressed because one or more lines are too long

View File

@ -12,7 +12,7 @@ import java.util.List;
@Test
public class IconsTest {
final private static String CURRENT_JSON_ICONS = "[{\"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\": \"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\": \"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\": \"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\"]},{\"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\": \"mail\", \"icons\" : [\"mail_envelop\",\"mail_mailbox\",\"mail_edit\"]},{\"id\": \"object\", \"icons\" : [\"object_penguin\",\"object_bell\",\"object_clanbomber\",\"object_key\",\"object_pencil\",\"object_phone\",\"object_magnifier\",\"object_clip\",\"object_music\",\"object_cd\",\"object_star\",\"object_wizard\",\"object_house\"]},]";
final private static String CURRENT_JSON_ICONS = "[{\"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\": \"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\": \"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\": \"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\"]},{\"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\": \"object\", \"icons\" : [\"object_penguin\",\"object_bell\",\"object_clanbomber\",\"object_key\",\"object_pencil\",\"object_phone\",\"object_magnifier\",\"object_clip\",\"object_music\",\"object_star\",\"object_wizard\",\"object_house\"]},]";
@Test
void checkImagesByFamily() throws IllegalAccessException {
@ -60,7 +60,6 @@ public class IconsTest {
result.append("]},");
}
result.append("]");
System.out.println(result.toString());
Assert.assertEquals(result.toString(), CURRENT_JSON_ICONS, "Some change has been introduced in the icons library. Please, check the IconIcons.js and update the variable.mindplot.ImageIcon.prototype.ICON_FAMILIES");
}