/**********************************************************************
- * 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;
* 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.
*/
if (fSdView.getContentsHeight() > fSdView.getContentsHeight()) {
return (int) (fSdView.getVisibleHeight() / (float) fTest / fSdView.fZoomValue);
}
- return (int) (super.getContentsHeight());
+ return super.getContentsHeight();
}
/*
if (fSdView.getVisibleWidth() > fSdView.getContentsWidth()) {
return (int) (fSdView.getVisibleWidth() / (float) fTest / fSdView.fZoomValue);
}
- return (int) (super.getContentsWidth());
+ return super.getContentsWidth();
}
/*
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;
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) {
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++;
}
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++;
}