tmf: Update copyright headers in tmf.ui
[deliverable/tracecompass.git] / org.eclipse.linuxtools.tmf.ui / src / org / eclipse / linuxtools / tmf / ui / views / uml2sd / core / SyncMessageReturn.java
index 7330d139d563c28ac7c1aa0dc5f63d61fac1aef4..30ee55a5a9e3e2b7410cc18215fbb090490c4cfa 100755 (executable)
@@ -1,20 +1,20 @@
 /**********************************************************************
- * Copyright (c) 2005, 2006 IBM Corporation and others.
- * Copyright (c) 2011, 2012 Ericsson.
- * 
+ * Copyright (c) 2005, 2012 IBM Corporation, Ericsson
  * 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: 
- * IBM - Initial API and implementation
- * Bernd Hufmann - Updated for TMF
+ *
+ * Contributors:
+ *     IBM - Initial API and implementation
+ *     Bernd Hufmann - Updated for TMF
  **********************************************************************/
+
 package org.eclipse.linuxtools.tmf.ui.views.uml2sd.core;
 
 import org.eclipse.linuxtools.tmf.ui.views.uml2sd.drawings.IGC;
 import org.eclipse.linuxtools.tmf.ui.views.uml2sd.preferences.ISDPreferences;
+import org.eclipse.linuxtools.tmf.ui.views.uml2sd.preferences.SDViewPref;
 
 /**
  * The message return graph node implementation.<br>
@@ -24,12 +24,12 @@ import org.eclipse.linuxtools.tmf.ui.views.uml2sd.preferences.ISDPreferences;
  * <br>
  * WARNING: The association validity is not checked, it is not necessary to provide a valid association, not even needed
  * to set an association to drawn a message with a message return style.<br>
- * 
- * 
+ *
+ *
  * @see org.eclipse.linuxtools.tmf.ui.views.uml2sd.core.SyncMessage SyncMessage for usage example
  * @version 1.0
  * @author sveyrier
- * 
+ *
  */
 public class SyncMessageReturn extends SyncMessage {
 
@@ -40,7 +40,7 @@ public class SyncMessageReturn extends SyncMessage {
      * The graphNode ID
      */
     public static final String SYNC_MESS_RET_TAG = "SyncMessageRet"; //$NON-NLS-1$
-    
+
     // ------------------------------------------------------------------------
     // Attributes
     // ------------------------------------------------------------------------
@@ -52,7 +52,7 @@ public class SyncMessageReturn extends SyncMessage {
     // ------------------------------------------------------------------------
     // Constractors
     // ------------------------------------------------------------------------
-    
+
     /**
      * Default constructor
      */
@@ -67,7 +67,7 @@ public class SyncMessageReturn extends SyncMessage {
      * Set the associated message (the message it is the return).<br>
      * Setting the association will activate the navigation in the default sequence diagram implementation to the
      * message when the user right click on this message return.<br>
-     * 
+     *
      * @param parentMessage the message to associate
      */
     public void setMessage(SyncMessage parentMessage) {
@@ -77,7 +77,7 @@ public class SyncMessageReturn extends SyncMessage {
 
     /**
      * Returns the syncMessage associated to this SyncMessageReturn
-     * 
+     *
      * @return the associated message
      */
     public SyncMessage getMessage() {
@@ -93,13 +93,16 @@ public class SyncMessageReturn extends SyncMessage {
         if (!isVisible()) {
             return;
         }
+
+        ISDPreferences pref = SDViewPref.getInstance();
+
         int oldStyle = context.getLineStyle();
         // Message return are dashed
         context.setLineStyle(context.getLineDotStyle());
         // Draw it selected?
         if (!isSelected()) {
-            context.setBackground(Frame.getUserPref().getBackGroundColor(fPrefId));
-            context.setForeground(Frame.getUserPref().getForeGroundColor(fPrefId));
+            context.setBackground(pref.getBackGroundColor(fPrefId));
+            context.setForeground(pref.getForeGroundColor(fPrefId));
         }
         super.draw(context);
         // restore the context
This page took 0.025359 seconds and 5 git commands to generate.