//# 4 errors, 532 messages
//#
/*
    //#StepLayout.java:1:1: class: com.dmdirc.installer.ui.StepLayout
    //#StepLayout.java:1:1: method: com.dmdirc.installer.ui.StepLayout.com.dmdirc.installer.ui.StepLayout__static_init
 * Copyright (c) 2006-2009 Chris Smith, Shane Mc Cormack, Gregory Holmes
 *
 * Permission is hereby granted, free of charge, to any person obtaining a copy
 * of this software and associated documentation files (the "Software"), to deal
 * in the Software without restriction, including without limitation the rights
 * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
 * copies of the Software, and to permit persons to whom the Software is
 * furnished to do so, subject to the following conditions:
 *
 * The above copyright notice and this permission notice shall be included in
 * all copies or substantial portions of the Software.
 *
 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
 * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
 * SOFTWARE.
 */

package com.dmdirc.installer.ui;

import com.dmdirc.installer.Step;

import java.awt.Component;
import java.awt.Container;
import java.awt.Dimension;
import java.awt.Insets;
import java.awt.LayoutManager2;
import java.io.Serializable;
import java.util.ArrayList;
import java.util.List;

/**
 * Adjusted Card layout.
 */
public class StepLayout implements LayoutManager2, Serializable {

    /**
     * A version number for this class. It should be changed whenever the class
     * structure is changed (or anything else that would prevent serialized
     * objects being unserialized with the new class).
     */
    private static final long serialVersionUID = 2;
    /** Parent container. */
    private Container parent;
    /** Cards vector. */
    private final List<SwingStep> steps;
    /** Current step. */
    private int currentStep;
    /** Vertical gap. */
    private int vGap;
    /** Horiontal gap. */
    private int hGap;

    /**
     * Instantiates a new step layout.
     */
    public StepLayout() {
        this(0, 0);
    //#StepLayout.java:62: method: void com.dmdirc.installer.ui.StepLayout.com.dmdirc.installer.ui.StepLayout()
    //#input(void com.dmdirc.installer.ui.StepLayout()): this
    //#output(void com.dmdirc.installer.ui.StepLayout()): new ArrayList(StepLayout#1) num objects
    //#output(void com.dmdirc.installer.ui.StepLayout()): this.currentStep
    //#output(void com.dmdirc.installer.ui.StepLayout()): this.hGap
    //#output(void com.dmdirc.installer.ui.StepLayout()): this.parent
    //#output(void com.dmdirc.installer.ui.StepLayout()): this.steps
    //#output(void com.dmdirc.installer.ui.StepLayout()): this.vGap
    //#new obj(void com.dmdirc.installer.ui.StepLayout()): new ArrayList(StepLayout#1)
    //#post(void com.dmdirc.installer.ui.StepLayout()): this.currentStep == -1
    //#post(void com.dmdirc.installer.ui.StepLayout()): this.hGap == 0
    //#post(void com.dmdirc.installer.ui.StepLayout()): this.vGap == 0
    //#post(void com.dmdirc.installer.ui.StepLayout()): this.parent == null
    //#post(void com.dmdirc.installer.ui.StepLayout()): this.steps == &new ArrayList(StepLayout#1)
    //#post(void com.dmdirc.installer.ui.StepLayout()): new ArrayList(StepLayout#1) num objects == 1
    //#unanalyzed(void com.dmdirc.installer.ui.StepLayout()): Effects-of-calling:java.util.ArrayList
    }
    //#StepLayout.java:63: end of method: void com.dmdirc.installer.ui.StepLayout.com.dmdirc.installer.ui.StepLayout()

    /**
     * Instantiates a new step layout.
     * 
     * @param parent Parent component
     */
    public StepLayout(final Container parent) {
        this(0, 0, parent);
    //#StepLayout.java:71: method: void com.dmdirc.installer.ui.StepLayout.com.dmdirc.installer.ui.StepLayout(Container)
    //#input(void com.dmdirc.installer.ui.StepLayout(Container)): parent
    //#input(void com.dmdirc.installer.ui.StepLayout(Container)): this
    //#output(void com.dmdirc.installer.ui.StepLayout(Container)): new ArrayList(StepLayout#1) num objects
    //#output(void com.dmdirc.installer.ui.StepLayout(Container)): this.currentStep
    //#output(void com.dmdirc.installer.ui.StepLayout(Container)): this.hGap
    //#output(void com.dmdirc.installer.ui.StepLayout(Container)): this.parent
    //#output(void com.dmdirc.installer.ui.StepLayout(Container)): this.steps
    //#output(void com.dmdirc.installer.ui.StepLayout(Container)): this.vGap
    //#new obj(void com.dmdirc.installer.ui.StepLayout(Container)): new ArrayList(StepLayout#1)
    //#post(void com.dmdirc.installer.ui.StepLayout(Container)): this.currentStep == -1
    //#post(void com.dmdirc.installer.ui.StepLayout(Container)): this.hGap == 0
    //#post(void com.dmdirc.installer.ui.StepLayout(Container)): this.vGap == 0
    //#post(void com.dmdirc.installer.ui.StepLayout(Container)): this.parent == parent
    //#post(void com.dmdirc.installer.ui.StepLayout(Container)): init'ed(this.parent)
    //#post(void com.dmdirc.installer.ui.StepLayout(Container)): this.steps == &new ArrayList(StepLayout#1)
    //#post(void com.dmdirc.installer.ui.StepLayout(Container)): new ArrayList(StepLayout#1) num objects == 1
    //#unanalyzed(void com.dmdirc.installer.ui.StepLayout(Container)): Effects-of-calling:java.util.ArrayList
    }
    //#StepLayout.java:72: end of method: void com.dmdirc.installer.ui.StepLayout.com.dmdirc.installer.ui.StepLayout(Container)

    /**
     * Instantiates a new step layout with the specified gaps.
     * 
     * @param hGap Horizontal gap
     * @param vGap Vertical gap
     */
    public StepLayout(final int hGap, final int vGap) {
        this(hGap, vGap, null);
    //#StepLayout.java:81: method: void com.dmdirc.installer.ui.StepLayout.com.dmdirc.installer.ui.StepLayout(int, int)
    //#input(void com.dmdirc.installer.ui.StepLayout(int, int)): hGap
    //#input(void com.dmdirc.installer.ui.StepLayout(int, int)): this
    //#input(void com.dmdirc.installer.ui.StepLayout(int, int)): vGap
    //#output(void com.dmdirc.installer.ui.StepLayout(int, int)): new ArrayList(StepLayout#1) num objects
    //#output(void com.dmdirc.installer.ui.StepLayout(int, int)): this.currentStep
    //#output(void com.dmdirc.installer.ui.StepLayout(int, int)): this.hGap
    //#output(void com.dmdirc.installer.ui.StepLayout(int, int)): this.parent
    //#output(void com.dmdirc.installer.ui.StepLayout(int, int)): this.steps
    //#output(void com.dmdirc.installer.ui.StepLayout(int, int)): this.vGap
    //#new obj(void com.dmdirc.installer.ui.StepLayout(int, int)): new ArrayList(StepLayout#1)
    //#post(void com.dmdirc.installer.ui.StepLayout(int, int)): this.currentStep == -1
    //#post(void com.dmdirc.installer.ui.StepLayout(int, int)): this.hGap == hGap
    //#post(void com.dmdirc.installer.ui.StepLayout(int, int)): init'ed(this.hGap)
    //#post(void com.dmdirc.installer.ui.StepLayout(int, int)): this.parent == null
    //#post(void com.dmdirc.installer.ui.StepLayout(int, int)): this.steps == &new ArrayList(StepLayout#1)
    //#post(void com.dmdirc.installer.ui.StepLayout(int, int)): this.vGap == vGap
    //#post(void com.dmdirc.installer.ui.StepLayout(int, int)): init'ed(this.vGap)
    //#post(void com.dmdirc.installer.ui.StepLayout(int, int)): new ArrayList(StepLayout#1) num objects == 1
    //#unanalyzed(void com.dmdirc.installer.ui.StepLayout(int, int)): Effects-of-calling:java.util.ArrayList
    }
    //#StepLayout.java:82: end of method: void com.dmdirc.installer.ui.StepLayout.com.dmdirc.installer.ui.StepLayout(int, int)

