001    package videoautomat.contentcreator;
002    
003    import sale.FormSheet;
004    import sale.FormSheetContentCreator;
005    import videoautomat.contentcreator.stdactions.RollBackAction;
006    import videoautomat.contentcreator.stdactions.TransitWithAction;
007    import videoautomat.transition.HandBackCalculateSumTransition;
008    
009    /**
010     * Content creator to add the giveback and cancel buttons and there actions.
011     * @author Alexander Herrmann
012     *
013     */
014    public class HandBackTTFSContentCreator extends FormSheetContentCreator {
015    
016        /**
017             * ID for Serialization.
018             */
019            private static final long serialVersionUID = 8768958675610872031L;
020    
021            /**
022         * Add GiveBack and Cancel Buttons to the FormSheet.
023         * @param fs <code>FormSheet</code> to be changed
024         */
025        protected void createFormSheetContent(FormSheet fs) {
026            fs.removeAllButtons();
027            fs.addButton("Give back", 1, new TransitWithAction(new HandBackCalculateSumTransition()));
028                    fs.addButton("Cancel", 2, new RollBackAction());
029        }
030        
031    }