tmf: Update copyright headers in tmf.ui
[deliverable/tracecompass.git] / org.eclipse.linuxtools.tmf.ui / src / org / eclipse / linuxtools / tmf / ui / views / uml2sd / dialogs / SDPrintDialogUI.java
index 8eca2b14760a1226aa9f99391c7df0aafe5e168a..261ca3cadd3701abf91c612f87b53d48112b0974 100755 (executable)
@@ -1,16 +1,15 @@
 /**********************************************************************
- * Copyright (c) 2005, 2008 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
+ *     IBM - Initial API and implementation
+ *     Bernd Hufmann - Updated for TMF
  **********************************************************************/
+
 package org.eclipse.linuxtools.tmf.ui.views.uml2sd.dialogs;
 
 import java.text.MessageFormat;
@@ -143,10 +142,27 @@ public class SDPrintDialogUI {
      * List of pages to print.
      */
     protected int fPagesList[];
+
     /**
-     * Values for dividing sequence diagram into pages.
+     * Value for dividing the sequence diagram into pages
      */
-    protected float fStepX, fStepY, sTX, sTY;
+    protected float fStepX;
+
+    /**
+     * Value for dividing the sequence diagram into pages
+     */
+    protected float fStepY;
+
+    /**
+     * Value for dividing the sequence diagram into pages
+     */
+    protected float sTX;
+
+    /**
+     * Value for dividing the sequence diagram into pages
+     */
+    protected float sTY;
+
     /**
      * Page which to print from.
      */
@@ -255,7 +271,7 @@ public class SDPrintDialogUI {
             if (fSdView.getContentsHeight() > fSdView.getContentsHeight()) {
                 return (int) (fSdView.getVisibleHeight() / (float) fTest / fSdView.fZoomValue);
             }
-            return (int) (super.getContentsHeight());
+            return super.getContentsHeight();
         }
 
         /*
@@ -267,7 +283,7 @@ public class SDPrintDialogUI {
             if (fSdView.getVisibleWidth() > fSdView.getContentsWidth()) {
                 return (int) (fSdView.getVisibleWidth() / (float) fTest / fSdView.fZoomValue);
             }
-            return (int) (super.getContentsWidth());
+            return super.getContentsWidth();
         }
 
         /*
@@ -1139,20 +1155,20 @@ public class SDPrintDialogUI {
                 Printer printer = new Printer(fPrinterData);
                 if (fSetHPagesNumber.getSelection()) {
                     fNbPages = Integer.valueOf(fHorPagesNum.getText()).intValue();
-                    float z1 = (float) fSdView.getContentsWidth() / (cw);
+                    float z1 = fSdView.getContentsWidth() / cw;
                     float z2 = printer.getClientArea().width / ((float) fSdView.getContentsWidth() / fNbPages);
 
                     fStepY = printer.getClientArea().height / z1 / z2;
                     fStepX = cw / fNbPages;
                 } else if (fSetVPagesNumber.getSelection()) {
                     fNbPages = Integer.valueOf(fVertPagesNum.getText()).intValue();
-                    float z1 = (float) fSdView.getContentsHeight() / (ch);
+                    float z1 = fSdView.getContentsHeight() / ch;
                     float z2 = printer.getClientArea().height / ((float) fSdView.getContentsHeight() / fNbPages);
                     fStepX = printer.getClientArea().width / z1 / z2;
                     fStepY = ch / fNbPages;
                 } else {
                     float z1 = fSdView.getContentsWidth() / (cw);
-                    fStepX = ((float) fSdView.getVisibleWidth() / z1);
+                    fStepX = fSdView.getVisibleWidth() / z1;
                     fNbPages = Math.round(cw / fStepX);
                     if (fNbPages == 0) {
                         fNbPages = 1;
@@ -1160,7 +1176,7 @@ public class SDPrintDialogUI {
                     int pw = printer.getClientArea().width;
                     int ph = printer.getClientArea().height;
                     float z2 = pw / ((float) fSdView.getContentsWidth() / fNbPages);
-                    fStepY = ((float) ph / z1 / z2);
+                    fStepY = ph / z1 / z2;
                 }
             }
         } catch (NumberFormatException e) {
@@ -1235,7 +1251,7 @@ public class SDPrintDialogUI {
             if (fStepX != 0) {
                 row = (int) (cw / fStepX);
                 if (fSetHPagesNumber.getSelection()) {
-                    row = Math.round((float) cw / fStepX);
+                    row = Math.round(cw / fStepX);
                 } else if ((cw % fStepX != 0)) {
                     row++;
                 }
@@ -1257,7 +1273,7 @@ public class SDPrintDialogUI {
             if (fStepY != 0) {
                 line = (int) (ch / fStepY);
                 if (fSetVPagesNumber.getSelection()) {
-                    line = Math.round((float) ch / fStepY);
+                    line = Math.round(ch / fStepY);
                 } else if (ch % fStepY != 0) {
                     line++;
                 }
This page took 0.025154 seconds and 5 git commands to generate.