1 32 33 package it.businesslogic.ireport.gui.command; 34 35 import it.businesslogic.ireport.OperationType; 36 import it.businesslogic.ireport.ReportElement; 37 import it.businesslogic.ireport.TransformationType; 38 import java.awt.Point ; 39 40 43 public class FormatCommandSameSize extends FormatCommand { 44 { 45 operationType = OperationType.SAME_SIZE; 46 } 47 48 49 int width; 50 int height; 51 52 53 public void preparation() { 54 ReportElement re = ((ReportElement) this.getSelectedElements().firstElement()); 55 width = re.getWidth(); 56 height = re.getHeight(); 57 } 58 59 public void modify() { 60 re.trasform(new Point (width - re.getWidth(), height - re.height), TransformationType.TRANSFORMATION_RESIZE_SE); 61 } 62 63 } 64 | Popular Tags |