1 32 33 package it.businesslogic.ireport.gui.command; 34 35 import it.businesslogic.ireport.OperationType; 36 import java.awt.Point ; 37 38 41 public class FormatCommandAlignToLeftMargin extends FormatCommand { 42 { 43 operationType = OperationType.ALIGN_TO_LEFT_MARGIN; 44 } 45 46 int leftMargin; 47 48 public void preparation() { 49 leftMargin = jrf.getReport().getLeftMargin(); 50 } 51 52 public void modify() { 53 54 55 if (re.getCell() != null) 56 { 57 re.setPosition(new Point (re.getCell().getLeft() + 10, re.getPosition().y)); 58 re.updateRelativePosition(); 59 60 } else 61 { 62 re.setPosition(new Point (leftMargin + 10, re.getPosition().y)); 63 } 64 } 65 66 } 67 | Popular Tags |