001    package market.stdform;
002    
003    import javax.swing.JLabel;
004    import javax.swing.JPanel;
005    
006    import sale.FormSheet;
007    import sale.FormSheetContentCreator;
008    
009    /**
010     * This is the default FormSheet of the SPCustomer, it displays a short welcome-message.
011     */
012    public class FSCustomerDefault extends FormSheet{
013    
014        /**
015             * ID for serialization.
016             */
017            private static final long serialVersionUID = 2724307602307416882L;
018    
019            public FSCustomerDefault(){
020            super("Willkommen",
021                    new FormSheetContentCreator(){
022                                            private static final long serialVersionUID = -1871828005291990066L;
023                                            protected void createFormSheetContent(FormSheet fs) {
024                            JPanel jp = new JPanel();
025                            JLabel jl = new JLabel("<html><h1>Willkommen im Sohn & Sohn Großmarkt</h1>");
026                            jp.add(jl);
027                            fs.setComponent(jp);
028                            fs.removeAllButtons();
029                            fs.addButton("Einkaufen", ButtonIDs.BTN_BUY, null);
030                            fs.addButton("Persönliche Daten", ButtonIDs.BTN_EDIT,null);
031                        }
032                    },
033                    false);
034        }
035    }