void (final @NotNull T step, int index) { mySteps.add(index, step); if (step instanceof StepAdapter) { ((StepAdapter)step).registerStepListener(myStepListener); } // card layout is used final Component component = step.getComponent(); if (component != null) { addStepComponent(component); } }