    /**
     * Instantiates a new step layout with the specified gaps.
     * 
     * @param hGap Horizontal gap
     * @param vGap Vertical gap
     * @param parent Parent component
     */
    public StepLayout(final int hGap, final int vGap, final Container parent) {
    //#StepLayout.java:91: method: void com.dmdirc.installer.ui.StepLayout.com.dmdirc.installer.ui.StepLayout(int, int, Container)
    //#input(void com.dmdirc.installer.ui.StepLayout(int, int, Container)): hGap
    //#input(void com.dmdirc.installer.ui.StepLayout(int, int, Container)): parent
    //#input(void com.dmdirc.installer.ui.StepLayout(int, int, Container)): this
    //#input(void com.dmdirc.installer.ui.StepLayout(int, int, Container)): vGap
    //#output(void com.dmdirc.installer.ui.StepLayout(int, int, Container)): new ArrayList(StepLayout#1) num objects
    //#output(void com.dmdirc.installer.ui.StepLayout(int, int, Container)): this.currentStep
    //#output(void com.dmdirc.installer.ui.StepLayout(int, int, Container)): this.hGap
    //#output(void com.dmdirc.installer.ui.StepLayout(int, int, Container)): this.parent
    //#output(void com.dmdirc.installer.ui.StepLayout(int, int, Container)): this.steps
    //#output(void com.dmdirc.installer.ui.StepLayout(int, int, Container)): this.vGap
    //#new obj(void com.dmdirc.installer.ui.StepLayout(int, int, Container)): new ArrayList(StepLayout#1)
    //#post(void com.dmdirc.installer.ui.StepLayout(int, int, Container)): this.currentStep == -1
    //#post(void com.dmdirc.installer.ui.StepLayout(int, int, Container)): this.hGap == hGap
    //#post(void com.dmdirc.installer.ui.StepLayout(int, int, Container)): init'ed(this.hGap)
    //#post(void com.dmdirc.installer.ui.StepLayout(int, int, Container)): this.parent == parent
    //#post(void com.dmdirc.installer.ui.StepLayout(int, int, Container)): init'ed(this.parent)
    //#post(void com.dmdirc.installer.ui.StepLayout(int, int, Container)): this.steps == &new ArrayList(StepLayout#1)
    //#post(void com.dmdirc.installer.ui.StepLayout(int, int, Container)): this.vGap == vGap
    //#post(void com.dmdirc.installer.ui.StepLayout(int, int, Container)): init'ed(this.vGap)
    //#post(void com.dmdirc.installer.ui.StepLayout(int, int, Container)): new ArrayList(StepLayout#1) num objects == 1
        steps = new ArrayList<SwingStep>();
        currentStep = -1;
        this.hGap = hGap;
        this.vGap = vGap;
        this.parent = parent;
    }
    //#StepLayout.java:97: end of method: void com.dmdirc.installer.ui.StepLayout.com.dmdirc.installer.ui.StepLayout(int, int, Container)

    /**
     * Returns the number of steps in the layout.
     * 
     * @return number of steps >= 0
     */
    public int size() {
        return steps.size();
    //#StepLayout.java:105: method: int com.dmdirc.installer.ui.StepLayout.size()
    //#input(int size()): this
    //#input(int size()): this.steps
    //#output(int size()): return_value
    //#pre[2] (int size()): this.steps != null
    //#post(int size()): init'ed(return_value)
    //#StepLayout.java:105: end of method: int com.dmdirc.installer.ui.StepLayout.size()
    }

    /**
     * Checks if the layout is empty
     * 
     * @return true iif the layout has no steps
     */
    public boolean isEmpty() {
        return steps.isEmpty();
    //#StepLayout.java:114: method: bool com.dmdirc.installer.ui.StepLayout.isEmpty()
    //#input(bool isEmpty()): this
    //#input(bool isEmpty()): this.steps
    //#output(bool isEmpty()): return_value
    //#pre[2] (bool isEmpty()): this.steps != null
    //#post(bool isEmpty()): init'ed(return_value)
    //#StepLayout.java:114: end of method: bool com.dmdirc.installer.ui.StepLayout.isEmpty()
    }

    /**
     * Returns the specified step from the layout.
     * 
     * @param index Step to retrieve
     * 
     * @return Step
     */
    public Step getStep(final int index) {
        return steps.get(index);
    //#StepLayout.java:125: method: Step com.dmdirc.installer.ui.StepLayout.getStep(int)
    //#input(Step getStep(int)): com/dmdirc/installer/Step.__Descendant_Table[com/dmdirc/installer/Step]
    //#input(Step getStep(int)): com/dmdirc/installer/Step.__Descendant_Table[com/dmdirc/installer/ui/StepConfirm]
    //#input(Step getStep(int)): com/dmdirc/installer/Step.__Descendant_Table[com/dmdirc/installer/ui/StepError]
    //#input(Step getStep(int)): com/dmdirc/installer/Step.__Descendant_Table[com/dmdirc/installer/ui/StepInstall]
    //#input(Step getStep(int)): com/dmdirc/installer/Step.__Descendant_Table[com/dmdirc/installer/ui/StepSettings]
    //#input(Step getStep(int)): com/dmdirc/installer/Step.__Descendant_Table[com/dmdirc/installer/ui/StepWelcome]
    //#input(Step getStep(int)): com/dmdirc/installer/Step.__Descendant_Table[com/dmdirc/installer/ui/SwingStep]
    //#input(Step getStep(int)): com/dmdirc/installer/Step.__Descendant_Table[others]
    //#input(Step getStep(int)): index
    //#input(Step getStep(int)): this
    //#input(Step getStep(int)): this.steps
    //#output(Step getStep(int)): return_value
    //#pre[3] (Step getStep(int)): this.steps != null
    //#presumption(Step getStep(int)): java.util.List:get(...).__Tag@125 in {com/dmdirc/installer/Step, com/dmdirc/installer/ui/StepConfirm, com/dmdirc/installer/ui/StepError, com/dmdirc/installer/ui/StepInstall, com/dmdirc/installer/ui/StepSettings, com/dmdirc/installer/ui/StepWelcome, com/dmdirc/installer/ui/SwingStep}
    //#post(Step getStep(int)): init'ed(return_value)
    //#StepLayout.java:125: end of method: Step com.dmdirc.installer.ui.StepLayout.getStep(int)
    }

    /**
     * Returns the step list.
     * 
     * @return List of steps
     */
    public List<SwingStep> getSteps() {
        return steps;
    //#StepLayout.java:134: method: List com.dmdirc.installer.ui.StepLayout.getSteps()
    //#input(List getSteps()): this
    //#input(List getSteps()): this.steps
    //#output(List getSteps()): return_value
    //#post(List getSteps()): return_value == this.steps
    //#post(List getSteps()): init'ed(return_value)
    //#StepLayout.java:134: end of method: List com.dmdirc.installer.ui.StepLayout.getSteps()
    }

    /**
     * Returns the current step index.
     *
     * @return Current step index
     */
    public int getCurrentStepIndex() {
        return currentStep;
    //#StepLayout.java:143: method: int com.dmdirc.installer.ui.StepLayout.getCurrentStepIndex()
    //#input(int getCurrentStepIndex()): this
    //#input(int getCurrentStepIndex()): this.currentStep
    //#output(int getCurrentStepIndex()): return_value
    //#pre[2] (int getCurrentStepIndex()): init'ed(this.currentStep)
    //#post(int getCurrentStepIndex()): return_value == this.currentStep
    //#post(int getCurrentStepIndex()): init'ed(return_value)
    //#StepLayout.java:143: end of method: int com.dmdirc.installer.ui.StepLayout.getCurrentStepIndex()
    }

    /**
     * Returns the current step name.
     *
     * @return Current step name
     */
    public String getCurrentStepName() {
        return steps.get(currentStep).getStepName();
    //#StepLayout.java:152: method: String com.dmdirc.installer.ui.StepLayout.getCurrentStepName()
    //#StepLayout.java:152: Warning: method not available - call not analyzed
    //#    call on String com.dmdirc.installer.ui.SwingStep:getStepName()
    //#    severity: INFORMATIONAL
    //#    class: com.dmdirc.installer.ui.StepLayout
    //#    method: String getCurrentStepName()
    //#    unanalyzed callee: String com.dmdirc.installer.ui.SwingStep:getStepName()
    //#input(String getCurrentStepName()): com/dmdirc/installer/ui/SwingStep.__Descendant_Table[com/dmdirc/installer/ui/StepConfirm]
    //#input(String getCurrentStepName()): com/dmdirc/installer/ui/SwingStep.__Descendant_Table[com/dmdirc/installer/ui/StepError]
    //#input(String getCurrentStepName()): com/dmdirc/installer/ui/SwingStep.__Descendant_Table[com/dmdirc/installer/ui/StepInstall]
    //#input(String getCurrentStepName()): com/dmdirc/installer/ui/SwingStep.__Descendant_Table[com/dmdirc/installer/ui/StepSettings]
    //#input(String getCurrentStepName()): com/dmdirc/installer/ui/SwingStep.__Descendant_Table[com/dmdirc/installer/ui/StepWelcome]
    //#input(String getCurrentStepName()): com/dmdirc/installer/ui/SwingStep.__Descendant_Table[com/dmdirc/installer/ui/SwingStep]
    //#input(String getCurrentStepName()): com/dmdirc/installer/ui/SwingStep.__Descendant_Table[others]
    //#input(String getCurrentStepName()): this
    //#input(String getCurrentStepName()): this.currentStep
    //#input(String getCurrentStepName()): this.steps
    //#output(String getCurrentStepName()): return_value
    //#pre[2] (String getCurrentStepName()): init'ed(this.currentStep)
    //#pre[3] (String getCurrentStepName()): this.steps != null
    //#presumption(String getCurrentStepName()): java.util.List:get(...).__Tag@152 in {com/dmdirc/installer/ui/StepConfirm, com/dmdirc/installer/ui/StepError, com/dmdirc/installer/ui/StepInstall, com/dmdirc/installer/ui/StepSettings, com/dmdirc/installer/ui/StepWelcome, com/dmdirc/installer/ui/SwingStep}
    //#presumption(String getCurrentStepName()): java.util.List:get(...)@152 != null
    //#post(String getCurrentStepName()): init'ed(return_value)
    //#StepLayout.java:152: end of method: String com.dmdirc.installer.ui.StepLayout.getCurrentStepName()
    }

