File Source: StepInstall.java
/*
P/P * Method: com.dmdirc.installer.ui.StepInstall__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.installer.ui;
24
25 import com.dmdirc.installer.TextStep;
26
27 import java.awt.BorderLayout;
28 import java.awt.Image;
29
30 import java.awt.Insets;
31 import javax.swing.JScrollPane;
32 import javax.swing.SwingUtilities;
33
34 /**
35 * This confirms the settings chosen in the previous step
36 */
/*
P/P * Method: TextLabel access$000(StepInstall)
*
* Preconditions:
* x0 != null
*
* Postconditions:
* return_value == x0.infoLabel
* init'ed(return_value)
*/
37 public final class StepInstall extends SwingStep implements TextStep {
38
39 /**
40 * A version number for this class. It should be changed whenever the class
41 * structure is changed (or anything else that would prevent serialized
42 * objects being unserialized with the new class).
43 */
44 private static final long serialVersionUID = 2;
45 /** Text area showing the install information */
46 private final TextLabel infoLabel = new TextLabel("Beginning Install");
47 /** Scroll pane holding text area */
48 final JScrollPane scrollPane;
49
50 /**
51 * Creates a new instance of StepInstall.
52 */
53 public StepInstall() {
/*
P/P * Method: void com.dmdirc.installer.ui.StepInstall()
*
* Postconditions:
* this.infoLabel == &new TextLabel(StepInstall#1)
* this.scrollPane == &new JScrollPane(StepInstall#3)
* new JScrollPane(StepInstall#3) num objects == 1
* new TextLabel(StepInstall#1) num objects == 1
*/
54 super();
55 setLayout(new BorderLayout());
56 scrollPane = new JScrollPane(infoLabel,
57 JScrollPane.VERTICAL_SCROLLBAR_AS_NEEDED,
58 JScrollPane.HORIZONTAL_SCROLLBAR_AS_NEEDED);
59 infoLabel.setMargin(new Insets(5, 5, 5, 5));
60 add(scrollPane, BorderLayout.CENTER);
61 }
62
63 /** {@inheritDoc} */
64 @Override
65 public String getStepName() {
/*
P/P * Method: String getStepName()
*
* Postconditions:
* return_value == &"Install"
*/
66 return "Install";
67 }
68
69 /** {@inheritDoc} */
70 @Override
71 public Image getIcon() {
/*
P/P * Method: Image getIcon()
*
* Postconditions:
* return_value == null
*/
72 return null;
73 }
74
75 /** {@inheritDoc} */
76 @Override
77 public String getStepDescription() {
/*
P/P * Method: String getStepDescription()
*
* Postconditions:
* return_value == &""
*/
78 return "";
79 }
80
81 /** {@inheritDoc} */
82 @Override
83 public synchronized void addText(final String text) {
/*
P/P * Method: void addText(String)
*/
84 SwingUtilities.invokeLater(new Runnable() {
85
86 @Override
87 public void run() {
/*
P/P * Method: void run()
*
* Preconditions:
* this.infoLabel != null
*/
88 infoLabel.setText(infoLabel.getText() + text + "\n");
89 }
90 });
91 }
92
93 /** {@inheritDoc} */
94 @Override
95 public synchronized void setText(final String text) {
/*
P/P * Method: void setText(String)
*/
96 SwingUtilities.invokeLater(new Runnable() {
97
98 @Override
99 public void run() {
/*
P/P * Method: void run()
*
* Preconditions:
* this.infoLabel != null
*/
100 infoLabel.setText(text);
101 }
102 });
103 }
104 }
SofCheck Inspector Build Version : 2.17854
| StepInstall.java |
2009-Jun-25 01:54:24 |
| StepInstall.class |
2009-Sep-02 17:04:16 |
| StepInstall$1.class |
2009-Sep-02 17:04:16 |
| StepInstall$2.class |
2009-Sep-02 17:04:16 |