/*
 * FormatCommandAlignToRightMargin.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 FormatCommandAlignToRightMargin extends FormatCommand {
    {
        operationType = OperationType.ALIGN_TO_RIGHT_MARGIN;
    }
    
    int rightMargin;
    
    public void preparation() {
        rightMargin = jrf.getReport().getRightMargin();
    }
    
    public void modify() {
        re.setPosition( new Point( jrf.getReport().getWidth() - rightMargin-re.getWidth()+ 10,
                re.getPosition().y));
        
    }
    
}