    /**
     * Returns the current step name.
     *
     * @return Current step name
     */
    public Step getCurrentStep() {
        return steps.get(currentStep);
    //#StepLayout.java:161: method: Step com.dmdirc.installer.ui.StepLayout.getCurrentStep()
    //#input(Step getCurrentStep()): com/dmdirc/installer/Step.__Descendant_Table[com/dmdirc/installer/Step]
    //#input(Step getCurrentStep()): com/dmdirc/installer/Step.__Descendant_Table[com/dmdirc/installer/ui/StepConfirm]
    //#input(Step getCurrentStep()): com/dmdirc/installer/Step.__Descendant_Table[com/dmdirc/installer/ui/StepError]
    //#input(Step getCurrentStep()): com/dmdirc/installer/Step.__Descendant_Table[com/dmdirc/installer/ui/StepInstall]
    //#input(Step getCurrentStep()): com/dmdirc/installer/Step.__Descendant_Table[com/dmdirc/installer/ui/StepSettings]
    //#input(Step getCurrentStep()): com/dmdirc/installer/Step.__Descendant_Table[com/dmdirc/installer/ui/StepWelcome]
    //#input(Step getCurrentStep()): com/dmdirc/installer/Step.__Descendant_Table[com/dmdirc/installer/ui/SwingStep]
    //#input(Step getCurrentStep()): com/dmdirc/installer/Step.__Descendant_Table[others]
    //#input(Step getCurrentStep()): this
    //#input(Step getCurrentStep()): this.currentStep
    //#input(Step getCurrentStep()): this.steps
    //#output(Step getCurrentStep()): return_value
    //#pre[2] (Step getCurrentStep()): init'ed(this.currentStep)
    //#pre[3] (Step getCurrentStep()): this.steps != null
    //#presumption(Step getCurrentStep()): java.util.List:get(...).__Tag@161 in {com/dmdirc/installer/Step, com/dmdirc/installer/ui/StepConfirm, com/dmdirc/installer/ui/StepError, com/dmdirc/installer/ui/StepInstall, com/dmdirc/installer/ui/StepSettings, com/dmdirc/installer/ui/StepWelcome, com/dmdirc/installer/ui/SwingStep}
    //#post(Step getCurrentStep()): init'ed(return_value)
    //#StepLayout.java:161: end of method: Step com.dmdirc.installer.ui.StepLayout.getCurrentStep()
    }

    /**
     * Show the first step.
     * 
     * @param parent Parent container
     */
    public void first(final Container parent) {
        show(0, parent);
    //#StepLayout.java:170: method: void com.dmdirc.installer.ui.StepLayout.first(Container)
    //#input(void first(Container)): __Descendant_Table[com/dmdirc/installer/ui/StepLayout]
    //#input(void first(Container)): __Descendant_Table[others]
    //#input(void first(Container)): __Dispatch_Table.show(ILjava/awt/Container;)V
    //#input(void first(Container)): parent
    //#input(void first(Container)): this
    //#input(void first(Container)): this.__Tag
    //#input(void first(Container)): this.steps
    //#output(void first(Container)): this.currentStep
    //#pre[2] (void first(Container)): parent != null
    //#pre[4] (void first(Container)): this.__Tag == com/dmdirc/installer/ui/StepLayout
    //#pre[5] (void first(Container)): (soft) this.steps != null
    //#post(void first(Container)): possibly_updated(this.currentStep)
    //#unanalyzed(void first(Container)): Effects-of-calling:java.util.List:size
    //#unanalyzed(void first(Container)): Effects-of-calling:java.awt.Container:getTreeLock
    //#unanalyzed(void first(Container)): Effects-of-calling:java.awt.Container:getComponentCount
    //#unanalyzed(void first(Container)): Effects-of-calling:java.awt.Container:getComponent
    //#unanalyzed(void first(Container)): Effects-of-calling:java.awt.Component:isVisible
    //#unanalyzed(void first(Container)): Effects-of-calling:java.awt.Component:setVisible
    //#unanalyzed(void first(Container)): Effects-of-calling:java.lang.Throwable:__curr_excep_obj
    //#unanalyzed(void first(Container)): Effects-of-calling:java.awt.Container:validate
    }
    //#StepLayout.java:171: end of method: void com.dmdirc.installer.ui.StepLayout.first(Container)

    /**
     * Show the last step.
     * 
     * @param parent Parent container
     */
    public void last(final Container parent) {
        show(parent.getComponentCount() - 1, parent);
    //#StepLayout.java:179: method: void com.dmdirc.installer.ui.StepLayout.last(Container)
    //#input(void last(Container)): __Descendant_Table[com/dmdirc/installer/ui/StepLayout]
    //#input(void last(Container)): __Descendant_Table[others]
    //#input(void last(Container)): __Dispatch_Table.show(ILjava/awt/Container;)V
    //#input(void last(Container)): parent
    //#input(void last(Container)): this
    //#input(void last(Container)): this.__Tag
    //#input(void last(Container)): this.steps
    //#output(void last(Container)): this.currentStep
    //#pre[2] (void last(Container)): parent != null
    //#pre[4] (void last(Container)): this.__Tag == com/dmdirc/installer/ui/StepLayout
    //#pre[5] (void last(Container)): (soft) this.steps != null
    //#presumption(void last(Container)): java.awt.Container:getComponentCount(...)@179 >= -2_147_483_647
    //#post(void last(Container)): possibly_updated(this.currentStep)
    //#unanalyzed(void last(Container)): Effects-of-calling:java.util.List:size
    //#unanalyzed(void last(Container)): Effects-of-calling:java.awt.Container:getTreeLock
    //#unanalyzed(void last(Container)): Effects-of-calling:java.awt.Container:getComponentCount
    //#unanalyzed(void last(Container)): Effects-of-calling:java.awt.Container:getComponent
    //#unanalyzed(void last(Container)): Effects-of-calling:java.awt.Component:isVisible
    //#unanalyzed(void last(Container)): Effects-of-calling:java.awt.Component:setVisible
    //#unanalyzed(void last(Container)): Effects-of-calling:java.lang.Throwable:__curr_excep_obj
    //#unanalyzed(void last(Container)): Effects-of-calling:java.awt.Container:validate
    }
    //#StepLayout.java:180: end of method: void com.dmdirc.installer.ui.StepLayout.last(Container)

    /**
     * Show the next step.
     * 
     * @param parent Parent container
     */
    public void next(final Container parent) {
        show(currentStep + 1, parent);
    //#StepLayout.java:188: method: void com.dmdirc.installer.ui.StepLayout.next(Container)
    //#input(void next(Container)): __Descendant_Table[com/dmdirc/installer/ui/StepLayout]
    //#input(void next(Container)): __Descendant_Table[others]
    //#input(void next(Container)): __Dispatch_Table.show(ILjava/awt/Container;)V
    //#input(void next(Container)): parent
    //#input(void next(Container)): this
    //#input(void next(Container)): this.__Tag
    //#input(void next(Container)): this.currentStep
    //#input(void next(Container)): this.steps
    //#output(void next(Container)): this.currentStep
    //#pre[1] (void next(Container)): this.currentStep <= 4_294_967_294
    //#pre[2] (void next(Container)): parent != null
    //#pre[4] (void next(Container)): this.__Tag == com/dmdirc/installer/ui/StepLayout
    //#pre[5] (void next(Container)): (soft) this.steps != null
    //#post(void next(Container)): init'ed(this.currentStep)
    //#unanalyzed(void next(Container)): Effects-of-calling:java.util.List:size
    //#unanalyzed(void next(Container)): Effects-of-calling:java.awt.Container:getTreeLock
    //#unanalyzed(void next(Container)): Effects-of-calling:java.awt.Container:getComponentCount
    //#unanalyzed(void next(Container)): Effects-of-calling:java.awt.Container:getComponent
    //#unanalyzed(void next(Container)): Effects-of-calling:java.awt.Component:isVisible
    //#unanalyzed(void next(Container)): Effects-of-calling:java.awt.Component:setVisible
    //#unanalyzed(void next(Container)): Effects-of-calling:java.lang.Throwable:__curr_excep_obj
    //#unanalyzed(void next(Container)): Effects-of-calling:java.awt.Container:validate
    }
    //#StepLayout.java:189: end of method: void com.dmdirc.installer.ui.StepLayout.next(Container)

