1 32 33 package it.businesslogic.ireport.gui.command; 34 35 import it.businesslogic.ireport.OperationType; 36 import it.businesslogic.ireport.crosstab.CrosstabCell; 37 import java.awt.Point ; 38 39 42 public class FormatCommandCenterInBandV extends FormatCommand { 43 { 44 operationType = OperationType.CENTER_IN_BAND_V; 45 } 46 47 void modify() { 48 49 if (re.getBand() == null) { 51 CrosstabCell cell = re.getCell(); 52 int centery = cell.getTop() + 10 + (cell.getHeight()/2); 53 54 re.setPosition(new Point (re.getPosition().x, centery-(re.getHeight()/2))); 55 re.updateRelativePosition(); 56 } 57 else 58 { 59 int centery = jrf.getReport().getBandYLocation(re.getBand()) + 10 + re.getBand().getHeight()/2 ; 60 re.setPosition(new Point (re.getPosition().x, centery-(re.getHeight()/2))); 61 } 62 63 } 64 65 } 66 | Popular Tags |