]> gerrit.simantics Code Review - simantics/platform.git/blobdiff - bundles/org.simantics.g2d/src/org/simantics/g2d/element/handler/impl/TextFontImpl.java
Fixed all line endings of the repository
[simantics/platform.git] / bundles / org.simantics.g2d / src / org / simantics / g2d / element / handler / impl / TextFontImpl.java
index b4e7b21c096153e71bcb284149df2d37866ca255..2d6c2b069c1e61a09ccb376ae95b2770de42da65 100644 (file)
@@ -1,89 +1,89 @@
-/*******************************************************************************\r
- * Copyright (c) 2007, 2010 Association for Decentralized Information Management\r
- * in Industry THTH ry.\r
- * All rights reserved. This program and the accompanying materials\r
- * are made available under the terms of the Eclipse Public License v1.0\r
- * which accompanies this distribution, and is available at\r
- * http://www.eclipse.org/legal/epl-v10.html\r
- *\r
- * Contributors:\r
- *     VTT Technical Research Centre of Finland - initial API and implementation\r
- *******************************************************************************/\r
-package org.simantics.g2d.element.handler.impl;\r
-\r
-import java.awt.Font;\r
-\r
-import org.simantics.g2d.diagram.IDiagram;\r
-import org.simantics.g2d.element.ElementHints;\r
-import org.simantics.g2d.element.IElement;\r
-import org.simantics.g2d.element.handler.LifeCycle;\r
-import org.simantics.g2d.element.handler.TextFont;\r
-import org.simantics.utils.ObjectUtils;\r
-\r
-/**\r
- * \r
- * @See {@link TextFont}\r
- * @author Marko Luukkainen\r
- */\r
-public class TextFontImpl implements TextFont, LifeCycle {\r
-\r
-    private static final long serialVersionUID = -6254972866736454459L;\r
-\r
-    public static TextFontImpl DEFAULT = new TextFontImpl();\r
-\r
-\r
-    public synchronized static TextFontImpl handlerOf(java.awt.Font f)\r
-    {\r
-        return new TextFontImpl(f);\r
-    }\r
-\r
-    java.awt.Font defaultFont;\r
-\r
-    public TextFontImpl() {\r
-        this.defaultFont = new Font("Arial", Font.PLAIN, 12);\r
-    }\r
-    public TextFontImpl(java.awt.Font defaultFont) {\r
-        this.defaultFont = defaultFont;\r
-    }\r
-\r
-    @Override\r
-    public java.awt.Font getFont(IElement e) {         \r
-        return e.getHint(ElementHints.KEY_FONT);\r
-    }\r
-\r
-    @Override\r
-    public void setFont(IElement e, java.awt.Font f) {\r
-        e.setHint(ElementHints.KEY_FONT, f);\r
-    }\r
-\r
-    @Override\r
-    public void onElementActivated(IDiagram d, IElement e) {\r
-    }\r
-    @Override\r
-    public void onElementCreated(IElement e) {\r
-        if (defaultFont!=null)\r
-            e.setHint(ElementHints.KEY_FONT, defaultFont);\r
-    }\r
-    @Override\r
-    public void onElementDeactivated(IDiagram d, IElement e) {\r
-    }\r
-    @Override\r
-    public void onElementDestroyed(IElement e) {\r
-    }\r
-\r
-    @Override\r
-    public int hashCode() {\r
-        return ObjectUtils.hashCode(defaultFont);\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
-        TextFontImpl other = (TextFontImpl) obj;\r
-        return ObjectUtils.objectEquals(defaultFont, other.defaultFont);\r
-    }\r
-}\r
+/*******************************************************************************
+ * Copyright (c) 2007, 2010 Association for Decentralized Information Management
+ * in Industry THTH ry.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     VTT Technical Research Centre of Finland - initial API and implementation
+ *******************************************************************************/
+package org.simantics.g2d.element.handler.impl;
+
+import java.awt.Font;
+
+import org.simantics.g2d.diagram.IDiagram;
+import org.simantics.g2d.element.ElementHints;
+import org.simantics.g2d.element.IElement;
+import org.simantics.g2d.element.handler.LifeCycle;
+import org.simantics.g2d.element.handler.TextFont;
+import org.simantics.utils.ObjectUtils;
+
+/**
+ * 
+ * @See {@link TextFont}
+ * @author Marko Luukkainen
+ */
+public class TextFontImpl implements TextFont, LifeCycle {
+
+    private static final long serialVersionUID = -6254972866736454459L;
+
+    public static TextFontImpl DEFAULT = new TextFontImpl();
+
+
+    public synchronized static TextFontImpl handlerOf(java.awt.Font f)
+    {
+        return new TextFontImpl(f);
+    }
+
+    java.awt.Font defaultFont;
+
+    public TextFontImpl() {
+        this.defaultFont = new Font("Arial", Font.PLAIN, 12);
+    }
+    public TextFontImpl(java.awt.Font defaultFont) {
+        this.defaultFont = defaultFont;
+    }
+
+    @Override
+    public java.awt.Font getFont(IElement e) {         
+        return e.getHint(ElementHints.KEY_FONT);
+    }
+
+    @Override
+    public void setFont(IElement e, java.awt.Font f) {
+        e.setHint(ElementHints.KEY_FONT, f);
+    }
+
+    @Override
+    public void onElementActivated(IDiagram d, IElement e) {
+    }
+    @Override
+    public void onElementCreated(IElement e) {
+        if (defaultFont!=null)
+            e.setHint(ElementHints.KEY_FONT, defaultFont);
+    }
+    @Override
+    public void onElementDeactivated(IDiagram d, IElement e) {
+    }
+    @Override
+    public void onElementDestroyed(IElement e) {
+    }
+
+    @Override
+    public int hashCode() {
+        return ObjectUtils.hashCode(defaultFont);
+    }
+    @Override
+    public boolean equals(Object obj) {
+        if (this == obj)
+            return true;
+        if (obj == null)
+            return false;
+        if (getClass() != obj.getClass())
+            return false;
+        TextFontImpl other = (TextFontImpl) obj;
+        return ObjectUtils.objectEquals(defaultFont, other.defaultFont);
+    }
+}