001    package videoautomat.contentcreator;
002    import sale.FormSheet;
003    import sale.FormSheetContentCreator;
004    import videoautomat.contentcreator.stdactions.RollBackAction;
005    import videoautomat.contentcreator.stdactions.TransitWithAction;
006    import videoautomat.transition.RentSumUpTransition;
007    
008    /**
009     * Content creator which adds rent, cancel button and there actions to the given formsheet
010     *
011     * @author Tobias Ruch 
012     */
013    public class RentTTFSContentCreator extends FormSheetContentCreator {
014    
015       /**
016            * ID for Serialization.
017            */
018       private static final long serialVersionUID = 2068978338716582033L;
019    
020       /**
021        * Adds buttons and actions
022        * @param fs - <code>FormSheet</code> which sould be changed
023        */
024       protected void createFormSheetContent(FormSheet fs) {
025            
026            fs.removeAllButtons();
027    
028            fs.addButton("Rent", 1, new TransitWithAction(new RentSumUpTransition()));
029            fs.addButton("Cancel", 2, new RollBackAction());
030       }
031    }