BrightSide Workbench Full Report + Source Code
org.turro.html.FontAwesome Class Reference

Static Public Member Functions

static String getIcon (String icon)
 
static String getIcon (String icon, String modifiers)
 
static String getMimeIcon (String type)
 
static String getNameMimeMap (String type)
 

Detailed Description

Author
Lluis TurrĂ³ Cutiller lluis.nosp@m.@tur.nosp@m.ro.or.nosp@m.g

Definition at line 27 of file FontAwesome.java.

Member Function Documentation

◆ getIcon() [1/2]

static String org.turro.html.FontAwesome.getIcon ( String  icon)
static

Definition at line 29 of file FontAwesome.java.

29  {
30  return getIcon(icon, null);
31  }
static String getIcon(String icon)
Here is the caller graph for this function:

◆ getIcon() [2/2]

static String org.turro.html.FontAwesome.getIcon ( String  icon,
String  modifiers 
)
static

Definition at line 33 of file FontAwesome.java.

33  {
34  return "<i class=\"fa fa-" + icon + (Strings.isBlank(modifiers) ? "" : " " + modifiers) + "\"></i>";
35  }

◆ getMimeIcon()

static String org.turro.html.FontAwesome.getMimeIcon ( String  type)
static

Definition at line 37 of file FontAwesome.java.

37  {
38  return getIcon(getNameMimeMap(type));
39  }
static String getNameMimeMap(String type)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ getNameMimeMap()

static String org.turro.html.FontAwesome.getNameMimeMap ( String  type)
static

Definition at line 41 of file FontAwesome.java.

41  {
42  switch(type.toLowerCase()) {
43  case "folder":
44  return "folder";
45  case "folder-open":
46  return "folder-open";
47  case "zip":
48  case "7z":
49  case "ace":
50  case "ar":
51  case "arj":
52  case "bz":
53  case "rar":
54  case "rpm":
55  case "deb":
56  case "tar":
57  return "file-archive-o";
58  case "ac3":
59  case "midi":
60  case "mp3":
61  case "wav":
62  return "music";
63  case "avi":
64  case "mpg":
65  case "mp4":
66  case "mkv":
67  case "rm":
68  return "film";
69  case "gif":
70  case "jpg":
71  case "png":
72  case "bmp":
73  case "odg":
74  case "svg":
75  return "picture-o";
76  case "txt":
77  return "file-text-o";
78  case "odt":
79  case "doc":
80  case "docx":
81  case "rtf":
82  case "scribus":
83  return "file-word-o";
84  case "ods":
85  case "xls":
86  case "xlsx":
87  return "file-excel-o";
88  case "odp":
89  case "ppt":
90  case "pptx":
91  return "file-powerpoint-o";
92  case "pdf":
93  return "file-pdf-o";
94  case "awk":
95  case "css":
96  case "html":
97  case "js":
98  case "make":
99  case "xml":
100  case "rss":
101  return "file-code-o";
102  case "java":
103  case "jar":
104  return "coffee";
105  case "ascii":
106  case "bin":
107  case "csv":
108  case "log":
109  return "file-o";
110  case "db":
111  case "mdb":
112  case "sql":
113  case "odb":
114  return "database";
115  case "calendar":
116  return "calendar-o";
117  case "encrypted":
118  case "pgp":
119  return "user-secret";
120  case "font":
121  case "ttf":
122  return "font";
123  case "info":
124  case "readme":
125  return "info-circle";
126  case "iso":
127  return "hdd-o";
128  case "man":
129  return "book";
130  case "odf":
131  return "superscript";
132  case "message":
133  return "envelope-o";
134  case "ps":
135  return "print";
136  case "recycled":
137  return "recycle";
138  case "tmp":
139  return "clock";
140  case "torrent":
141  return "download";
142  }
143  return "question-circle";
144  }
Here is the caller graph for this function:

The documentation for this class was generated from the following file: