/*
 * FormatCommandAlignTop.java
 *
 * Created on 9 mei 2005, 21:36
 */

package it.businesslogic.ireport.gui.command;

import it.businesslogic.ireport.OperationType;
import it.businesslogic.ireport.ReportElement;
import java.awt.Point;

/**
 *
 */
public class FormatCommandAlignTop extends FormatCommand {
    {
        operationType = OperationType.ALIGN_TOP;
    }
    int top;
    // Preparation is called before the while loop
    
    public void preparation() {
        top = ((ReportElement) jrf.getSelectedElements().firstElement()).getPosition().y;
    }
    
    public void modify() {
        re.setPosition(new Point(re.getPosition().x, top));
    }
    
}