    /** 
     * Show the previous step.
     * 
     * @param parent Parent container
     */
    public void previous(final Container parent) {
        show(currentStep - 1, parent);
    //#StepLayout.java:197: method: void com.dmdirc.installer.ui.StepLayout.previous(Container)
    //#input(void previous(Container)): __Descendant_Table[com/dmdirc/installer/ui/StepLayout]
    //#input(void previous(Container)): __Descendant_Table[others]
    //#input(void previous(Container)): __Dispatch_Table.show(ILjava/awt/Container;)V
    //#input(void previous(Container)): parent
    //#input(void previous(Container)): this
    //#input(void previous(Container)): this.__Tag
    //#input(void previous(Container)): this.currentStep
    //#input(void previous(Container)): this.steps
    //#output(void previous(Container)): this.currentStep
    //#pre[1] (void previous(Container)): this.currentStep >= -2_147_483_647
    //#pre[2] (void previous(Container)): parent != null
    //#pre[4] (void previous(Container)): this.__Tag == com/dmdirc/installer/ui/StepLayout
    //#pre[5] (void previous(Container)): (soft) this.steps != null
    //#post(void previous(Container)): init'ed(this.currentStep)
    //#unanalyzed(void previous(Container)): Effects-of-calling:java.util.List:size
    //#unanalyzed(void previous(Container)): Effects-of-calling:java.awt.Container:getTreeLock
    //#unanalyzed(void previous(Container)): Effects-of-calling:java.awt.Container:getComponentCount
    //#unanalyzed(void previous(Container)): Effects-of-calling:java.awt.Container:getComponent
    //#unanalyzed(void previous(Container)): Effects-of-calling:java.awt.Component:isVisible
    //#unanalyzed(void previous(Container)): Effects-of-calling:java.awt.Component:setVisible
    //#unanalyzed(void previous(Container)): Effects-of-calling:java.lang.Throwable:__curr_excep_obj
    //#unanalyzed(void previous(Container)): Effects-of-calling:java.awt.Container:validate
    }
    //#StepLayout.java:198: end of method: void com.dmdirc.installer.ui.StepLayout.previous(Container)

    /**
     * Show the specified step.
     * 
     * @param step Step to show
     * @param parent Parent container
     */
    public void show(final Step step, final Container parent) {
        show(steps.indexOf(step), parent);
    //#StepLayout.java:207: method: void com.dmdirc.installer.ui.StepLayout.show(Step, Container)
    //#input(void show(Step, Container)): __Descendant_Table[com/dmdirc/installer/ui/StepLayout]
    //#input(void show(Step, Container)): __Descendant_Table[others]
    //#input(void show(Step, Container)): __Dispatch_Table.show(ILjava/awt/Container;)V
    //#input(void show(Step, Container)): parent
    //#input(void show(Step, Container)): step
    //#input(void show(Step, Container)): this
    //#input(void show(Step, Container)): this.__Tag
    //#input(void show(Step, Container)): this.steps
    //#output(void show(Step, Container)): this.currentStep
    //#pre[2] (void show(Step, Container)): parent != null
    //#pre[5] (void show(Step, Container)): this.__Tag == com/dmdirc/installer/ui/StepLayout
    //#pre[6] (void show(Step, Container)): this.steps != null
    //#post(void show(Step, Container)): possibly_updated(this.currentStep)
    //#unanalyzed(void show(Step, Container)): Effects-of-calling:java.util.List:size
    //#unanalyzed(void show(Step, Container)): Effects-of-calling:java.awt.Container:getTreeLock
    //#unanalyzed(void show(Step, Container)): Effects-of-calling:java.awt.Container:getComponentCount
    //#unanalyzed(void show(Step, Container)): Effects-of-calling:java.awt.Container:getComponent
    //#unanalyzed(void show(Step, Container)): Effects-of-calling:java.awt.Component:isVisible
    //#unanalyzed(void show(Step, Container)): Effects-of-calling:java.awt.Component:setVisible
    //#unanalyzed(void show(Step, Container)): Effects-of-calling:java.lang.Throwable:__curr_excep_obj
    //#unanalyzed(void show(Step, Container)): Effects-of-calling:java.awt.Container:validate
    }
    //#StepLayout.java:208: end of method: void com.dmdirc.installer.ui.StepLayout.show(Step, Container)

    /**
     * Show the step at the specified index.
     * 
     * @param step Step to show
     * @param parent Parent container
     */
    public void show(final int step, final Container parent) {
        int stepNumber = step;
    //#StepLayout.java:217: method: void com.dmdirc.installer.ui.StepLayout.show(int, Container)
    //#input(void show(int, Container)): parent
    //#input(void show(int, Container)): step
    //#input(void show(int, Container)): this
    //#input(void show(int, Container)): this.steps
    //#output(void show(int, Container)): this.currentStep
    //#pre[2] (void show(int, Container)): parent != null
    //#pre[5] (void show(int, Container)): (soft) this.steps != null
    //#presumption(void show(int, Container)): java.awt.Container:getComponent(...)@228 != null
    //#presumption(void show(int, Container)): java.awt.Container:getComponent(...)@236 != null
    //#presumption(void show(int, Container)): java.util.List:size(...)@220 >= -2_147_483_647
    //#post(void show(int, Container)): possibly_updated(this.currentStep)
    //#test_vector(void show(int, Container)): step: {-2_147_483_648..-2, 0..4_294_967_295}, {-1}
    //#test_vector(void show(int, Container)): java.awt.Component:isVisible(...)@229: {0}, {1}
    //#test_vector(void show(int, Container)): java.util.List:size(...)@219: {0..4_294_967_295}, {-2_147_483_648..-1}
        if (stepNumber == -1) {
            if (stepNumber >= steps.size()) {
                stepNumber = steps.size() - 1;
            } else {
                stepNumber = 0;
            }
        }
        synchronized (parent.getTreeLock()) {
            int componentCount = parent.getComponentCount();
            for (int i = 0; i < componentCount; i++) {
                Component comp = parent.getComponent(i);
                if (comp.isVisible()) {
                    comp.setVisible(false);
                    break;
                }
            }
            if (componentCount > 0) {
                currentStep = stepNumber;
                parent.getComponent(currentStep).setVisible(true);
                parent.validate();
            }
        }
    }
    //#StepLayout.java:240: end of method: void com.dmdirc.installer.ui.StepLayout.show(int, Container)

    /** {@inheritDoc} */
    @Override
    public void addLayoutComponent(final Component comp,
                                   final Object constraints) {
        if (!(comp instanceof Step)) {
    //#StepLayout.java:246: method: void com.dmdirc.installer.ui.StepLayout.addLayoutComponent(Component, Object)
    //#StepLayout.java:246: Warning: suspicious precondition
    //#    The precondition for comp.__Tag is not a contiguous range of values
    //#    severity: SUPPRESSED
    //#    class: com.dmdirc.installer.ui.StepLayout
    //#    method: void addLayoutComponent(Component, Object)
    //#    suspicious precondition index: [2]
    //#input(void addLayoutComponent(Component, Object)): __Descendant_Table[com/dmdirc/installer/ui/StepLayout]
    //#input(void addLayoutComponent(Component, Object)): __Descendant_Table[others]
    //#input(void addLayoutComponent(Component, Object)): __Dispatch_Table.addLayoutComponent(Lcom/dmdirc/installer/ui/SwingStep;)V
    //#input(void addLayoutComponent(Component, Object)): com/dmdirc/installer/Step.__Descendant_Table[com/dmdirc/installer/Step]
    //#input(void addLayoutComponent(Component, Object)): com/dmdirc/installer/Step.__Descendant_Table[com/dmdirc/installer/ui/StepConfirm]
    //#input(void addLayoutComponent(Component, Object)): com/dmdirc/installer/Step.__Descendant_Table[com/dmdirc/installer/ui/StepError]
    //#input(void addLayoutComponent(Component, Object)): com/dmdirc/installer/Step.__Descendant_Table[com/dmdirc/installer/ui/StepInstall]
    //#input(void addLayoutComponent(Component, Object)): com/dmdirc/installer/Step.__Descendant_Table[com/dmdirc/installer/ui/StepSettings]
    //#input(void addLayoutComponent(Component, Object)): com/dmdirc/installer/Step.__Descendant_Table[com/dmdirc/installer/ui/StepWelcome]
    //#input(void addLayoutComponent(Component, Object)): com/dmdirc/installer/Step.__Descendant_Table[com/dmdirc/installer/ui/SwingStep]
    //#input(void addLayoutComponent(Component, Object)): com/dmdirc/installer/Step.__Descendant_Table[others]
    //#input(void addLayoutComponent(Component, Object)): com/dmdirc/installer/ui/SwingStep.__Descendant_Table[com/dmdirc/installer/ui/StepConfirm]
    //#input(void addLayoutComponent(Component, Object)): com/dmdirc/installer/ui/SwingStep.__Descendant_Table[com/dmdirc/installer/ui/StepError]
    //#input(void addLayoutComponent(Component, Object)): com/dmdirc/installer/ui/SwingStep.__Descendant_Table[com/dmdirc/installer/ui/StepInstall]
    //#input(void addLayoutComponent(Component, Object)): com/dmdirc/installer/ui/SwingStep.__Descendant_Table[com/dmdirc/installer/ui/StepSettings]
    //#input(void addLayoutComponent(Component, Object)): com/dmdirc/installer/ui/SwingStep.__Descendant_Table[com/dmdirc/installer/ui/StepWelcome]
    //#input(void addLayoutComponent(Component, Object)): com/dmdirc/installer/ui/SwingStep.__Descendant_Table[com/dmdirc/installer/ui/SwingStep]
    //#input(void addLayoutComponent(Component, Object)): com/dmdirc/installer/ui/SwingStep.__Descendant_Table[others]
    //#input(void addLayoutComponent(Component, Object)): comp
    //#input(void addLayoutComponent(Component, Object)): comp.__Tag
    //#input(void addLayoutComponent(Component, Object)): this
    //#input(void addLayoutComponent(Component, Object)): this.__Tag
    //#input(void addLayoutComponent(Component, Object)): this.steps
    //#pre[1] (void addLayoutComponent(Component, Object)): comp != null
    //#pre[2] (void addLayoutComponent(Component, Object)): comp.__Tag in {com/dmdirc/installer/ui/StepConfirm, com/dmdirc/installer/ui/StepError, com/dmdirc/installer/ui/StepInstall, com/dmdirc/installer/ui/StepSettings, com/dmdirc/installer/ui/StepWelcome, com/dmdirc/installer/ui/SwingStep}
    //#pre[4] (void addLayoutComponent(Component, Object)): this.__Tag == com/dmdirc/installer/ui/StepLayout
    //#pre[5] (void addLayoutComponent(Component, Object)): this.steps != null
    //#unanalyzed(void addLayoutComponent(Component, Object)): Effects-of-calling:java.util.List:isEmpty
    //#unanalyzed(void addLayoutComponent(Component, Object)): Effects-of-calling:java.lang.Throwable:__curr_excep_obj
    //#unanalyzed(void addLayoutComponent(Component, Object)): Effects-of-calling:com.dmdirc.installer.ui.SwingStep:getTreeLock
    //#unanalyzed(void addLayoutComponent(Component, Object)): Effects-of-calling:com.dmdirc.installer.ui.SwingStep:setVisible
    //#unanalyzed(void addLayoutComponent(Component, Object)): Effects-of-calling:java.util.List:add
            throw new IllegalArgumentException(
                    "Component must be an instance of Step");
        }
        addLayoutComponent((SwingStep) comp);
    }
    //#StepLayout.java:251: end of method: void com.dmdirc.installer.ui.StepLayout.addLayoutComponent(Component, Object)

