beforeShown() & preselect laf-default editor scheme 2

This commit is contained in:
Gregory.Shrago
2014-04-22 19:35:06 +04:00
parent 17e8b302bc
commit 339dd236a7
@@ -54,7 +54,8 @@ public class CustomizeIDEWizardDialog extends DialogWrapper implements ActionLis
myNavigationLabel.setEnabled(false);
myFooterLabel.setEnabled(false);
init();
initCurrentStep();
initCurrentStep(true);
setSize(400, 300);
System.setProperty(StartupActionScriptManager.STARTUP_WIZARD_MODE, "true");
}
@@ -125,7 +126,7 @@ public class CustomizeIDEWizardDialog extends DialogWrapper implements ActionLis
}
if (e.getSource() == myBackButton) {
myIndex--;
initCurrentStep();
initCurrentStep(false);
return;
}
if (e.getSource() == myNextButton) {
@@ -134,7 +135,7 @@ public class CustomizeIDEWizardDialog extends DialogWrapper implements ActionLis
return;
}
myIndex++;
initCurrentStep();
initCurrentStep(true);
}
}
@@ -148,8 +149,9 @@ public class CustomizeIDEWizardDialog extends DialogWrapper implements ActionLis
super.doOKAction();
}
private void initCurrentStep() {
private void initCurrentStep(boolean forward) {
final AbstractCustomizeWizardStep myCurrentStep = mySteps.get(myIndex);
myCurrentStep.beforeShown(forward);
myCardLayout.swipe(myContentPanel, myCurrentStep.getTitle(), JBCardLayout.SwipeDirection.AUTO, new Runnable() {
@Override
public void run() {