1   /**
2    * QJ-Pro
3    * Copyright (c) 2004, http://qjpro.sourceforge.net
4    *
5    * This program is free software; you can redistribute it and/or modify it
6    * under the terms of the GNU General Public License as published by the
7    * Free Software Foundation; either version 2 of the License, or
8    * (at your option) any later version.
9    *
10   * This program is distributed in the hope that it will be useful, but WITHOUT
11   * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
12   * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
13   * details.
14   *
15   * You should have received a copy of the GNU General Public License along with
16   * this program; if not, write to the Free Software Foundation, Inc.,
17   * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
18   */
19  package com.qasystems.qstudio.java.gui.dialog;
20  
21  import com.qasystems.international.MessageResource;
22  import com.qasystems.qstudio.java.QStudioGlobal;
23  import com.qasystems.qstudio.java.browser.BrowserHelpContext;
24  
25  import javax.swing.JLabel;
26  import javax.swing.JPanel;
27  
28  /**
29   * An incomplete analysis dialog with context help button
30   */
31  public class IncompleteAnalysisDialog extends HelpButtonDialog {
32    /**
33     * Constructor
34     */
35    public IncompleteAnalysisDialog() {
36      super(new QStudioGlobal().getFrame());
37      createGui();
38      setHelpContext();
39    }
40  
41    /**
42     * Create gui objects
43     */
44    protected void createGui() {
45      final MessageResource resources = MessageResource.getClientInstance();
46      final String[] buttons = { resources.getString("BUTTON_005") };
47  
48      setModal(true);
49      setTitle(resources.getString("WINDOWTITLE_001"));
50      final JPanel panel = new JPanel();
51      final JLabel lMessage = new JLabel(resources.getString("MESSAGE_180"));
52      panel.add(lMessage);
53      setContent(panel);
54      setButtons(buttons);
55      pack();
56    }
57  
58    /**
59     * Set the helpcontext
60     */
61    private void setHelpContext() {
62      final BrowserHelpContext helpContext = new BrowserHelpContext();
63      helpContext.setContext(BrowserHelpContext.HELP);
64      helpContext.setTutorial("IncompleteAnalysis");
65      setHelpContext(helpContext);
66    }
67  }
68