    /** 
     * {@inheritDoc}
     * 
     * @deprecated Use addLayoutComponent(Component, Object) or 
     * addLayoutComponent(Component)
     * 
     * @see addLayoutComponent(Component)
     * @see addLayoutComponent(Component, Object)
     */
    @Override
    @Deprecated
    public void addLayoutComponent(final String name, final Component comp) {
        if (!(comp instanceof Step)) {
    //#StepLayout.java:265: method: void com.dmdirc.installer.ui.StepLayout.addLayoutComponent(String, Component)
    //#StepLayout.java:265: Warning: suspicious precondition
    //#    The precondition for comp.__Tag is not a contiguous range of values
    //#    severity: SUPPRESSED
    //#    class: com.dmdirc.installer.ui.StepLayout
    //#    method: void addLayoutComponent(String, Component)
    //#    suspicious precondition index: [2]
    //#input(void addLayoutComponent(String, Component)): __Descendant_Table[com/dmdirc/installer/ui/StepLayout]
    //#input(void addLayoutComponent(String, Component)): __Descendant_Table[others]
    //#input(void addLayoutComponent(String, Component)): __Dispatch_Table.addLayoutComponent(Lcom/dmdirc/installer/ui/SwingStep;)V
    //#input(void addLayoutComponent(String, Component)): com/dmdirc/installer/Step.__Descendant_Table[com/dmdirc/installer/Step]
    //#input(void addLayoutComponent(String, Component)): com/dmdirc/installer/Step.__Descendant_Table[com/dmdirc/installer/ui/StepConfirm]
    //#input(void addLayoutComponent(String, Component)): com/dmdirc/installer/Step.__Descendant_Table[com/dmdirc/installer/ui/StepError]
    //#input(void addLayoutComponent(String, Component)): com/dmdirc/installer/Step.__Descendant_Table[com/dmdirc/installer/ui/StepInstall]
    //#input(void addLayoutComponent(String, Component)): com/dmdirc/installer/Step.__Descendant_Table[com/dmdirc/installer/ui/StepSettings]
    //#input(void addLayoutComponent(String, Component)): com/dmdirc/installer/Step.__Descendant_Table[com/dmdirc/installer/ui/StepWelcome]
    //#input(void addLayoutComponent(String, Component)): com/dmdirc/installer/Step.__Descendant_Table[com/dmdirc/installer/ui/SwingStep]
    //#input(void addLayoutComponent(String, Component)): com/dmdirc/installer/Step.__Descendant_Table[others]
    //#input(void addLayoutComponent(String, Component)): com/dmdirc/installer/ui/SwingStep.__Descendant_Table[com/dmdirc/installer/ui/StepConfirm]
    //#input(void addLayoutComponent(String, Component)): com/dmdirc/installer/ui/SwingStep.__Descendant_Table[com/dmdirc/installer/ui/StepError]
    //#input(void addLayoutComponent(String, Component)): com/dmdirc/installer/ui/SwingStep.__Descendant_Table[com/dmdirc/installer/ui/StepInstall]
    //#input(void addLayoutComponent(String, Component)): com/dmdirc/installer/ui/SwingStep.__Descendant_Table[com/dmdirc/installer/ui/StepSettings]
    //#input(void addLayoutComponent(String, Component)): com/dmdirc/installer/ui/SwingStep.__Descendant_Table[com/dmdirc/installer/ui/StepWelcome]
    //#input(void addLayoutComponent(String, Component)): com/dmdirc/installer/ui/SwingStep.__Descendant_Table[com/dmdirc/installer/ui/SwingStep]
    //#input(void addLayoutComponent(String, Component)): com/dmdirc/installer/ui/SwingStep.__Descendant_Table[others]
    //#input(void addLayoutComponent(String, Component)): comp
    //#input(void addLayoutComponent(String, Component)): comp.__Tag
    //#input(void addLayoutComponent(String, Component)): this
    //#input(void addLayoutComponent(String, Component)): this.__Tag
    //#input(void addLayoutComponent(String, Component)): this.steps
    //#pre[1] (void addLayoutComponent(String, Component)): comp != null
    //#pre[2] (void addLayoutComponent(String, Component)): comp.__Tag in {com/dmdirc/installer/ui/StepConfirm, com/dmdirc/installer/ui/StepError, com/dmdirc/installer/ui/StepInstall, com/dmdirc/installer/ui/StepSettings, com/dmdirc/installer/ui/StepWelcome, com/dmdirc/installer/ui/SwingStep}
    //#pre[4] (void addLayoutComponent(String, Component)): this.__Tag == com/dmdirc/installer/ui/StepLayout
    //#pre[5] (void addLayoutComponent(String, Component)): this.steps != null
    //#unanalyzed(void addLayoutComponent(String, Component)): Effects-of-calling:java.util.List:isEmpty
    //#unanalyzed(void addLayoutComponent(String, Component)): Effects-of-calling:java.lang.Throwable:__curr_excep_obj
    //#unanalyzed(void addLayoutComponent(String, Component)): Effects-of-calling:com.dmdirc.installer.ui.SwingStep:getTreeLock
    //#unanalyzed(void addLayoutComponent(String, Component)): Effects-of-calling:com.dmdirc.installer.ui.SwingStep:setVisible
    //#unanalyzed(void addLayoutComponent(String, Component)): Effects-of-calling:java.util.List:add
            throw new IllegalArgumentException(
                    "Component must be an instance of Step");
        }
        addLayoutComponent((SwingStep) comp);
    }
    //#StepLayout.java:270: end of method: void com.dmdirc.installer.ui.StepLayout.addLayoutComponent(String, Component)

