/* * To change this template, choose Tools | Templates * and open the template in the editor. */ /* * FirstTimeUserPanel.java * * Created on Apr 21, 2011, 8:26:15 AM */ package com.customfit.ctg.view.users; import com.customfit.ctg.controller.UserManagement; import com.customfit.ctg.view.SubPanel; /** * * @author David */ public class FirstTimeUserPanel extends SubPanel { /** Creates new form FirstTimeUserPanel */ public FirstTimeUserPanel() { initComponents(); } /** This method is called from within the constructor to * initialize the form. * WARNING: Do NOT modify this code. The content of this method is * always regenerated by the Form Editor. */ @SuppressWarnings("unchecked") // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents private void initComponents() { jLabelTitle = new javax.swing.JLabel(); jScrollPane2 = new javax.swing.JScrollPane(); jTextPane1 = new javax.swing.JTextPane(); linkLabelGetStarted = new com.customfit.ctg.view.LinkLabel(); jLabelTitle.setFont(new java.awt.Font("Tahoma", 3, 18)); jLabelTitle.setText("Getting Started"); jScrollPane2.setBorder(null); jTextPane1.setBackground(javax.swing.UIManager.getDefaults().getColor("control")); jTextPane1.setBorder(null); jTextPane1.setEditable(false); jTextPane1.setText("Welcome to the Cooking to Goal nutritional planner. This application will let you plan your upcoming meals so that you can try to reach your nutritional goals.\n\nIn the following page, you can set up your profile for the first time."); jTextPane1.setFocusable(false); jTextPane1.setMargin(new java.awt.Insets(0, 0, 0, 0)); jTextPane1.setOpaque(false); jTextPane1.setVerifyInputWhenFocusTarget(false); jScrollPane2.setViewportView(jTextPane1); linkLabelGetStarted.setText("Click here to get started."); linkLabelGetStarted.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { linkLabelGetStartedActionPerformed(evt); } }); javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this); this.setLayout(layout); layout.setHorizontalGroup( layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(layout.createSequentialGroup() .addContainerGap() .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(jScrollPane2, javax.swing.GroupLayout.DEFAULT_SIZE, 189, Short.MAX_VALUE) .addComponent(linkLabelGetStarted, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(jLabelTitle, javax.swing.GroupLayout.DEFAULT_SIZE, 189, Short.MAX_VALUE)) .addContainerGap()) ); layout.setVerticalGroup( layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(layout.createSequentialGroup() .addContainerGap() .addComponent(jLabelTitle) .addGap(18, 18, 18) .addComponent(jScrollPane2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addGap(18, 18, 18) .addComponent(linkLabelGetStarted, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) ); }// </editor-fold>//GEN-END:initComponents private void linkLabelGetStartedActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_linkLabelGetStartedActionPerformed //start user registration UserManagement.registerUser(); }//GEN-LAST:event_linkLabelGetStartedActionPerformed // Variables declaration - do not modify//GEN-BEGIN:variables private javax.swing.JLabel jLabelTitle; private javax.swing.JScrollPane jScrollPane2; private javax.swing.JTextPane jTextPane1; private com.customfit.ctg.view.LinkLabel linkLabelGetStarted; // End of variables declaration//GEN-END:variables /** * Extends SubPanel functionality by returning the title as being the * same as on the panel itself. * @return The title in the panel. */ @Override public String getTitle() { //grab title from on the panel return this.jLabelTitle.getText(); } }