File Source: StepConfirm.java

         /* 
    P/P   *  Method: com.dmdirc.installer.ui.StepConfirm__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  import javax.swing.SwingUtilities;
    30  
    31  /**
    32   * This confirms the settings chosen in the previous step
    33   */
         /* 
    P/P   *  Method: TextLabel access$000(StepConfirm)
          * 
          *  Preconditions:
          *    x0 != null
          * 
          *  Postconditions:
          *    return_value == x0.infoLabel
          *    init'ed(return_value)
          */
    34  public final class StepConfirm extends SwingStep implements TextStep {
    35  
    36      /**
    37       * A version number for this class. It should be changed whenever the class
    38       * structure is changed (or anything else that would prevent serialized
    39       * objects being unserialized with the new class).
    40       */
    41      private static final long serialVersionUID = 2;
    42      /** Text area showing the install information */
    43      private final TextLabel infoLabel = new TextLabel("");
    44  
    45      /**
    46       * Creates a new instance of StepConfirm.
    47       */
    48      public StepConfirm() {
                 /* 
    P/P           *  Method: void com.dmdirc.installer.ui.StepConfirm()
                  * 
                  *  Postconditions:
                  *    this.infoLabel == &new TextLabel(StepConfirm#1)
                  *    new TextLabel(StepConfirm#1) num objects == 1
                  */
    49          super();
    50          setLayout(new BorderLayout());
    51          add(infoLabel, BorderLayout.CENTER);
    52      }
    53  
    54      /** {@inheritDoc} */
    55      @Override
    56      public String getStepName() {
                 /* 
    P/P           *  Method: String getStepName()
                  * 
                  *  Postconditions:
                  *    return_value == &"Confirm"
                  */
    57          return "Confirm";
    58      }
    59  
    60      /** {@inheritDoc} */
    61      @Override
    62      public Image getIcon() {
                 /* 
    P/P           *  Method: Image getIcon()
                  * 
                  *  Postconditions:
                  *    return_value == null
                  */
    63          return null;
    64      }
    65  
    66      /** {@inheritDoc} */
    67      @Override
    68      public String getStepDescription() {
                 /* 
    P/P           *  Method: String getStepDescription()
                  * 
                  *  Postconditions:
                  *    return_value == &""
                  */
    69          return "";
    70      }
    71  
    72      /** {@inheritDoc} */
    73      @Override
    74      public void addText(final String text) {
                 /* 
    P/P           *  Method: void addText(String)
                  */
    75          SwingUtilities.invokeLater(new Runnable() {
    76  
    77              @Override
    78              public void run() {
                         /* 
    P/P                   *  Method: void run()
                          * 
                          *  Preconditions:
                          *    this.infoLabel != null
                          */
    79                  infoLabel.setText(infoLabel.getText() + text);
    80              }
    81          });
    82      }
    83  
    84      /** {@inheritDoc} */
    85      @Override
    86      public void setText(final String text) {
                 /* 
    P/P           *  Method: void setText(String)
                  */
    87          SwingUtilities.invokeLater(new Runnable() {
    88  
    89              @Override
    90              public void run() {
                         /* 
    P/P                   *  Method: void run()
                          * 
                          *  Preconditions:
                          *    this.infoLabel != null
                          */
    91                  infoLabel.setText(text);
    92              }
    93          });
    94      }
    95  }








SofCheck Inspector Build Version : 2.17854
StepConfirm.java 2009-Jun-25 01:54:24
StepConfirm.class 2009-Sep-02 17:04:16
StepConfirm$1.class 2009-Sep-02 17:04:16
StepConfirm$2.class 2009-Sep-02 17:04:16