    /**
     * Adds a component to the layout.
     * 
     * @param step Component to add
     */
    public void addLayoutComponent(final SwingStep step) {
        synchronized (step.getTreeLock()) {
    //#StepLayout.java:278: method: void com.dmdirc.installer.ui.StepLayout.addLayoutComponent(SwingStep)
    //#StepLayout.java:278: Warning: method not available - call not analyzed
    //#    call on Object com.dmdirc.installer.ui.SwingStep:getTreeLock()
    //#    severity: INFORMATIONAL
    //#    class: com.dmdirc.installer.ui.StepLayout
    //#    method: void addLayoutComponent(SwingStep)
    //#    unanalyzed callee: Object com.dmdirc.installer.ui.SwingStep:getTreeLock()
    //#input(void addLayoutComponent(SwingStep)): step
    //#input(void addLayoutComponent(SwingStep)): this
    //#input(void addLayoutComponent(SwingStep)): this.steps
    //#pre[1] (void addLayoutComponent(SwingStep)): step != null
    //#pre[3] (void addLayoutComponent(SwingStep)): this.steps != null
    //#test_vector(void addLayoutComponent(SwingStep)): java.util.List:isEmpty(...)@279: {1}, {0}
            if (!steps.isEmpty()) {
                step.setVisible(false);
    //#StepLayout.java:280: Warning: method not available - call not analyzed
    //#    call on void com.dmdirc.installer.ui.SwingStep:setVisible(bool)
    //#    severity: INFORMATIONAL
    //#    class: com.dmdirc.installer.ui.StepLayout
    //#    method: void addLayoutComponent(SwingStep)
    //#    unanalyzed callee: void com.dmdirc.installer.ui.SwingStep:setVisible(bool)
            }
            steps.add(step);
        }
    }
    //#StepLayout.java:284: end of method: void com.dmdirc.installer.ui.StepLayout.addLayoutComponent(SwingStep)

    /** {@inheritDoc} */
    @Override
    public void removeLayoutComponent(final Component comp) {
        synchronized (comp.getTreeLock()) {
    //#StepLayout.java:289: method: void com.dmdirc.installer.ui.StepLayout.removeLayoutComponent(Component)
    //#input(void removeLayoutComponent(Component)): __Descendant_Table[com/dmdirc/installer/ui/StepLayout]
    //#input(void removeLayoutComponent(Component)): __Descendant_Table[others]
    //#input(void removeLayoutComponent(Component)): __Dispatch_Table.next(Ljava/awt/Container;)V
    //#input(void removeLayoutComponent(Component)): __Dispatch_Table.show(ILjava/awt/Container;)V
    //#input(void removeLayoutComponent(Component)): comp
    //#input(void removeLayoutComponent(Component)): this
    //#input(void removeLayoutComponent(Component)): this.__Tag
    //#input(void removeLayoutComponent(Component)): this.currentStep
    //#input(void removeLayoutComponent(Component)): this.steps
    //#output(void removeLayoutComponent(Component)): this.currentStep
    //#pre[1] (void removeLayoutComponent(Component)): comp != null
    //#pre[2] (void removeLayoutComponent(Component)): this.currentStep <= 4_294_967_294
    //#pre[4] (void removeLayoutComponent(Component)): this.__Tag == com/dmdirc/installer/ui/StepLayout
    //#pre[5] (void removeLayoutComponent(Component)): (soft) this.steps != null
    //#presumption(void removeLayoutComponent(Component)): java.awt.Component:getParent(...)@293 != null
    //#post(void removeLayoutComponent(Component)): init'ed(this.currentStep)
    //#unanalyzed(void removeLayoutComponent(Component)): Effects-of-calling:java.util.List:size
    //#unanalyzed(void removeLayoutComponent(Component)): Effects-of-calling:java.awt.Container:getTreeLock
    //#unanalyzed(void removeLayoutComponent(Component)): Effects-of-calling:java.awt.Container:getComponentCount
    //#unanalyzed(void removeLayoutComponent(Component)): Effects-of-calling:java.awt.Container:getComponent
    //#unanalyzed(void removeLayoutComponent(Component)): Effects-of-calling:java.awt.Component:isVisible
    //#unanalyzed(void removeLayoutComponent(Component)): Effects-of-calling:java.awt.Component:setVisible
    //#unanalyzed(void removeLayoutComponent(Component)): Effects-of-calling:java.lang.Throwable:__curr_excep_obj
    //#unanalyzed(void removeLayoutComponent(Component)): Effects-of-calling:java.awt.Container:validate
    //#test_vector(void removeLayoutComponent(Component)): java.awt.Component:isVisible(...)@290: {0}, {1}
            if (comp.isVisible()) {
                comp.setVisible(false);
            }
            next(comp.getParent());
            steps.remove(comp);
        }
    }
    //#StepLayout.java:296: end of method: void com.dmdirc.installer.ui.StepLayout.removeLayoutComponent(Component)

    /** 
     * {@inheritDoc}
     * 
     * @return Returns the preferred size of the container
     */
    @Override
    public Dimension preferredLayoutSize(final Container parent) {
        synchronized (parent.getTreeLock()) {
    //#StepLayout.java:305: method: Dimension com.dmdirc.installer.ui.StepLayout.preferredLayoutSize(Container)
    //#input(Dimension preferredLayoutSize(Container)): parent
    //#input(Dimension preferredLayoutSize(Container)): this
    //#input(Dimension preferredLayoutSize(Container)): this.hGap
    //#input(Dimension preferredLayoutSize(Container)): this.vGap
    //#output(Dimension preferredLayoutSize(Container)): new Dimension(preferredLayoutSize#1) num objects
    //#output(Dimension preferredLayoutSize(Container)): return_value
    //#new obj(Dimension preferredLayoutSize(Container)): new Dimension(preferredLayoutSize#1)
    //#pre[1] (Dimension preferredLayoutSize(Container)): parent != null
    //#pre[3] (Dimension preferredLayoutSize(Container)): init'ed(this.hGap)
    //#pre[4] (Dimension preferredLayoutSize(Container)): init'ed(this.vGap)
    //#presumption(Dimension preferredLayoutSize(Container)): java.awt.Component:getPreferredSize(...)@313 != null
    //#presumption(Dimension preferredLayoutSize(Container)): java.awt.Container:getComponent(...)@312 != null
    //#presumption(Dimension preferredLayoutSize(Container)): java.awt.Container:getInsets(...)@306 != null
    //#post(Dimension preferredLayoutSize(Container)): return_value == &new Dimension(preferredLayoutSize#1)
    //#post(Dimension preferredLayoutSize(Container)): new Dimension(preferredLayoutSize#1) num objects == 1
            Insets insets = parent.getInsets();
            int componentCount = parent.getComponentCount();
            int width = 0;
            int height = 0;

            for (int i = 0; i < componentCount; i++) {
                Component comp = parent.getComponent(i);
                Dimension preferredDimension = comp.getPreferredSize();
                if (preferredDimension.width > width) {
                    width = preferredDimension.width;
                }
                if (preferredDimension.height > height) {
                    height = preferredDimension.height;
                }
            }
            return new Dimension(insets.left + insets.right + width + hGap * 2,
    //#StepLayout.java:321: ?overflow
    //#    insets.left + insets.right + width + this.hGap*2 in {-2_147_483_648..4_294_967_295}
    //#    severity: SUPPRESSED
    //#    class: com.dmdirc.installer.ui.StepLayout
    //#    method: Dimension preferredLayoutSize(Container)
    //#    basic block: bb_9
    //#    assertion: insets.left + insets.right + width + this.hGap*2 in {-2_147_483_648..4_294_967_295}
    //#    VN: insets.left@306 + insets.right@306 + width + this.hGap*2
    //#    Expected: {-2_147_483_648..4_294_967_295, Invalid}
    //#    Bad: {-10_737_418_240..-2_147_483_649, 4_294_967_296..21_474_836_475}
    //#    Attribs:  Int  Bad < Exp  Bad > Exp
    //#StepLayout.java:321: ?overflow
    //#    insets.top + insets.bottom + height + this.vGap*2 in {-2_147_483_648..4_294_967_295}
    //#    severity: SUPPRESSED
    //#    class: com.dmdirc.installer.ui.StepLayout
    //#    method: Dimension preferredLayoutSize(Container)
    //#    basic block: bb_9
    //#    assertion: insets.top + insets.bottom + height + this.vGap*2 in {-2_147_483_648..4_294_967_295}
    //#    VN: insets.top@306 + insets.bottom@306 + height + this.vGap*2
    //#    Expected: {-2_147_483_648..4_294_967_295, Invalid}
    //#    Bad: {-10_737_418_240..-2_147_483_649, 4_294_967_296..21_474_836_475}
    //#    Attribs:  Int  Bad < Exp  Bad > Exp
                                 insets.top + insets.bottom + height + vGap * 2);
        }
    //#StepLayout.java:323: end of method: Dimension com.dmdirc.installer.ui.StepLayout.preferredLayoutSize(Container)
    }

