1 32 33 package it.businesslogic.ireport.gui.command; 34 35 import it.businesslogic.ireport.OperationType; 36 import it.businesslogic.ireport.ReportElement; 37 38 import java.awt.Point ; 39 40 41 public class FormatCommandAlignBottom 42 extends FormatCommand { 43 FormatCommandAlignBottom() { 44 operationType = OperationType.ALIGN_TOP; 45 } 46 47 int bottom; 48 49 51 52 55 void preparation() { 56 bottom = ((ReportElement)this.getSelectedElements().firstElement()).getPosition().y + 57 ((ReportElement)this.getSelectedElements().firstElement()).height; 58 59 } 60 61 64 void modify() { 65 re.setPosition(new Point (re.getPosition().x, bottom - re.height)); 66 } 67 68 73 void setBottom(int bottom) { 74 this.bottom = bottom; 75 } 76 77 82 int getBottom() { 83 84 return bottom; 85 } 86 } 87 | Popular Tags |