tmf: Update copyright headers in tmf.ui
[deliverable/tracecompass.git] / org.eclipse.linuxtools.tmf.ui / src / org / eclipse / linuxtools / tmf / ui / views / uml2sd / core / ExecutionOccurrence.java
index d63f62359cfebe1aae41b0130ba3b5068bc7c1b3..9b343c63a862f719466522ea37451173e54cdb10 100755 (executable)
@@ -1,19 +1,18 @@
 /**********************************************************************
- * Copyright (c) 2005, 2006 IBM Corporation and others.
- * Copyright (c) 2011, 2012 Ericsson.
- * 
+ * Copyright (c) 2005, 2013 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.core.event.ITmfTimestamp;
+import org.eclipse.linuxtools.tmf.core.timestamp.ITmfTimestamp;
 import org.eclipse.linuxtools.tmf.ui.views.uml2sd.drawings.IColor;
 import org.eclipse.linuxtools.tmf.ui.views.uml2sd.drawings.IGC;
 import org.eclipse.linuxtools.tmf.ui.views.uml2sd.drawings.IImage;
@@ -23,11 +22,11 @@ import org.eclipse.linuxtools.tmf.ui.views.uml2sd.preferences.SDViewPref;
 /**
  * ExecutionOccurrence is the UML2 execution occurrence graphical representation. It is a BasicExecutionOccurrence on
  * which you can customize fill and/or.
- * 
+ *
  * @see org.eclipse.linuxtools.tmf.ui.views.uml2sd.core.Lifeline Lifeline for more event occurence details
- * @version 1.0 
+ * @version 1.0
  * @author sveyrier
- * 
+ *
  */
 public class ExecutionOccurrence extends BasicExecutionOccurrence implements ITimeRange {
 
@@ -35,7 +34,7 @@ public class ExecutionOccurrence extends BasicExecutionOccurrence implements ITi
     // Attributes
     // ------------------------------------------------------------------------
     /**
-     * Set the red, green and blue value of the optional color to be used for filling the execution occurrence. 
+     * Set the red, green and blue value of the optional color to be used for filling the execution occurrence.
      */
     protected int[] fFillRGB;
     /**
@@ -51,7 +50,7 @@ public class ExecutionOccurrence extends BasicExecutionOccurrence implements ITi
      */
     protected IImage fEllipsesImage;
     /**
-     *  The start time stamp. 
+     *  The start time stamp.
      */
     protected ITmfTimestamp fStartTime;
     /**
@@ -59,7 +58,7 @@ public class ExecutionOccurrence extends BasicExecutionOccurrence implements ITi
      */
     protected ITmfTimestamp fEndTime;
     /**
-     * Flag to indicate whether time information is available or not. 
+     * Flag to indicate whether time information is available or not.
      */
     protected boolean fHasTimeInfo;
 
@@ -83,7 +82,7 @@ public class ExecutionOccurrence extends BasicExecutionOccurrence implements ITi
 
     /**
      * Set the red, green and blue value of the optional color to be used for filling the execution occurrence.
-     * 
+     *
      * @param red A value for red.
      * @param green A green value for green.
      * @param blue A value blue.
@@ -97,7 +96,7 @@ public class ExecutionOccurrence extends BasicExecutionOccurrence implements ITi
 
     /**
      * Set the red, green and blue value of the optional color to be used for drawing the execution occurrence
-     * 
+     *
      * @param red A value for red.
      * @param green A green value for green.
      * @param blue A value blue.
@@ -111,7 +110,7 @@ public class ExecutionOccurrence extends BasicExecutionOccurrence implements ITi
 
     /**
      * Set the corresponding image.
-     * 
+     *
      * @param image A image to set.
      */
     public void setImage(IImage image) {
@@ -120,7 +119,7 @@ public class ExecutionOccurrence extends BasicExecutionOccurrence implements ITi
 
     /**
      * Set the top ellipses image.
-     * 
+     *
      * @param image A image to set.
      */
     public void setTopEllipsesImage(IImage image) {
@@ -129,11 +128,12 @@ public class ExecutionOccurrence extends BasicExecutionOccurrence implements ITi
 
     /**
      * Set the time when the execution occurrence starts.
-     * 
+     *
      * @param time the time when the execution occurrence starts
+     * @since 2.0
      */
     public void setStartTime(ITmfTimestamp time) {
-        fStartTime = time.clone();
+        fStartTime = time;
         fHasTimeInfo = true;
         if (fLifeline != null) {
             fLifeline.setTimeInfo(true);
@@ -142,29 +142,28 @@ public class ExecutionOccurrence extends BasicExecutionOccurrence implements ITi
 
     /**
      * Set the time when the execution occurrence ends.
-     * 
+     *
      * @param time the time when the execution occurrence ends
+     * @since 2.0
      */
     public void setEndTime(ITmfTimestamp time) {
-        fEndTime = time.clone();
+        fEndTime = time;
         fHasTimeInfo = true;
         if (fLifeline != null) {
             fLifeline.setTimeInfo(true);
         }
     }
 
-    /*
-     * (non-Javadoc)
-     * @see org.eclipse.linuxtools.tmf.ui.views.uml2sd.core.ITimeRange#getStartTime()
+    /**
+     * @since 2.0
      */
     @Override
     public ITmfTimestamp getStartTime() {
         return fStartTime;
     }
 
-    /*
-     * (non-Javadoc)
-     * @see org.eclipse.linuxtools.tmf.ui.views.uml2sd.core.ITimeRange#getEndTime()
+    /**
+     * @since 2.0
      */
     @Override
     public ITmfTimestamp getEndTime() {
@@ -216,9 +215,8 @@ public class ExecutionOccurrence extends BasicExecutionOccurrence implements ITi
                 context.setBackground(tempFillColor);
             }
             return tempFillColor;
-        } else {
-            return super.setUnselectedFillColor(context);
         }
+        return super.setUnselectedFillColor(context);
     }
 
     /*
@@ -231,8 +229,7 @@ public class ExecutionOccurrence extends BasicExecutionOccurrence implements ITi
             IColor tempStrokeColor = context.createColor(fStrokeRGB[0], fStrokeRGB[1], fStrokeRGB[2]);
             context.setForeground(tempStrokeColor);
             return tempStrokeColor;
-        } else {
-            return super.setUnselectedStrokeColor(context);
         }
+        return super.setUnselectedStrokeColor(context);
     }
 }
This page took 0.026577 seconds and 5 git commands to generate.