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 FormatCommandElementMaximizeH extends FormatCommand { 44 { 46 operationType = OperationType.ELEMENT_MAXIMIZE_H; 47 } 48 49 void executeDeeper() { 50 51 resetEnumeration(); 52 53 registerElements(); 57 sleepUndo = true; 58 59 getCommand(OperationType.ALIGN_TO_LEFT_MARGIN).execute(); 60 int insideWidth = jrf.getReport().getWidth() - jrf.getReport().getRightMargin() - jrf.getReport().getLeftMargin() ; 61 62 resetEnumeration(); 64 while (e.hasMoreElements()) { 65 re = (ReportElement) e.nextElement(); 66 67 if (re.getCell() != null) 68 { 69 re.setWidth(re.getCell().getWidth()); 70 re.updateBounds(); 72 73 } 74 else 75 { 76 re.setWidth( insideWidth ); 77 re.updateBounds(); 79 } 80 } 81 82 updateElements(); 83 84 sleepUndo = false; 85 } 86 87 } 88 | Popular Tags |