File Source: ExtractionStep.java
/*
P/P * Method: com.dmdirc.addons.ui_swing.wizard.firstrun.ExtractionStep__static_init
*/
1 /*
2 * Copyright (c) 2006-2009 Chris Smith, Shane Mc Cormack, Gregory Holmes
3 *
4 * Permission is hereby granted, free of charge, to any person obtaining a copy
5 * of this software and associated documentation files (the "Software"), to deal
6 * in the Software without restriction, including without limitation the rights
7 * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
8 * copies of the Software, and to permit persons to whom the Software is
9 * furnished to do so, subject to the following conditions:
10 *
11 * The above copyright notice and this permission notice shall be included in
12 * all copies or substantial portions of the Software.
13 *
14 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
17 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
19 * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
20 * SOFTWARE.
21 */
22
23 package com.dmdirc.addons.ui_swing.wizard.firstrun;
24
25 import com.dmdirc.addons.ui_swing.wizard.Step;
26
27 import javax.swing.JCheckBox;
28
29 /**
30 * Queries the user for which core actions they wish to extract.
31 */
32 public abstract class ExtractionStep extends Step {
33
34 /** Plugins checkbox. */
35 protected final JCheckBox plugins;
36 /** Actions checkbox. */
37 protected final JCheckBox actions;
38
39 /** Creates a new instance of StepOne. */
40 public ExtractionStep() {
/*
P/P * Method: void com.dmdirc.addons.ui_swing.wizard.firstrun.ExtractionStep()
*
* Postconditions:
* this.actions == &new JCheckBox(ExtractionStep#2)
* this.plugins == &new JCheckBox(ExtractionStep#1)
* new JCheckBox(ExtractionStep#1) num objects == 1
* new JCheckBox(ExtractionStep#2) num objects == 1
*/
41 super();
42
43 plugins = new JCheckBox("Install core plugins?");
44 actions = new JCheckBox("Install core actions?");
45
46 plugins.setSelected(true);
47 actions.setSelected(true);
48
49 initComponents();
50 }
51
52 /**
53 * Initialises the components.
54 */
55 protected abstract void initComponents();
56
57 /**
58 * Returns the state of the plugins checkbox.
59 *
60 * @return Plugins checkbox state
61 */
62 public final boolean getPluginsState() {
/*
P/P * Method: bool getPluginsState()
*
* Preconditions:
* this.plugins != null
*
* Postconditions:
* init'ed(return_value)
*/
63 return plugins.isSelected();
64 }
65
66 /**
67 * Returns the state of the actions checkbox.
68 *
69 * @return Actions checkbox state
70 */
71 public final boolean getActionsState() {
/*
P/P * Method: bool getActionsState()
*
* Preconditions:
* this.actions != null
*
* Postconditions:
* init'ed(return_value)
*/
72 return actions.isSelected();
73 }
74
75 /** {@inheritDoc} */
76 @Override
77 public String getTitle() {
/*
P/P * Method: String getTitle()
*
* Postconditions:
* return_value == &"Core addon extraction"
*/
78 return "Core addon extraction";
79 }
80
81 }
SofCheck Inspector Build Version : 2.17854
| ExtractionStep.java |
2009-Jun-25 01:54:24 |
| ExtractionStep.class |
2009-Sep-02 17:04:16 |