Menu

#1 Add a bit of functionality to WizardPanel

Unstable_(example)
open
nobody
5
2007-05-31
2007-05-31
No

If you added a few things to WizardPanel, it would help decouple each panel from the other panels. As it is now, if you have panels A, B, and C, you have to import B in A, and C in B to set the next panel. With these changes to WizardPanel, the linkages could be done centrally like this (which makes it easier to reorder, in my mind at least):

APanel aPanel = new APanel();
BPanel bPanel = new BPanel();
CPanel cPanel = new CPanel();

aPanel.setNextPanel(bPanel);
bPanel.setNextPanel(cPanel);

wizard.start(aPanel);

*** Suggested additions to WizardPanel:

private WizardPanel nextPanel;

public WizardPanel getNextPanel() {
return nextPanel;
}

public void setNextPanel(WizardPanel nextPanel) {
this.nextPanel = nextPanel;
}

public boolean hasNext() {
return getNextPanel() != null;
}

public WizardPanel next() {
return getNextPanel();
}

Discussion


Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.