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 FormatCommandAlignCenterHorizontally extends FormatCommand { 42 { 43 operationType = OperationType.ALIGN_CENTER_HORIZONTALLY; 44 } 45 46 int center; 47 48 49 public void preparation() { 50 center = 10 + jrf.getReport().getWidth()/2; 51 } 52 53 public void modify() { 54 re.setPosition(new Point (center - (re.getWidth() / 2), re.getPosition().y)); 55 } 56 57 } 58 | Popular Tags |