1 32 33 package it.businesslogic.ireport.gui.command; 34 35 import it.businesslogic.ireport.Band; 36 import it.businesslogic.ireport.OperationType; 37 import it.businesslogic.ireport.ReportElement; 38 import java.awt.Point ; 39 import java.util.Enumeration ; 40 import java.util.Iterator ; 41 import java.util.Vector ; 42 43 44 48 public class FormatCommandIncreaseSpaceV extends FormatCommand { 49 { 50 operationType = OperationType.INCREASE_SPACE_V; 51 } 52 53 boolean preCondition(){ 54 return ( this.getSelectedElements().size() > 1); 55 } 56 57 void executeDeeper(){ 58 Vector bands = getBands(); for (Iterator h = bands.iterator(); h.hasNext(); ) { 60 Band b = (Band) h.next(); 61 Vector bandElements = getBandElements( b ); 62 bandElements = sortYX( bandElements.elements()); 63 bandElements.remove(0); 65 processElements(bandElements.elements()); 66 } 67 } 68 69 public void modify() { 70 re.setPosition(new Point (re.getPosition().x, 72 re.getPosition().y + 5 * (getCurrentElementPosition()+1) 73 )); 74 } 75 76 } 77 | Popular Tags |