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 FormatCommandSameWidthMax extends FormatCommand { 46 { 47 operationType = OperationType.SAME_WIDTH_MAX; 48 } 49 50 int width; 51 52 53 public void preparation() { 54 width = 0; 55 ReportElement re = null; 56 Enumeration enum2 = this.getSelectedElements().elements(); 57 while (enum2.hasMoreElements()) { 58 re = (ReportElement)enum2.nextElement(); 59 if ( width <= re.getWidth()) { 60 width = re.getWidth(); 61 } 62 } 63 } 64 65 public void modify() { 66 re.trasform(new Point (width - re.getWidth(),0), TransformationType.TRANSFORMATION_RESIZE_SE); 67 } 68 69 } 70 | Popular Tags |