    /** 
     * {@inheritDoc}
     * 
     * @return Returns the minimum size of the container
     */
    @Override
    public Dimension minimumLayoutSize(final Container parent) {
        synchronized (parent.getTreeLock()) {
    //#StepLayout.java:333: method: Dimension com.dmdirc.installer.ui.StepLayout.minimumLayoutSize(Container)
    //#input(Dimension minimumLayoutSize(Container)): parent
    //#input(Dimension minimumLayoutSize(Container)): this
    //#input(Dimension minimumLayoutSize(Container)): this.hGap
    //#input(Dimension minimumLayoutSize(Container)): this.vGap
    //#output(Dimension minimumLayoutSize(Container)): new Dimension(minimumLayoutSize#1) num objects
    //#output(Dimension minimumLayoutSize(Container)): return_value
    //#new obj(Dimension minimumLayoutSize(Container)): new Dimension(minimumLayoutSize#1)
    //#pre[1] (Dimension minimumLayoutSize(Container)): parent != null
    //#pre[3] (Dimension minimumLayoutSize(Container)): init'ed(this.hGap)
    //#pre[4] (Dimension minimumLayoutSize(Container)): init'ed(this.vGap)
    //#presumption(Dimension minimumLayoutSize(Container)): java.awt.Component:getMinimumSize(...)@341 != null
    //#presumption(Dimension minimumLayoutSize(Container)): java.awt.Container:getComponent(...)@340 != null
    //#presumption(Dimension minimumLayoutSize(Container)): java.awt.Container:getInsets(...)@334 != null
    //#post(Dimension minimumLayoutSize(Container)): return_value == &new Dimension(minimumLayoutSize#1)
    //#post(Dimension minimumLayoutSize(Container)): new Dimension(minimumLayoutSize#1) num objects == 1
            Insets insets = parent.getInsets();
            int componentCount = parent.getComponentCount();
            int width = 0;
            int height = 0;

            for (int i = 0; i < componentCount; i++) {
                Component comp = parent.getComponent(i);
                Dimension minimumDimension = comp.getMinimumSize();
                if (minimumDimension.width > width) {
                    width = minimumDimension.width;
                }
                if (minimumDimension.height > height) {
                    height = minimumDimension.height;
                }
            }
            return new Dimension(insets.left + insets.right + width + hGap * 2,
    //#StepLayout.java:349: ?overflow
    //#    insets.left + insets.right + width + this.hGap*2 in {-2_147_483_648..4_294_967_295}
    //#    severity: SUPPRESSED
    //#    class: com.dmdirc.installer.ui.StepLayout
    //#    method: Dimension minimumLayoutSize(Container)
    //#    basic block: bb_9
    //#    assertion: insets.left + insets.right + width + this.hGap*2 in {-2_147_483_648..4_294_967_295}
    //#    VN: insets.left@334 + insets.right@334 + width + this.hGap*2
    //#    Expected: {-2_147_483_648..4_294_967_295, Invalid}
    //#    Bad: {-10_737_418_240..-2_147_483_649, 4_294_967_296..21_474_836_475}
    //#    Attribs:  Int  Bad < Exp  Bad > Exp
    //#StepLayout.java:349: ?overflow
    //#    insets.top + insets.bottom + height + this.vGap*2 in {-2_147_483_648..4_294_967_295}
    //#    severity: SUPPRESSED
    //#    class: com.dmdirc.installer.ui.StepLayout
    //#    method: Dimension minimumLayoutSize(Container)
    //#    basic block: bb_9
    //#    assertion: insets.top + insets.bottom + height + this.vGap*2 in {-2_147_483_648..4_294_967_295}
    //#    VN: insets.top@334 + insets.bottom@334 + height + this.vGap*2
    //#    Expected: {-2_147_483_648..4_294_967_295, Invalid}
    //#    Bad: {-10_737_418_240..-2_147_483_649, 4_294_967_296..21_474_836_475}
    //#    Attribs:  Int  Bad < Exp  Bad > Exp
                                 insets.top + insets.bottom + height + vGap * 2);
        }
    //#StepLayout.java:351: end of method: Dimension com.dmdirc.installer.ui.StepLayout.minimumLayoutSize(Container)
    }

    /** 
     * {@inheritDoc}
     * 
     * @param parent Container to get the size for
     * 
     * @return Returns the maximum size of the container
     */
    @Override
    public Dimension maximumLayoutSize(final Container parent) {
        return new Dimension(Integer.MAX_VALUE, Integer.MAX_VALUE);
    //#StepLayout.java:363: method: Dimension com.dmdirc.installer.ui.StepLayout.maximumLayoutSize(Container)
    //#output(Dimension maximumLayoutSize(Container)): new Dimension(maximumLayoutSize#1) num objects
    //#output(Dimension maximumLayoutSize(Container)): return_value
    //#new obj(Dimension maximumLayoutSize(Container)): new Dimension(maximumLayoutSize#1)
    //#post(Dimension maximumLayoutSize(Container)): return_value == &new Dimension(maximumLayoutSize#1)
    //#post(Dimension maximumLayoutSize(Container)): new Dimension(maximumLayoutSize#1) num objects == 1
    //#StepLayout.java:363: end of method: Dimension com.dmdirc.installer.ui.StepLayout.maximumLayoutSize(Container)
    }

    /** 
     * {@inheritDoc}
     * 
     * @param target Container to get the alignment from
     * 
     * @return Alignment
     */
    @Override
    public float getLayoutAlignmentX(final Container target) {
        return 0.5f;
    //#StepLayout.java:375: method: float com.dmdirc.installer.ui.StepLayout.getLayoutAlignmentX(Container)
    //#output(float getLayoutAlignmentX(Container)): return_value
    //#post(float getLayoutAlignmentX(Container)): return_value == 1/2
    //#StepLayout.java:375: end of method: float com.dmdirc.installer.ui.StepLayout.getLayoutAlignmentX(Container)
    }

    /** 
     * {@inheritDoc}
     * 
     * @param target Container to get the alignment from
     * 
     * @return Alignment
     */
    @Override
    public float getLayoutAlignmentY(final Container target) {
        return 0.5f;
    //#StepLayout.java:387: method: float com.dmdirc.installer.ui.StepLayout.getLayoutAlignmentY(Container)
    //#output(float getLayoutAlignmentY(Container)): return_value
    //#post(float getLayoutAlignmentY(Container)): return_value == 1/2
    //#StepLayout.java:387: end of method: float com.dmdirc.installer.ui.StepLayout.getLayoutAlignmentY(Container)
    }

    /** 
     * {@inheritDoc}
     * 
     * @param target  Container to invalidate
     */
    @Override
    public void invalidateLayout(final Container target) {
        //Ignore
    }
    //#StepLayout.java:398: method: void com.dmdirc.installer.ui.StepLayout.invalidateLayout(Container)
    //#StepLayout.java:398: end of method: void com.dmdirc.installer.ui.StepLayout.invalidateLayout(Container)

