Start working on moving all the images to icons and rename them to follow the convention family-image.png. Based on that, the current hardcode maps could be removed.

This commit is contained in:
Paulo Gustavo Veiga
2011-03-21 01:27:21 -03:00
parent 1790a20d6a
commit 5d0d837062
19 changed files with 59 additions and 33 deletions

View File

@@ -24,7 +24,6 @@ public enum IconFamily {
TAG("TAG","tag_"),
NUMBER("NUMBER","number_"),
SMILEY("FACE","face_"),
FACE_FUNY("FACEFUNY","facefuny_"),
ARROW("ARROW","arrow_"),
ARROWC("ARROWC","arrowc_"),
CONN("CONN","conn_"),

View File

Before

Width:  |  Height:  |  Size: 992 B

After

Width:  |  Height:  |  Size: 992 B

View File

Before

Width:  |  Height:  |  Size: 936 B

After

Width:  |  Height:  |  Size: 936 B

View File

Before

Width:  |  Height:  |  Size: 855 B

After

Width:  |  Height:  |  Size: 855 B

View File

Before

Width:  |  Height:  |  Size: 949 B

After

Width:  |  Height:  |  Size: 949 B

View File

Before

Width:  |  Height:  |  Size: 905 B

After

Width:  |  Height:  |  Size: 905 B

View File

Before

Width:  |  Height:  |  Size: 919 B

After

Width:  |  Height:  |  Size: 919 B

View File

Before

Width:  |  Height:  |  Size: 784 B

After

Width:  |  Height:  |  Size: 784 B

View File

Before

Width:  |  Height:  |  Size: 894 B

After

Width:  |  Height:  |  Size: 894 B

View File

Before

Width:  |  Height:  |  Size: 918 B

After

Width:  |  Height:  |  Size: 918 B

View File

Before

Width:  |  Height:  |  Size: 896 B

After

Width:  |  Height:  |  Size: 896 B

View File

Before

Width:  |  Height:  |  Size: 919 B

After

Width:  |  Height:  |  Size: 919 B

View File

Before

Width:  |  Height:  |  Size: 917 B

After

Width:  |  Height:  |  Size: 917 B

View File

Before

Width:  |  Height:  |  Size: 914 B

After

Width:  |  Height:  |  Size: 914 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 592 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 537 B

View File

@@ -0,0 +1,47 @@
package com.wisemapping.test.model;
import com.wisemapping.model.IconFamily;
import com.wisemapping.model.MindmapIcon;
import com.wisemapping.model.MindmapIcons;
import org.testng.Assert;
import org.testng.annotations.Test;
import java.io.File;
import java.util.List;
@Test
public class IconsTest {
@Test
void checkImagesByFamily() throws IllegalAccessException {
List<MindmapIcon> iconByFamily = MindmapIcons.getIconByFamily(IconFamily.BULLET);
Assert.assertEquals(iconByFamily.size(), 7);
}
@Test
void checkPngFile() throws IllegalAccessException {
IconFamily[] values = IconFamily.values();
for (IconFamily family : values) {
final List<MindmapIcon> iconByFamily = MindmapIcons.getIconByFamily(family);
for (MindmapIcon mindmapIcon : iconByFamily) {
final String pngName = mindmapIcon.getId() + ".png";
File file = new File("src/main/webapp/icons/", pngName);
if (!file.exists()) {
System.err.println("File not found:" + pngName);
}
// else {
// System.err.println("Found:" + pngName);
// }
}
}
}
}

View File

@@ -1,20 +0,0 @@
package com.wisemapping.test.model;
import com.wisemapping.model.IconFamily;
import com.wisemapping.model.MindmapIcon;
import com.wisemapping.model.MindmapIcons;
import org.testng.Assert;
import org.testng.annotations.Test;
import java.util.List;
@Test
public class ImagesTest {
@Test
void checkImagesByFamily() throws IllegalAccessException {
List<MindmapIcon> iconByFamily = MindmapIcons.getIconByFamily(IconFamily.BULLET);
Assert.assertEquals(iconByFamily.size(), 7);
}
}