51 lines
1.2 KiB
Java
51 lines
1.2 KiB
Java
package org.gcube.portal.stohubicons.shared;
|
||
|
||
import java.io.Serializable;
|
||
|
||
/**
|
||
*
|
||
* @author M. Assante, CNR-ISTI
|
||
*
|
||
* easy to incorporate icons into your web page. Here’s a small example: <i class="material-icons">face</i>
|
||
* @see <a href="http://google.github.io/material-design-icons/">http://google.github.io/material-design-icons/</a>
|
||
* object representing Material Design Icon <i class="material-icons"> $The Returned Material Design Icon Textual Name </i>
|
||
*/
|
||
@SuppressWarnings("serial")
|
||
public class MDIcon implements Serializable {
|
||
|
||
private StringBuilder html;
|
||
private String textualName;
|
||
private String color;
|
||
|
||
public MDIcon(String textualName, String color) {
|
||
this.html = new StringBuilder
|
||
("<i style=\"color: ")
|
||
.append(color)
|
||
.append("\" class=\"material-icons\">")
|
||
.append(textualName)
|
||
.append("</i>");
|
||
this.textualName = textualName;
|
||
this.color = color;
|
||
}
|
||
|
||
public String getHtml() {
|
||
return html.toString();
|
||
}
|
||
|
||
public String getTextualName() {
|
||
return textualName;
|
||
}
|
||
|
||
public void setTextualName(String textualName) {
|
||
this.textualName = textualName;
|
||
}
|
||
|
||
public String getColor() {
|
||
return color;
|
||
}
|
||
|
||
public void setColor(String color) {
|
||
this.color = color;
|
||
}
|
||
}
|