001    package videoautomat.contentcreator;
002    
003    import sale.FormSheet;
004    import sale.FormSheetContentCreator;
005    import users.stdforms.LogOnForm;
006    import videoautomat.contentcreator.stdactions.StopAction;
007    import videoautomat.contentcreator.stdactions.TransitWithAction;
008    import videoautomat.transition.LogOnTransition;
009    
010    /**
011     * Content Creator to add action to <code>LogOnForm</code>'s buttons.
012     * @author Alexander Herrmann
013     *
014     */
015    public class LogOnLOFContentCreator extends FormSheetContentCreator {
016    
017        /**
018             * ID for Serialization.
019             */
020            private static final long serialVersionUID = 6985015395572645558L;
021    
022            /**
023         * Adds the needed actions to the <code>LogOnForm</code> buttons.
024         * @param fs - {@link sale.FormSheet} to be changed
025         */
026        protected void createFormSheetContent(FormSheet fs) {
027            fs.getButton(FormSheet.BTNID_OK).setAction(
028                    new TransitWithAction(new LogOnTransition((LogOnForm) fs)));
029            fs.getButton(FormSheet.BTNID_CANCEL).setAction(new StopAction());
030        }
031    
032    }