    /** {@inheritDoc} */
    @Override
    public void layoutContainer(final Container parent) {
        synchronized (parent.getTreeLock()) {
    //#StepLayout.java:403: method: void com.dmdirc.installer.ui.StepLayout.layoutContainer(Container)
    //#input(void layoutContainer(Container)): parent
    //#input(void layoutContainer(Container)): this
    //#input(void layoutContainer(Container)): this.hGap
    //#input(void layoutContainer(Container)): this.vGap
    //#pre[1] (void layoutContainer(Container)): parent != null
    //#pre[3] (void layoutContainer(Container)): (soft) init'ed(this.hGap)
    //#pre[4] (void layoutContainer(Container)): (soft) init'ed(this.vGap)
    //#presumption(void layoutContainer(Container)): java.awt.Container:getComponent(...)@410 != null
    //#presumption(void layoutContainer(Container)): java.awt.Container:getComponent(...)@422 != null
    //#presumption(void layoutContainer(Container)): java.awt.Container:getHeight(...)@411 - (this.vGap*2 + insets.top@404 + insets.bottom@404) in {-2_147_483_648..4_294_967_295}
    //#presumption(void layoutContainer(Container)): java.awt.Container:getInsets(...)@404 != null
    //#presumption(void layoutContainer(Container)): java.awt.Container:getWidth(...)@411 - (this.hGap*2 + insets.left@404 + insets.right@404) in {-2_147_483_648..4_294_967_295}
    //#presumption(void layoutContainer(Container)): this.hGap + insets.left@404 in {-2_147_483_648..4_294_967_295}
    //#presumption(void layoutContainer(Container)): this.hGap*2 + insets.left@404 in {-4_294_967_296..8_589_934_590}
    //#presumption(void layoutContainer(Container)): this.hGap*2 + insets.left@404 + insets.right@404 in {-6_442_450_943..6_442_450_943}
    //#presumption(void layoutContainer(Container)): this.vGap + insets.top@404 in {-2_147_483_648..4_294_967_295}
    //#presumption(void layoutContainer(Container)): this.vGap*2 + insets.top@404 in {-4_294_967_296..8_589_934_590}
    //#presumption(void layoutContainer(Container)): this.vGap*2 + insets.top@404 + insets.bottom@404 in {-6_442_450_943..6_442_450_943}
    //#test_vector(void layoutContainer(Container)): java.awt.Component:isVisible(...)@416: {0}, {1}
            Insets insets = parent.getInsets();
            int componentCount = parent.getComponentCount();
            Component comp = null;
    //#StepLayout.java:406: Warning: unused assignment
    //#    Unused assignment into comp
    //#    severity: SUPPRESSED
    //#    class: com.dmdirc.installer.ui.StepLayout
    //#    method: void layoutContainer(Container)
    //#    Attribs:  Uncertain
            boolean currentFound = false;

            for (int i = 0; i < componentCount; i++) {
                comp = parent.getComponent(i);
                comp.setBounds(hGap + insets.left, vGap + insets.top,
                               parent.getWidth() - (hGap * 2 + insets.left +
                                                    insets.right), parent.
                        getHeight() - (vGap * 2 +
                                       insets.top + insets.bottom));
                if (comp.isVisible()) {
                    currentFound = true;
                }
            }

            if (!currentFound && componentCount > 0) {
                parent.getComponent(0).setVisible(true);
            }
        }
    }
    //#StepLayout.java:425: end of method: void com.dmdirc.installer.ui.StepLayout.layoutContainer(Container)
}
    //#output(com.dmdirc.installer.ui.StepLayout__static_init): __Descendant_Table[com/dmdirc/installer/ui/StepLayout]
    //#output(com.dmdirc.installer.ui.StepLayout__static_init): __Dispatch_Table.addLayoutComponent(Lcom/dmdirc/installer/ui/SwingStep;)V
    //#output(com.dmdirc.installer.ui.StepLayout__static_init): __Dispatch_Table.addLayoutComponent(Ljava/awt/Component;Ljava/lang/Object;)V
    //#output(com.dmdirc.installer.ui.StepLayout__static_init): __Dispatch_Table.addLayoutComponent(Ljava/lang/String;Ljava/awt/Component;)V
    //#output(com.dmdirc.installer.ui.StepLayout__static_init): __Dispatch_Table.first(Ljava/awt/Container;)V
    //#output(com.dmdirc.installer.ui.StepLayout__static_init): __Dispatch_Table.getCurrentStep()Lcom/dmdirc/installer/Step;
    //#output(com.dmdirc.installer.ui.StepLayout__static_init): __Dispatch_Table.getCurrentStepIndex()I
    //#output(com.dmdirc.installer.ui.StepLayout__static_init): __Dispatch_Table.getCurrentStepName()Ljava/lang/String;
    //#output(com.dmdirc.installer.ui.StepLayout__static_init): __Dispatch_Table.getLayoutAlignmentX(Ljava/awt/Container;)F
    //#output(com.dmdirc.installer.ui.StepLayout__static_init): __Dispatch_Table.getLayoutAlignmentY(Ljava/awt/Container;)F
    //#output(com.dmdirc.installer.ui.StepLayout__static_init): __Dispatch_Table.getStep(I)Lcom/dmdirc/installer/Step;
    //#output(com.dmdirc.installer.ui.StepLayout__static_init): __Dispatch_Table.getSteps()Ljava/util/List;
    //#output(com.dmdirc.installer.ui.StepLayout__static_init): __Dispatch_Table.invalidateLayout(Ljava/awt/Container;)V
    //#output(com.dmdirc.installer.ui.StepLayout__static_init): __Dispatch_Table.isEmpty()Z
    //#output(com.dmdirc.installer.ui.StepLayout__static_init): __Dispatch_Table.last(Ljava/awt/Container;)V
    //#output(com.dmdirc.installer.ui.StepLayout__static_init): __Dispatch_Table.layoutContainer(Ljava/awt/Container;)V
    //#output(com.dmdirc.installer.ui.StepLayout__static_init): __Dispatch_Table.maximumLayoutSize(Ljava/awt/Container;)Ljava/awt/Dimension;
    //#output(com.dmdirc.installer.ui.StepLayout__static_init): __Dispatch_Table.minimumLayoutSize(Ljava/awt/Container;)Ljava/awt/Dimension;
    //#output(com.dmdirc.installer.ui.StepLayout__static_init): __Dispatch_Table.next(Ljava/awt/Container;)V
    //#output(com.dmdirc.installer.ui.StepLayout__static_init): __Dispatch_Table.preferredLayoutSize(Ljava/awt/Container;)Ljava/awt/Dimension;
    //#output(com.dmdirc.installer.ui.StepLayout__static_init): __Dispatch_Table.previous(Ljava/awt/Container;)V
    //#output(com.dmdirc.installer.ui.StepLayout__static_init): __Dispatch_Table.removeLayoutComponent(Ljava/awt/Component;)V
    //#output(com.dmdirc.installer.ui.StepLayout__static_init): __Dispatch_Table.show(ILjava/awt/Container;)V
    //#output(com.dmdirc.installer.ui.StepLayout__static_init): __Dispatch_Table.show(Lcom/dmdirc/installer/Step;Ljava/awt/Container;)V
    //#output(com.dmdirc.installer.ui.StepLayout__static_init): __Dispatch_Table.size()I
    //#post(com.dmdirc.installer.ui.StepLayout__static_init): __Descendant_Table[com/dmdirc/installer/ui/StepLayout] == &__Dispatch_Table
    //#post(com.dmdirc.installer.ui.StepLayout__static_init): __Dispatch_Table.addLayoutComponent(Lcom/dmdirc/installer/ui/SwingStep;)V == &addLayoutComponent
    //#post(com.dmdirc.installer.ui.StepLayout__static_init): __Dispatch_Table.addLayoutComponent(Ljava/awt/Component;Ljava/lang/Object;)V == &addLayoutComponent
    //#post(com.dmdirc.installer.ui.StepLayout__static_init): __Dispatch_Table.addLayoutComponent(Ljava/lang/String;Ljava/awt/Component;)V == &addLayoutComponent
    //#post(com.dmdirc.installer.ui.StepLayout__static_init): __Dispatch_Table.first(Ljava/awt/Container;)V == &first
    //#post(com.dmdirc.installer.ui.StepLayout__static_init): __Dispatch_Table.getCurrentStep()Lcom/dmdirc/installer/Step; == &getCurrentStep
    //#post(com.dmdirc.installer.ui.StepLayout__static_init): __Dispatch_Table.getCurrentStepIndex()I == &getCurrentStepIndex
    //#post(com.dmdirc.installer.ui.StepLayout__static_init): __Dispatch_Table.getCurrentStepName()Ljava/lang/String; == &getCurrentStepName
    //#post(com.dmdirc.installer.ui.StepLayout__static_init): __Dispatch_Table.getLayoutAlignmentX(Ljava/awt/Container;)F == &getLayoutAlignmentX
    //#post(com.dmdirc.installer.ui.StepLayout__static_init): __Dispatch_Table.getLayoutAlignmentY(Ljava/awt/Container;)F == &getLayoutAlignmentY
    //#post(com.dmdirc.installer.ui.StepLayout__static_init): __Dispatch_Table.getStep(I)Lcom/dmdirc/installer/Step; == &getStep
    //#post(com.dmdirc.installer.ui.StepLayout__static_init): __Dispatch_Table.getSteps()Ljava/util/List; == &getSteps
    //#post(com.dmdirc.installer.ui.StepLayout__static_init): __Dispatch_Table.invalidateLayout(Ljava/awt/Container;)V == &invalidateLayout
    //#post(com.dmdirc.installer.ui.StepLayout__static_init): __Dispatch_Table.isEmpty()Z == &isEmpty
    //#post(com.dmdirc.installer.ui.StepLayout__static_init): __Dispatch_Table.last(Ljava/awt/Container;)V == &last
    //#post(com.dmdirc.installer.ui.StepLayout__static_init): __Dispatch_Table.layoutContainer(Ljava/awt/Container;)V == &layoutContainer
    //#post(com.dmdirc.installer.ui.StepLayout__static_init): __Dispatch_Table.maximumLayoutSize(Ljava/awt/Container;)Ljava/awt/Dimension; == &maximumLayoutSize
    //#post(com.dmdirc.installer.ui.StepLayout__static_init): __Dispatch_Table.minimumLayoutSize(Ljava/awt/Container;)Ljava/awt/Dimension; == &minimumLayoutSize
    //#post(com.dmdirc.installer.ui.StepLayout__static_init): __Dispatch_Table.next(Ljava/awt/Container;)V == &next
    //#post(com.dmdirc.installer.ui.StepLayout__static_init): __Dispatch_Table.preferredLayoutSize(Ljava/awt/Container;)Ljava/awt/Dimension; == &preferredLayoutSize
    //#post(com.dmdirc.installer.ui.StepLayout__static_init): __Dispatch_Table.previous(Ljava/awt/Container;)V == &previous
    //#post(com.dmdirc.installer.ui.StepLayout__static_init): __Dispatch_Table.removeLayoutComponent(Ljava/awt/Component;)V == &removeLayoutComponent
    //#post(com.dmdirc.installer.ui.StepLayout__static_init): __Dispatch_Table.show(ILjava/awt/Container;)V == &show
    //#post(com.dmdirc.installer.ui.StepLayout__static_init): __Dispatch_Table.show(Lcom/dmdirc/installer/Step;Ljava/awt/Container;)V == &show
    //#post(com.dmdirc.installer.ui.StepLayout__static_init): __Dispatch_Table.size()I == &size
    //#StepLayout.java:: end of method: com.dmdirc.installer.ui.StepLayout.com.dmdirc.installer.ui.StepLayout__static_init
    //#StepLayout.java:: end of class: com.dmdirc.installer.ui.StepLayout
