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

package it.businesslogic.ireport.gui.command;

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

/**
 *
 */
public class FormatCommandAlignCenterHorizontally extends FormatCommand {
    {
        operationType = OperationType.ALIGN_CENTER_HORIZONTALLY; 
    }
    
    int center;
    
    
    public void preparation() {
        center = 10 + jrf.getReport().getWidth()/2;
    }
    
    public void modify() {
        re.setPosition(new Point(center - (re.getWidth() / 2), re.getPosition().y));
    }
    
}
