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 FormatCommandAlignVerticalAxis extends FormatCommand { 43 44 { 45 operationType = OperationType.ALIGN_VERTICAL_AXIS; 46 } 47 int center; 48 49 public void preparation() { 50 ReportElement re = (ReportElement) this.getSelectedElements().firstElement(); 51 center = re.getPosition().x + (re.getWidth()/2); 52 53 } 54 55 public void modify() { 56 re.setPosition(new Point (center-(re.getWidth()/2), re.getPosition().y)); 57 } 58 59 } 60 | Popular Tags |