1 package org.simantics.document.server.io;
\r
3 public class SimpleFont implements IFont {
\r
5 private final String family;
\r
6 private final String style;
\r
7 private final int height;
\r
9 public SimpleFont(String family, String style, int height) {
\r
10 this.family = family;
\r
12 this.height = height;
\r
16 public int hashCode() {
\r
17 final int prime = 31;
\r
19 result = prime * result + ((family == null) ? 0 : family.hashCode());
\r
20 result = prime * result + height;
\r
21 result = prime * result + ((style == null) ? 0 : style.hashCode());
\r
26 public boolean equals(Object obj) {
\r
31 if (getClass() != obj.getClass())
\r
33 SimpleFont other = (SimpleFont) obj;
\r
34 if (family == null) {
\r
35 if (other.family != null)
\r
37 } else if (!family.equals(other.family))
\r
39 if (height != other.height)
\r
41 if (style == null) {
\r
42 if (other.style != null)
\r
44 } else if (!style.equals(other.style))
\r
50 public String getFamily() {
\r
55 public String getStyle() {
\r
60 public int getHeight() {
\r