1 32 33 package it.businesslogic.ireport.gui.command; 34 35 import it.businesslogic.ireport.OperationType; 36 import it.businesslogic.ireport.ReportElement; 37 import java.awt.Point ; 38 39 42 public class FormatCommandAlignRight extends FormatCommand { 43 { 44 operationType = OperationType.ALIGN_TOP; 45 } 46 47 int right; 48 50 public void preparation() { 51 right = ((ReportElement) this.getSelectedElements().firstElement()).getPosition().x + 52 ((ReportElement) this.getSelectedElements().firstElement()).getWidth(); 53 54 } 55 56 public void modify() { 57 re.setPosition(new Point (right-re.getWidth(), re.getPosition().y)); 58 } 59 60 } 61 | Popular Tags |