--- /dev/null
+package org.simantics.document.server.io;\r
+\r
+public class SimpleFont implements IFont {\r
+\r
+ private final String family;\r
+ private final String style;\r
+ private final int height;\r
+\r
+ public SimpleFont(String family, String style, int height) {\r
+ this.family = family;\r
+ this.style = style;\r
+ this.height = height;\r
+ }\r
+\r
+ @Override\r
+ public int hashCode() {\r
+ final int prime = 31;\r
+ int result = 1;\r
+ result = prime * result + ((family == null) ? 0 : family.hashCode());\r
+ result = prime * result + height;\r
+ result = prime * result + ((style == null) ? 0 : style.hashCode());\r
+ return result;\r
+ }\r
+\r
+ @Override\r
+ public boolean equals(Object obj) {\r
+ if (this == obj)\r
+ return true;\r
+ if (obj == null)\r
+ return false;\r
+ if (getClass() != obj.getClass())\r
+ return false;\r
+ SimpleFont other = (SimpleFont) obj;\r
+ if (family == null) {\r
+ if (other.family != null)\r
+ return false;\r
+ } else if (!family.equals(other.family))\r
+ return false;\r
+ if (height != other.height)\r
+ return false;\r
+ if (style == null) {\r
+ if (other.style != null)\r
+ return false;\r
+ } else if (!style.equals(other.style))\r
+ return false;\r
+ return true;\r
+ }\r
+\r
+ @Override\r
+ public String getFamily() {\r
+ return family;\r
+ }\r
+\r
+ @Override\r
+ public String getStyle() {\r
+ return style;\r
+ }\r
+\r
+ @Override\r
+ public int getHeight() {\r
+ return height;\r
+ }\r
+ \r
+}\r