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 39 import java.awt.Point ; 40 import java.util.Enumeration ; 41 42 45 public class FormatCommandSameHeightMax extends FormatCommand { 46 { 47 operationType = OperationType.SAME_HEIGHT_MAX; 48 } 49 int height; 50 51 52 public void preparation() { 53 height = 0; 54 ReportElement re = null; 55 Enumeration enum2 = this.getSelectedElements().elements(); 56 while (enum2.hasMoreElements()) { 57 re = (ReportElement)enum2.nextElement(); 58 if (height <= re.getHeight()) { 59 height = re.getHeight(); 60 } 61 } 62 } 63 64 public void modify() { 65 re.trasform(new Point (0,height-re.height), TransformationType.TRANSFORMATION_RESIZE_SE); 66 } 67 68 } 69 | Popular Tags |