1 32 33 package it.businesslogic.ireport.gui.command; 34 35 import it.businesslogic.ireport.Band; 36 import it.businesslogic.ireport.OperationType; 37 import it.businesslogic.ireport.ReportElement; 38 import java.awt.Point ; 39 import java.util.Iterator ; 40 import java.util.Vector ; 41 42 52 public class FormatCommandMoveToLeftMargin extends FormatCommand { 53 54 { 55 operationType = OperationType.MOVE_TO_LEFT_MARGIN; 56 } 57 int deltaLeft = 0; 58 59 void executeDeeper() { 60 61 Vector bands = getBands(); for (Iterator h = bands.iterator(); h.hasNext(); ) { 63 Band b = (Band) h.next(); 64 Vector bandElements = getBandElements( b ); 65 bandElements = sortXY( bandElements.elements()); 66 67 ReportElement re = (ReportElement) bandElements.elementAt(0); 68 deltaLeft = re.getPosition().x - jrf.getReport().getLeftMargin(); 69 70 processElements(bandElements.elements()); 71 } 72 73 } 74 75 public void modify() { 76 re.setPosition(new Point (re.getPosition().x + 10 - deltaLeft, re.getPosition().y)); 77 } 78 79 } 80 | Popular Tags |